Browse Source

fixed crash with threat transfer

image 1 year ago
parent
commit
0082debfed
1 changed files with 1 additions and 1 deletions
  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);
 		}