Core/Game: Fix several warnings about wrong data types
This commit is contained in:
@@ -380,4 +380,4 @@ typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
|
||||
typedef uint8 TaxiMask[TaxiMaskSize];
|
||||
|
||||
typedef std::unordered_map<uint32, std::set<uint32>> PhaseGroupContainer;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -647,7 +647,7 @@ struct BarberShopStyleEntry
|
||||
struct BattlemasterListEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
uint32 MapID[16]; // 1-16 mapid
|
||||
int32 MapID[16]; // 1-16 mapid
|
||||
uint32 InstanceType; // 17 map type (3 - BG, 4 - arena)
|
||||
//uint32 GroupsAllowed; // 18 (0 or 1)
|
||||
char* Name_lang; // 19
|
||||
|
||||
@@ -2150,7 +2150,7 @@ void GameObject::SetTransportState(GOState state, uint32 stopFrame /*= 0*/)
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(state < GO_STATE_TRANSPORT_STOPPED + MAX_GO_STATE_TRANSPORT_STOP_FRAMES);
|
||||
ASSERT(state < GOState(GO_STATE_TRANSPORT_STOPPED + MAX_GO_STATE_TRANSPORT_STOP_FRAMES));
|
||||
ASSERT(stopFrame < m_goValue.Transport.StopFrames->size());
|
||||
m_goValue.Transport.PathProgress = getMSTime() + m_goValue.Transport.StopFrames->at(stopFrame);
|
||||
SetGoState(GOState(GO_STATE_TRANSPORT_STOPPED + stopFrame));
|
||||
|
||||
@@ -153,7 +153,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
||||
|
||||
if (pUser->IsInCombat())
|
||||
{
|
||||
for (int i = 0; i < proto->Effects.size(); ++i)
|
||||
for (uint32 i = 0; i < proto->Effects.size(); ++i)
|
||||
{
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(proto->Effects[i].SpellID))
|
||||
{
|
||||
|
||||
@@ -4301,7 +4301,7 @@ void Spell::TakeCastItem()
|
||||
bool expendable = false;
|
||||
bool withoutCharges = false;
|
||||
|
||||
for (int i = 0; i < proto->Effects.size(); ++i)
|
||||
for (uint32 i = 0; i < proto->Effects.size(); ++i)
|
||||
{
|
||||
// item has limited charges
|
||||
if (proto->Effects[i].Charges)
|
||||
@@ -4573,7 +4573,7 @@ void Spell::TakeReagents()
|
||||
// if CastItem is also spell reagent
|
||||
if (castItemTemplate && castItemTemplate->ItemId == itemid)
|
||||
{
|
||||
for (int s = 0; s < castItemTemplate->Effects.size(); ++s)
|
||||
for (uint32 s = 0; s < castItemTemplate->Effects.size(); ++s)
|
||||
{
|
||||
// CastItem will be used up and does not count as reagent
|
||||
int32 charges = m_CastItem->GetSpellCharges(s);
|
||||
@@ -6286,15 +6286,15 @@ SpellCastResult Spell::CheckItems()
|
||||
case SPELL_EFFECT_CREATE_MANA_GEM:
|
||||
{
|
||||
uint32 item_id = m_spellInfo->Effects[i].ItemType;
|
||||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item_id);
|
||||
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item_id);
|
||||
|
||||
if (!pProto)
|
||||
if (!proto)
|
||||
return SPELL_FAILED_ITEM_AT_MAX_CHARGES;
|
||||
|
||||
if (Item* pitem = player->GetItemByEntry(item_id))
|
||||
if (Item* item = player->GetItemByEntry(item_id))
|
||||
{
|
||||
for (int x = 0; x < pProto->Effects.size(); ++x)
|
||||
if (pProto->Effects[x].Charges != 0 && pitem->GetSpellCharges(x) == pProto->Effects[x].Charges)
|
||||
for (uint32 x = 0; x < proto->Effects.size(); ++x)
|
||||
if (proto->Effects[x].Charges != 0 && item->GetSpellCharges(x) == proto->Effects[x].Charges)
|
||||
return SPELL_FAILED_ITEM_AT_MAX_CHARGES;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -5640,7 +5640,7 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/)
|
||||
|
||||
if (Item* pItem = player->GetItemByEntry(item_id))
|
||||
{
|
||||
for (int x = 0; x < pProto->Effects.size(); ++x)
|
||||
for (uint32 x = 0; x < pProto->Effects.size(); ++x)
|
||||
pItem->SetSpellCharges(x, pProto->Effects[x].Charges);
|
||||
pItem->SetState(ITEM_CHANGED, player);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user