浏览代码

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

Fix #73
Image 4 年之前
父节点
当前提交
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__);