Ver código fonte

Hate aggro is ignored when NPC returns home, despite damage impacting mob

Fix #73
Image 4 anos atrás
pai
commit
10f923c29e
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      EQ2/source/WorldServer/NPC_AI.cpp

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

@@ -168,6 +168,10 @@ sint32 Brain::GetHate(Entity* entity) {
 }
 
 void Brain::AddHate(Entity* entity, sint32 hate) {
+	// do not aggro when running back, despite taking damage
+	if (m_body->IsNPC() && ((NPC*)m_body)->m_runningBack)
+		return;
+
 	// Lock the hate list, we are altering the list so use write lock
 	MHateList.writelock(__FUNCTION__, __LINE__);