Permalink
Browse files

Fix warnings.

-- Quriq
  • Loading branch information...
1 parent 84cc8e8 commit 703f6b1e22e8e1c28941ab3999c54a17b7cf95f1 Quriq committed Oct 16, 2011
View
@@ -808,7 +808,7 @@ Unit* BSWScriptedAI::_doSelect(uint32 SpellID, bool spellsearchtype, float range
_list.push_back((Unit*)player);
}
- debug_log("BSW: search random player with criteria = %u, found %u players.",SpellID,_list.size());
+ debug_log("BSW: search random player with criteria = %u, found %u players.",SpellID,(unsigned int)(_list.size()));
if (_list.empty()) return NULL;
else return _list[urand(0,_list.size() - 1)];
@@ -866,4 +866,4 @@ bool BSWScriptedAI::_isDifficultyInMask(uint8 mask)
return ((uint8)currentDifficulty & mask);
};
-#endif
+#endif
@@ -282,7 +282,7 @@ CreatureAI* GetAI_npc_sa_vendor(Creature* pCreature)
bool GossipHello_npc_sa_vendor(Player* pPlayer, Creature* pCreature)
{
- uint8 gyd = NULL;
+ uint8 gyd = 0;
if (pCreature->GetEntry() == 29260)
gyd = 0;
if (pCreature->GetEntry() == 29262)
@@ -312,7 +312,7 @@ bool GossipSelect_npc_sa_vendor(Player* pPlayer, Creature* pCreature, uint32 uiS
{
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
- uint8 gyd = NULL;
+ uint8 gyd = 0;
if (pCreature->GetEntry() == 29260)
gyd = 0;
if (pCreature->GetEntry() == 29262)
@@ -469,4 +469,4 @@ void AddSC_battlegroundSA()
pNewScript->Name="go_sa_bomb";
pNewScript->pGOUse = &GOHello_go_sa_bomb;
pNewScript->RegisterSelf();
-}
+}
@@ -439,7 +439,7 @@ struct MANGOS_DLL_DECL mob_ilsaAI : public ScriptedAI
if (m_pBrewed = m_creature->GetMap()->GetPlayer(pTarget->GetObjectGuid()))
{
ItemPosCountVec dest;
- uint8 msg = m_pBrewed->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_BREWMAIDEN_BREW, 1, false);
+ uint8 msg = m_pBrewed->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_BREWMAIDEN_BREW, 1, NULL);
if (msg == EQUIP_ERR_OK)
{
m_pBrewed->StoreNewItem(dest, ITEM_BREWMAIDEN_BREW, 1, true);
@@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL npc_flynn_firebrew : public ScriptedAI
return;
ItemPosCountVec dest;
- uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_PORTABLE_KEG, 1, false);
+ uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_PORTABLE_KEG, 1, NULL);
if (msg == EQUIP_ERR_OK)
{
pPlayer->StoreNewItem(dest, ITEM_PORTABLE_KEG, 1, true);
@@ -1766,11 +1766,11 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
if (Creature* pTemp = m_creature->GetMap()->GetCreature(uiRayneGUID))
pTemp->SetDeathState(JUST_DIED);
- uiTirionGUID = NULL;
- uiKorfaxGUID = NULL;
- uiMaxwellGUID = NULL;
- uiEligorGUID = NULL;
- uiRayneGUID = NULL;
+ uiTirionGUID = 0;
+ uiKorfaxGUID = 0;
+ uiMaxwellGUID = 0;
+ uiEligorGUID = 0;
+ uiRayneGUID = 0;
for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
{
@@ -1794,10 +1794,10 @@ struct MANGOS_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
if (Creature* pTemp = m_creature->GetMap()->GetCreature(uiLichKingGUID))
pTemp->SetDeathState(JUST_DIED);
- uiKoltiraGUID = NULL;
- uiOrbazGUID = NULL;
- uiThassarianGUID = NULL;
- uiLichKingGUID = NULL;
+ uiKoltiraGUID = 0;
+ uiOrbazGUID = 0;
+ uiThassarianGUID = 0;
+ uiLichKingGUID = 0;
for(uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
{
if (Creature* pTemp = m_creature->GetMap()->GetCreature(uiAbominationGUID[i]))
@@ -4044,4 +4044,4 @@ void AddSC_ebon_hold()
pNewScript->Name = "npc_crusade_persuaded";
pNewScript->GetAI = &GetAI_npc_crusade_persuaded;
pNewScript->RegisterSelf();
-}
+}
@@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL npc_bok_dropcertain : public ScriptedAI
return;
ItemPosCountVec dest;
- uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_PORTABLE_KEG, 1, false);
+ uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_PORTABLE_KEG, 1, NULL);
if (msg == EQUIP_ERR_OK)
{
pPlayer->StoreNewItem(dest, ITEM_PORTABLE_KEG, 1, true);
@@ -768,7 +768,7 @@ bool GossipSelect_npc_jack_adams(Player* pPlayer, Creature* pCreature, uint32 ui
{
pPlayer->CLOSE_GOSSIP_MENU();
ItemPosCountVec dest;
- uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_JACK_ADAMS_DEBT, 1, false);
+ uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_JACK_ADAMS_DEBT, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_JACK_ADAMS_DEBT, 1, true);
pCreature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
@@ -826,7 +826,7 @@ struct MANGOS_DLL_DECL mob_halion_controlAI : public BSWScriptedAI
m_lastBuffTwilight = Buff[buffnum].twilight;
}
- debug_log("ruby_sanctum: Buff num = %u, m_diff = %d ", buffnum, m_diff);
+ debug_log("ruby_sanctum: Buff num = %u, m_diff = %f ", buffnum, m_diff);
pInstance->SetData(TYPE_COUNTER, (uint32)Buff[buffnum].disp_corp);
@@ -2742,7 +2742,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
if (rand()%2 == 0)
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_SNOWFLAKES, true);
else
@@ -2751,7 +2751,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
else
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_MISTLETOE, true);
else
@@ -2765,7 +2765,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
if (rand()%2 == 0)
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_SNOWFLAKES, true);
else
@@ -2774,7 +2774,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
else
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_MISTLETOE, true);
else
@@ -2790,7 +2790,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
if (rand()%2 == 0)
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_SNOWFLAKES, true);
else
@@ -2799,7 +2799,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
else
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_MISTLETOE, true);
else
@@ -2813,7 +2813,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
if (rand()%2 == 0)
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_SNOWFLAKES, true);
else
@@ -2822,7 +2822,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
else
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_MISTLETOE, true);
else
@@ -2838,7 +2838,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
if (rand()%2 == 0)
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_SNOWFLAKES, true);
else
@@ -2847,7 +2847,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
else
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_MISTLETOE, true);
else
@@ -2861,7 +2861,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
if (rand()%2 == 0)
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_SNOWFLAKES, true);
else
@@ -2870,7 +2870,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
else
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_MISTLETOE, true);
else
@@ -2886,7 +2886,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
if (rand()%2 == 0)
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_SNOWFLAKES, true);
else
@@ -2895,7 +2895,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
else
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_MISTLETOE, true);
else
@@ -2909,7 +2909,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
if (rand()%2 == 0)
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_SNOWFLAKES, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_SNOWFLAKES, true);
else
@@ -2918,7 +2918,7 @@ struct MANGOS_DLL_DECL npc_winter_revelerAI : public ScriptedAI
else
{
ItemPosCountVec dest;
- InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, false);
+ InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_MISTLETOE, 1, NULL);
if (msg == EQUIP_ERR_OK)
pPlayer->StoreNewItem(dest, ITEM_MISTLETOE, true);
else

0 comments on commit 703f6b1

Please sign in to comment.