Allow player-created temporary summons (quest "helper" NPCs summoned by item etc.) to contribute to the 50% player damage requirement.

Fixes quests such as "Valduran the Stormborn" (12984) or "The Air Stands Still" (13125) which previously required the player to out-damage the "helper" NPC to get credit.
This commit is contained in:
treeston committed 2015-09-09 18:47:50 +02:00
1 parent 6cdfe9dc09
commit 946fdbc06b
1 file changed
+1 -1
+1 -1
View File
@@ -721,7 +721,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
if (!victim->ToCreature()->hasLootRecipient())
victim->ToCreature()->SetLootRecipient(this);
if (IsControlledByPlayer())
if (IsControlledByPlayer() || (ToTempSummon() && ToTempSummon()->GetSummoner() && ToTempSummon()->GetSummoner()->GetTypeId() == TYPEID_PLAYER))
victim->ToCreature()->LowerPlayerDamageReq(health < damage ? health : damage);
}