Core/Cleanup:
* move repeating code into separate method for storing locale strings in ObjectMgr (copy/paste sucks, you know) * fix 'signed/unsigned' warnings (at least in VS) * fix some other warnings and cleanup relative code --HG-- branch : trunk
This commit is contained in:
@@ -15518,15 +15518,15 @@ bool Player::HasQuestForItem(uint32 itemid) const
|
||||
ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(itemid);
|
||||
|
||||
// 'unique' item
|
||||
if (pProto->MaxCount && GetItemCount(itemid,true) < pProto->MaxCount)
|
||||
if (pProto->MaxCount && int32(GetItemCount(itemid, true)) < pProto->MaxCount)
|
||||
return true;
|
||||
|
||||
// allows custom amount drop when not 0
|
||||
if (qinfo->ReqSourceCount[j])
|
||||
{
|
||||
if (GetItemCount(itemid,true) < qinfo->ReqSourceCount[j])
|
||||
if (GetItemCount(itemid, true) < qinfo->ReqSourceCount[j])
|
||||
return true;
|
||||
} else if (GetItemCount(itemid,true) < pProto->Stackable)
|
||||
} else if (int32(GetItemCount(itemid, true)) < pProto->Stackable)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -15614,13 +15614,9 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
|
||||
int loc_idx = pReceiver->GetSession()->GetSessionDbLocaleIndex();
|
||||
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
if (const QuestLocale* pLocale = sObjectMgr.GetQuestLocale(pQuest->GetQuestId()))
|
||||
{
|
||||
if (pLocale->Title.size() > loc_idx && !pLocale->Title[loc_idx].empty())
|
||||
if (int(pLocale->Title.size()) > loc_idx && !pLocale->Title[loc_idx].empty())
|
||||
strTitle = pLocale->Title[loc_idx];
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_QUEST_CONFIRM_ACCEPT, (4 + strTitle.size() + 8));
|
||||
data << uint32(pQuest->GetQuestId());
|
||||
|
||||
Reference in New Issue
Block a user