Explorar o código

Fix for borked update.

Devn00b hai 6 meses
pai
achega
3dc24b0d9f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      EQ2/source/WorldServer/LuaFunctions.cpp

+ 2 - 2
EQ2/source/WorldServer/LuaFunctions.cpp

@@ -2566,7 +2566,7 @@ int EQ2Emu_lua_RemoveSpellBonus(lua_State* state) {
 		ZoneServer* zone = nullptr;
 		if (luaspell->caster != nullptr)
 			zone = luaspell->caster->GetZone();
-		if(!zone) {
+		if(!zone && spawn) {
 			zone = spawn->GetZone(); // workaround to try to establish a zone to find the targets and remove the spells
 		}
 		Spawn* target = 0;
@@ -3659,7 +3659,7 @@ int EQ2Emu_lua_HasQuest(lua_State* state) {
 	}
 	int32 quest_id = lua_interface->GetInt32Value(state, 2);
 	if (quest_id > 0) {
-		lua_interface->SetBooleanValue(state, (((Player*)player)->HasActiveQuest(quest_id) > 0));
+		lua_interface->SetBooleanValue(state, (((Player*)player)->HasActiveQuest(quest_id) == TRUE));
 		return 1;
 	} else {
 		lua_interface->LogError("%s: LUA HasQuest command error: quest_id is not valid", lua_interface->GetScriptName(state));