Browse Source

Fix Attack limited to just player targets

Emagi 1 year ago
parent
commit
b1c08ef4ad
1 changed files with 1 additions and 1 deletions
  1. 1 1
      EQ2/source/WorldServer/LuaFunctions.cpp

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

@@ -4881,7 +4881,7 @@ int EQ2Emu_lua_Attack(lua_State* state) {
 		Spawn* npc = lua_interface->GetSpawn(state);
 		Spawn* player = lua_interface->GetSpawn(state, 2);
 		lua_interface->ResetFunctionStack(state);
-		if (npc && player && npc->IsNPC() && player->IsPlayer())
+		if (npc && player && npc->IsNPC() && player->IsEntity())
 			((NPC*)npc)->AddHate((Entity*)player, 100);
 	}
 	return 0;