浏览代码

fixed crash with threat transfer

image 4 年之前
父节点
当前提交
0082debfed
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      EQ2/source/WorldServer/Combat.cpp

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

@@ -997,7 +997,7 @@ void Entity::AddHate(Entity* attacker, sint32 hate) {
 	if (attacker->GetThreatTransfer() && hate > 0) {
 		Spawn* transfer_target = (Entity*)GetZone()->GetSpawnByID(attacker->GetThreatTransfer()->Target);
 		if (transfer_target && transfer_target->IsEntity()) {
-			sint32 transfered_hate = hate * (GetThreatTransfer()->Amount / 100);
+			sint32 transfered_hate = hate * (attacker->GetThreatTransfer()->Amount / 100);
 			hate -= transfered_hate;
 			this->AddHate((Entity*)transfer_target, transfered_hate);
 		}