Browse Source

fixed lua stack

image 4 years ago
parent
commit
36ff32c676
1 changed files with 4 additions and 0 deletions
  1. 4 0
      EQ2/source/WorldServer/SpellProcess.cpp

+ 4 - 0
EQ2/source/WorldServer/SpellProcess.cpp

@@ -493,6 +493,8 @@ bool SpellProcess::CastInstant(Spell* spell, Entity* caster, Entity* target, boo
 			else
 				lua_interface->ResetFunctionStack(lua_spell->state);
 		}
+		else
+			lua_interface->ResetFunctionStack(lua_spell->state);
 	}
 
 	caster->GetZone()->SendCastSpellPacket(lua_spell, caster);
@@ -890,6 +892,8 @@ void SpellProcess::ProcessSpell(ZoneServer* zone, Spell* spell, Entity* caster,
 				else
 					lua_interface->ResetFunctionStack(lua_spell->state);
 			}
+			else
+				lua_interface->ResetFunctionStack(lua_spell->state);
 		}
 
 		//If this spell is the toggle cast type and is being toggled off, do this now