Browse Source

Update LuaInterface.cpp

Image 4 years ago
parent
commit
9f92e1f5f1
1 changed files with 6 additions and 2 deletions
  1. 6 2
      EQ2/source/WorldServer/LuaInterface.cpp

+ 6 - 2
EQ2/source/WorldServer/LuaInterface.cpp

@@ -512,7 +512,11 @@ void LuaInterface::AddSpawnPointers(LuaSpell* spell, bool first_cast, bool preca
 		SetSpawnValue(spell->state, temp_spawn);
 		SetSpawnValue(spell->state, temp_spawn);
 	else {
 	else {
 		if(spell->caster && spell->initial_target)
 		if(spell->caster && spell->initial_target)
-			SetSpawnValue(spell->state, spell->caster->GetZone()->GetSpawnByID(spell->initial_target));
+		{
+			// easier to debug target id as ptr
+			Spawn* new_target = spell->caster->GetZone()->GetSpawnByID(spell->initial_target);
+			SetSpawnValue(spell->state, new_target);
+		}
 		else if(spell->caster && spell->caster->GetTarget())
 		else if(spell->caster && spell->caster->GetTarget())
 			SetSpawnValue(spell->state, spell->caster->GetTarget());
 			SetSpawnValue(spell->state, spell->caster->GetTarget());
 		else
 		else
@@ -2063,4 +2067,4 @@ LUASpellWrapper::LUASpellWrapper() {
 
 
 bool LUASpellWrapper::IsSpell() {
 bool LUASpellWrapper::IsSpell() {
 	return true;
 	return true;
-}
+}