Merge commit 'origin/master' into 330

This commit is contained in:
tomrus88 2009-10-22 18:50:58 +04:00
commit e7c56a0f45
29 changed files with 283 additions and 293 deletions

View file

@ -2079,7 +2079,7 @@ Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
return NULL;
// exist (we need look pets also for some interaction (quest/etc)
Creature *unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
Creature *unit = GetMap()->GetCreatureOrPetOrVehicle(guid);
if (!unit)
return NULL;
@ -12159,8 +12159,7 @@ void Player::PrepareQuestMenu( uint64 guid )
QuestRelations* pObjectQIR;
// pets also can have quests
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, guid);
if( pCreature )
if (Creature *pCreature = GetMap()->GetCreatureOrPetOrVehicle(guid))
{
pObject = (Object*)pCreature;
pObjectQR = &objmgr.mCreatureQuestRelations;
@ -12254,8 +12253,7 @@ void Player::SendPreparedQuest(uint64 guid)
std::string title = "";
// need pet case for some quests
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
if (pCreature)
if (Creature *pCreature = GetMap()->GetCreatureOrPetOrVehicle(guid))
{
uint32 textid = pCreature->GetNpcTextId();
GossipText const* gossiptext = objmgr.GetGossipText(textid);
@ -12318,8 +12316,7 @@ Quest const * Player::GetNextQuest( uint64 guid, Quest const *pQuest )
QuestRelations* pObjectQR;
QuestRelations* pObjectQIR;
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
if( pCreature )
if (Creature *pCreature = GetMap()->GetCreatureOrPetOrVehicle(guid))
{
pObject = (Object*)pCreature;
pObjectQR = &objmgr.mCreatureQuestRelations;
@ -18831,7 +18828,7 @@ void Player::UpdateForQuestWorldObjects()
}
else if(IS_CREATURE_GUID(*itr) || IS_VEHICLE_GUID(*itr))
{
Creature *obj = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, *itr);
Creature *obj = GetMap()->GetCreatureOrPetOrVehicle(*itr);
if(!obj)
continue;