mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user