Core/ObjectMgr: Refactor sCreatureStorage
This commit is contained in:
@@ -1942,7 +1942,7 @@ bool Player::BuildEnumData(QueryResult result, WorldPacket* data)
|
||||
if (result && !(playerFlags & PLAYER_FLAGS_GHOST) && (plrClass == CLASS_WARLOCK || plrClass == CLASS_HUNTER || plrClass == CLASS_DEATH_KNIGHT))
|
||||
{
|
||||
uint32 entry = fields[16].GetUInt32();
|
||||
CreatureInfo const* creatureInfo = ObjectMgr::GetCreatureTemplate(entry);
|
||||
CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(entry);
|
||||
if (creatureInfo)
|
||||
{
|
||||
petDisplayId = fields[17].GetUInt32();
|
||||
@@ -15701,7 +15701,7 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count)
|
||||
UpdateForQuestWorldObjects();
|
||||
}
|
||||
|
||||
void Player::KilledMonster(CreatureInfo const* cInfo, uint64 guid)
|
||||
void Player::KilledMonster(CreatureTemplate const* cInfo, uint64 guid)
|
||||
{
|
||||
if (cInfo->Entry)
|
||||
KilledMonsterCredit(cInfo->Entry, guid);
|
||||
@@ -15814,7 +15814,7 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
|
||||
reqTarget = qInfo->ReqCreatureOrGOId[j];
|
||||
if (reqTarget != entry) // if entry doesn't match, check for killcredits referenced in template
|
||||
{
|
||||
CreatureInfo const *cinfo = ObjectMgr::GetCreatureTemplate(entry);
|
||||
CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(entry);
|
||||
for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
|
||||
if (cinfo->KillCredit[i] == reqTarget)
|
||||
entry = cinfo->KillCredit[i];
|
||||
@@ -23533,7 +23533,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
||||
if (!talentTabInfo)
|
||||
return;
|
||||
|
||||
CreatureInfo const *ci = pet->GetCreatureInfo();
|
||||
CreatureTemplate const *ci = pet->GetCreatureInfo();
|
||||
|
||||
if (!ci)
|
||||
return;
|
||||
@@ -23787,7 +23787,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data)
|
||||
|
||||
data->put<uint32>(pointsPos, unspentTalentPoints); // put real points
|
||||
|
||||
CreatureInfo const *ci = pet->GetCreatureInfo();
|
||||
CreatureTemplate const *ci = pet->GetCreatureInfo();
|
||||
if (!ci)
|
||||
return;
|
||||
|
||||
|
||||
@@ -1428,7 +1428,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
void GroupEventHappens(uint32 questId, WorldObject const* pEventObject);
|
||||
void ItemAddedQuestCheck(uint32 entry, uint32 count);
|
||||
void ItemRemovedQuestCheck(uint32 entry, uint32 count);
|
||||
void KilledMonster(CreatureInfo const* cInfo, uint64 guid);
|
||||
void KilledMonster(CreatureTemplate const* cInfo, uint64 guid);
|
||||
void KilledMonsterCredit(uint32 entry, uint64 guid);
|
||||
void CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id);
|
||||
void TalkedToCreature(uint32 entry, uint64 guid);
|
||||
|
||||
Reference in New Issue
Block a user