소스 검색

if spell state is null don't process spell

Fix #226 - should mitigate at the very least, help us identify why this is happening
Image 3 년 전
부모
커밋
287307c397
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      EQ2/source/WorldServer/SpellProcess.cpp

+ 5 - 1
EQ2/source/WorldServer/SpellProcess.cpp

@@ -429,7 +429,11 @@ bool SpellProcess::DeleteCasterSpell(LuaSpell* spell, string reason){
 
 bool SpellProcess::ProcessSpell(LuaSpell* spell, bool first_cast, const char* function, SpellScriptTimer* timer) {
 	bool ret = false;
-	if(lua_interface && !spell->interrupted){
+	if(!spell->state)
+	{
+		LogWrite(SPELL__ERROR, 0, "Spell", "Error: State is NULL!  SpellProcess::ProcessSpell for Spell '%s'", (spell->spell != nullptr) ? spell->spell->GetName() : "Unknown");
+	}
+	else if(lua_interface && !spell->interrupted){
 		lua_interface->AddSpawnPointers(spell, first_cast, false, function, timer);
 		vector<LUAData*>* data = spell->spell->GetLUAData();
 		for(int32 i=0;i<data->size();i++){