Core/Quests: Change Player::KilledMonster arguments to take Creature directly
Port From (https://github.com/TrinityCore/TrinityCore/commit/49699bc966e4543044da7f1fd75d57fbebfac4e4)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user