aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGacko <gacko28@gmx.de>2014-12-01 17:20:41 +0100
committerGacko <gacko28@gmx.de>2014-12-01 17:21:18 +0100
commit05913b82084ed2b640c7e44e7a55bdb7b797ca5c (patch)
tree6df36969c4743ad01e5fba24bbba6ff28f46f9f5 /src
parent44cede7684e0fe0c224ab61d1a8efe776fadcc1a (diff)
Core/Game: Fix several warnings about wrong data types
Diffstat (limited to 'src')
-rw-r--r--src/server/game/DataStores/DB2Structure.h2
-rw-r--r--src/server/game/DataStores/DBCStructure.h2
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp2
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp2
-rw-r--r--src/server/game/Spells/Spell.cpp14
-rw-r--r--src/server/game/Spells/SpellEffects.cpp2
6 files changed, 12 insertions, 12 deletions
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index dbd9f3ff1d8..e720017b09d 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -380,4 +380,4 @@ typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
typedef uint8 TaxiMask[TaxiMaskSize];
typedef std::unordered_map<uint32, std::set<uint32>> PhaseGroupContainer;
-#endif \ No newline at end of file
+#endif
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 0c83b13a5bb..f6727221cd9 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -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
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 2b13c859255..bb8ebfe1567 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -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));
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 05f600e1207..f7e6ae9349f 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -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))
{
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 8583d055123..714284651b2 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -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;
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 98de817e7a3..eb4d0ad49de 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -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);
}