Просмотр исходного кода

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

Fix #73
Image 4 лет назад
Родитель
Сommit
10f923c29e
1 измененных файлов с 4 добавлено и 0 удалено
  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__);