#563 LuaInterface::GetCurrentSpell

已關閉
image5 月之前創建 · 1 條評論
image commented 5 月之前

GetCurrentSpell is used in a number of LUA functions to map out the luaspell the lua_state belongs to.. Unfortunately it is not reliable as it looks like SpawnScripts somehow map a state the same as a luaspell (that does not exist or was deleted). Need to keep this in mind when we have crashes on SetMaxHP or similar lua functions that allow usage in a spell (addspellbonus) and spawn script.. The AddSpellBonus is the cause of the crash because the spell is invalid.

GetCurrentSpell is used in a number of LUA functions to map out the luaspell the lua_state belongs to.. Unfortunately it is not reliable as it looks like SpawnScripts somehow map a state the same as a luaspell (that does not exist or was deleted). Need to keep this in mind when we have crashes on SetMaxHP or similar lua functions that allow usage in a spell (addspellbonus) and spawn script.. The AddSpellBonus is the cause of the crash because the spell is invalid.
image commented 2 月之前
協同者

Looks like this previous event may have been caused by /reload spells being called

LuaInterface::DestroySpells did not have the spell state removed (so it kept an old stale state of a previous spell already deleted).

Looks like this previous event may have been caused by /reload spells being called LuaInterface::DestroySpells did not have the spell state removed (so it kept an old stale state of a previous spell already deleted).
image2 月之前 關閉
Sign in to join this conversation.
正在加載...
取消
保存
尚未有任何內容