Merge remote branch 'origin/master' into 330

This commit is contained in:
tomrus88 2009-11-10 17:35:09 +03:00
commit 3def8fa353
134 changed files with 1751 additions and 2300 deletions

View file

@ -147,7 +147,7 @@ void PlayerMenu::SendGossipMenu( uint32 TitleTextId, uint64 npcGUID )
{
QuestMenuItem const& qItem = mQuestMenu.GetItem(iI);
uint32 questID = qItem.m_qId;
Quest const* pQuest = objmgr.GetQuestTemplate(questID);
Quest const* pQuest = sObjectMgr.GetQuestTemplate(questID);
data << uint32(questID);
data << uint32(qItem.m_qIcon);
@ -157,7 +157,7 @@ void PlayerMenu::SendGossipMenu( uint32 TitleTextId, uint64 npcGUID )
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
QuestLocale const *ql = objmgr.GetQuestLocale(questID);
QuestLocale const *ql = sObjectMgr.GetQuestLocale(questID);
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@ -195,7 +195,7 @@ void PlayerMenu::SendPointOfInterest( float X, float Y, uint32 Icon, uint32 Flag
void PlayerMenu::SendPointOfInterest( uint32 poi_id )
{
PointOfInterest const* poi = objmgr.GetPointOfInterest(poi_id);
PointOfInterest const* poi = sObjectMgr.GetPointOfInterest(poi_id);
if(!poi)
{
sLog.outErrorDb("Requested send not existed POI (Id: %u), ignore.",poi_id);
@ -207,7 +207,7 @@ void PlayerMenu::SendPointOfInterest( uint32 poi_id )
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
PointOfInterestLocale const *pl = objmgr.GetPointOfInterestLocale(poi_id);
PointOfInterestLocale const *pl = sObjectMgr.GetPointOfInterestLocale(poi_id);
if (pl)
{
if (pl->IconName.size() > size_t(loc_idx) && !pl->IconName[loc_idx].empty())
@ -229,7 +229,7 @@ void PlayerMenu::SendPointOfInterest( uint32 poi_id )
void PlayerMenu::SendTalking( uint32 textID )
{
GossipText const* pGossip = objmgr.GetGossipText(textID);
GossipText const* pGossip = sObjectMgr.GetGossipText(textID);
WorldPacket data( SMSG_NPC_TEXT_UPDATE, 100 ); // guess size
data << textID; // can be < 0
@ -261,7 +261,7 @@ void PlayerMenu::SendTalking( uint32 textID )
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
NpcTextLocale const *nl = objmgr.GetNpcTextLocale(textID);
NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textID);
if (nl)
{
for (int i=0;i<8;++i)
@ -340,7 +340,7 @@ QuestMenu::~QuestMenu()
void QuestMenu::AddMenuItem( uint32 QuestId, uint8 Icon)
{
Quest const* qinfo = objmgr.GetQuestTemplate(QuestId);
Quest const* qinfo = sObjectMgr.GetQuestTemplate(QuestId);
if (!qinfo) return;
ASSERT( m_qItems.size() <= GOSSIP_MAX_MENU_ITEMS );
@ -384,14 +384,14 @@ void PlayerMenu::SendQuestGiverQuestList( QEmote eEmote, const std::string& Titl
QuestMenuItem const& qmi = mQuestMenu.GetItem(iI);
uint32 questID = qmi.m_qId;
Quest const *pQuest = objmgr.GetQuestTemplate(questID);
Quest const *pQuest = sObjectMgr.GetQuestTemplate(questID);
std::string title = pQuest ? pQuest->GetTitle() : "";
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
if(QuestLocale const *ql = objmgr.GetQuestLocale(questID))
if(QuestLocale const *ql = sObjectMgr.GetQuestLocale(questID))
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
title=ql->Title[loc_idx];
@ -427,7 +427,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
QuestLocale const *ql = objmgr.GetQuestLocale(pQuest->GetQuestId());
QuestLocale const *ql = sObjectMgr.GetQuestLocale(pQuest->GetQuestId());
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@ -470,7 +470,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
if ( !pQuest->RewChoiceItemId[i] ) continue;
data << uint32(pQuest->RewChoiceItemId[i]);
data << uint32(pQuest->RewChoiceItemCount[i]);
IProto = objmgr.GetItemPrototype(pQuest->RewChoiceItemId[i]);
IProto = ObjectMgr::GetItemPrototype(pQuest->RewChoiceItemId[i]);
if ( IProto )
data << uint32(IProto->DisplayInfoID);
else
@ -483,7 +483,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
if ( !pQuest->RewItemId[i] ) continue;
data << uint32(pQuest->RewItemId[i]);
data << uint32(pQuest->RewItemCount[i]);
IProto = objmgr.GetItemPrototype(pQuest->RewItemId[i]);
IProto = ObjectMgr::GetItemPrototype(pQuest->RewItemId[i]);
if ( IProto )
data << uint32(IProto->DisplayInfoID);
else
@ -538,7 +538,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
QuestLocale const *ql = objmgr.GetQuestLocale(pQuest->GetQuestId());
QuestLocale const *ql = sObjectMgr.GetQuestLocale(pQuest->GetQuestId());
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@ -676,7 +676,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
QuestLocale const *ql = objmgr.GetQuestLocale(pQuest->GetQuestId());
QuestLocale const *ql = sObjectMgr.GetQuestLocale(pQuest->GetQuestId());
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@ -716,7 +716,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->GetRewChoiceItemsCount());
for (uint32 i=0; i < pQuest->GetRewChoiceItemsCount(); ++i)
{
pItem = objmgr.GetItemPrototype( pQuest->RewChoiceItemId[i] );
pItem = ObjectMgr::GetItemPrototype( pQuest->RewChoiceItemId[i] );
data << uint32(pQuest->RewChoiceItemId[i]);
data << uint32(pQuest->RewChoiceItemCount[i]);
@ -730,7 +730,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->GetRewItemsCount());
for (uint16 i=0; i < pQuest->GetRewItemsCount(); ++i)
{
pItem = objmgr.GetItemPrototype(pQuest->RewItemId[i]);
pItem = ObjectMgr::GetItemPrototype(pQuest->RewItemId[i]);
data << uint32(pQuest->RewItemId[i]);
data << uint32(pQuest->RewItemCount[i]);
@ -778,7 +778,7 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
int loc_idx = pSession->GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
QuestLocale const *ql = objmgr.GetQuestLocale(pQuest->GetQuestId());
QuestLocale const *ql = sObjectMgr.GetQuestLocale(pQuest->GetQuestId());
if (ql)
{
if (ql->Title.size() > loc_idx && !ql->Title[loc_idx].empty())
@ -824,7 +824,7 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
{
if ( !pQuest->ReqItemId[i] )
continue;
pItem = objmgr.GetItemPrototype(pQuest->ReqItemId[i]);
pItem = ObjectMgr::GetItemPrototype(pQuest->ReqItemId[i]);
data << uint32(pQuest->ReqItemId[i]);
data << uint32(pQuest->ReqItemCount[i]);