Parcourir la source

fixed crash with threat transfer

image il y a 4 ans
Parent
commit
0082debfed
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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);
 		}