Core/Quests: Change Player::KilledMonster arguments to take Creature directly

Port From (https://github.com/TrinityCore/TrinityCore/commit/49699bc966e4543044da7f1fd75d57fbebfac4e4)
This commit is contained in:
Hondacrx
2025-02-23 13:13:57 -05:00
parent a3c1533265
commit 3a2439ba15
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ namespace Game.Entities
Creature target = _victim.ToCreature();
if (target != null)
{
player.KilledMonster(target.GetCreatureTemplate(), target.GetGUID());
player.KilledMonster(target);
player.UpdateCriteria(CriteriaType.KillAnyCreature, (ulong)target.GetCreatureType(), 1, 0, target);
}
}
+5 -4
View File
@@ -2528,12 +2528,13 @@ namespace Game.Entities
UpdateVisibleObjectInteractions(true, false, false, true);
}
public void KilledMonster(CreatureTemplate cInfo, ObjectGuid guid)
public void KilledMonster(Creature creature)
{
Cypher.Assert(cInfo != null);
Cypher.Assert(creature != null);
if (cInfo.Entry != 0)
KilledMonsterCredit(cInfo.Entry, guid);
CreatureTemplate cInfo = creature.GetCreatureTemplate();
KilledMonsterCredit(cInfo.Entry, creature.GetGUID());
for (byte i = 0; i < 2; ++i)
if (cInfo.KillCredit[i] != 0)