Eluna fix crash on InterruptSpell. Make item use and item gossip hooks to be able to return false to stop spell casting.

This commit is contained in:
Rochet2
2014-06-27 22:15:30 +03:00
committed by Foereaper
parent 1591e7a40d
commit 0f8f37678d
5 changed files with 55 additions and 16 deletions

View File

@@ -853,8 +853,8 @@ namespace LuaUnit
/*
int GetVehicle(lua_State* L, Unit* unit)
{
Eluna::Push(L, unit->GetVehicle());
return 1;
Eluna::Push(L, unit->GetVehicle());
return 1;
}
*/
@@ -1478,7 +1478,10 @@ namespace LuaUnit
case 3:
spellType = CURRENT_AUTOREPEAT_SPELL;
break;
default:
return luaL_argerror(L, 2, "valid CurrentSpellTypes expected");
}
unit->InterruptSpell((CurrentSpellTypes)spellType, delayed);
return 0;
}