mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Quests: Change Player::KilledMonster arguments to take Creature directly
This commit is contained in:
@@ -183,7 +183,7 @@ inline void KillRewarder::_RewardKillCredit(Player* player)
|
||||
{
|
||||
if (Creature* target = _victim->ToCreature())
|
||||
{
|
||||
player->KilledMonster(target->GetCreatureTemplate(), target->GetGUID());
|
||||
player->KilledMonster(target);
|
||||
player->UpdateCriteria(CriteriaType::KillAnyCreature, target->GetCreatureType(), 1, 0, target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16655,12 +16655,13 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 /*count*/)
|
||||
UpdateVisibleObjectInteractions(true, false, false, true);
|
||||
}
|
||||
|
||||
void Player::KilledMonster(CreatureTemplate const* cInfo, ObjectGuid guid)
|
||||
void Player::KilledMonster(Creature const* creature)
|
||||
{
|
||||
ASSERT(cInfo);
|
||||
ASSERT(creature);
|
||||
|
||||
if (cInfo->Entry)
|
||||
KilledMonsterCredit(cInfo->Entry, guid);
|
||||
CreatureTemplate const* cInfo = creature->GetCreatureTemplate();
|
||||
|
||||
KilledMonsterCredit(cInfo->Entry, creature->GetGUID());
|
||||
|
||||
for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
|
||||
if (cInfo->KillCredit[i])
|
||||
|
||||
@@ -1715,7 +1715,7 @@ class TC_GAME_API Player final : public Unit, public GridObject<Player>
|
||||
void GroupEventHappens(uint32 questId, WorldObject const* pEventObject);
|
||||
void ItemAddedQuestCheck(uint32 entry, uint32 count, Optional<bool> boundItemFlagRequirement = {}, bool* hadBoundItemObjective = nullptr);
|
||||
void ItemRemovedQuestCheck(uint32 entry, uint32 count);
|
||||
void KilledMonster(CreatureTemplate const* cInfo, ObjectGuid guid);
|
||||
void KilledMonster(Creature const* creature);
|
||||
void KilledMonsterCredit(uint32 entry, ObjectGuid guid = ObjectGuid::Empty);
|
||||
void KilledPlayerCredit(ObjectGuid victimGuid);
|
||||
void KillCreditGO(uint32 entry, ObjectGuid guid = ObjectGuid::Empty);
|
||||
|
||||
Reference in New Issue
Block a user