Core: Fix warnings

--HG--
branch : trunk
This commit is contained in:
Spp
2010-11-16 14:08:12 +01:00
parent 7abcf9812e
commit addd762c4d
19 changed files with 51 additions and 51 deletions
+6 -6
View File
@@ -41,14 +41,14 @@ class GameObjectAI
static int Permissible(const GameObject* go);
virtual bool GossipHello(Player* player) {return false;}
virtual bool GossipSelect(Player* player, uint32 sender, uint32 action) {return false;}
virtual bool GossipHello(Player* /*player*/) {return false;}
virtual bool GossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) {return false;}
virtual bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) {return false;}
virtual bool QuestAccept(Player* player, Quest const* quest) {return false;}
virtual bool QuestReward(Player* player, Quest const* quest, uint32 opt) {return false;}
virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) {return false;}
virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) {return false;}
uint32 GetDialogStatus(Player* /*player*/) {return 100;}
virtual void Destroyed(Player* player, uint32 eventId) {}
virtual void SetData(uint32 id, uint32 value) {}
virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {}
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
};
class NullGameObjectAI : public GameObjectAI
+11 -11
View File
@@ -35,7 +35,7 @@
SmartAI::SmartAI(Creature *c) : CreatureAI(c)
{
// copy script to local (pretection for table reload)
// copy script to local (protection for table reload)
mWayPoints = NULL;
mEscortState = SMART_ESCORT_NONE;
@@ -114,7 +114,7 @@ WayPoint* SmartAI::GetNextWayPoint()
return NULL;
}
void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* invoker)
void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/)
{
if (me->isInCombat())// no wp movement in combat
{
@@ -347,7 +347,7 @@ void SmartAI::UpdateAI(const uint32 diff)
{
if (mFollowArrivedTimer < diff)
{
if (Creature* target = me->FindNearestCreature(mFollowArrivedEntry,INTERACTION_DISTANCE, true))
if (me->FindNearestCreature(mFollowArrivedEntry,INTERACTION_DISTANCE, true))
{
if (Player* plr = me->GetPlayer(*me, mFollowGuid))
{
@@ -495,7 +495,7 @@ void SmartAI::MoveInLineOfSight(Unit* who)
// AttackStart(who);
}
bool SmartAI::CanAIAttack(const Unit* who) const
bool SmartAI::CanAIAttack(const Unit* /*who*/) const
{
if (me->GetReactState() == REACT_PASSIVE)
return false;
@@ -649,7 +649,7 @@ void SmartAI::SummonedCreatureDespawn(Creature* unit)
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMON_DESPAWNED, unit);
}
void SmartAI::UpdateAIWhileCharmed(const uint32 diff)
void SmartAI::UpdateAIWhileCharmed(const uint32 /*diff*/)
{
}
@@ -676,11 +676,11 @@ void SmartAI::OnCharmed(bool apply)
GetScript()->ProcessEventsFor(SMART_EVENT_CHARMED, NULL, 0, 0, apply);
}
void SmartAI::DoAction(const int32 param)
void SmartAI::DoAction(const int32 /*param*/)
{
}
uint32 SmartAI::GetData(uint32 id)
uint32 SmartAI::GetData(uint32 /*id*/)
{
return 0;
}
@@ -690,11 +690,11 @@ void SmartAI::SetData(uint32 id, uint32 value)
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, NULL, id, value);
}
void SmartAI::SetGUID(const uint64& guid, int32 id)
void SmartAI::SetGUID(const uint64& /*guid*/, int32 /*id*/)
{
}
uint64 SmartAI::GetGUID(int32 id)
uint64 SmartAI::GetGUID(int32 /*id*/)
{
return 0;
}
@@ -731,7 +731,7 @@ void SmartAI::sGossipSelect(Player* player, uint32 sender, uint32 action)
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_SELECT, player, sender, action);
}
void SmartAI::sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code)
void SmartAI::sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/)
{
}
@@ -898,4 +898,4 @@ class SmartTrigger : public AreaTriggerScript
void AddSC_SmartSCripts()
{
new SmartTrigger();
}
}
+1 -1
View File
@@ -229,7 +229,7 @@ class SmartAI : public CreatureAI
class SmartGameObjectAI : public GameObjectAI
{
public:
SmartGameObjectAI(GameObject *g) : go(g), GameObjectAI(g) {}
SmartGameObjectAI(GameObject *g) : GameObjectAI(g), go(g) {}
~SmartGameObjectAI() {}
void UpdateAI(const uint32 diff);
@@ -88,10 +88,11 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3
}
for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i)
{
if ((*i).GetEventType() == SMART_EVENT_LINK)//special handling
SMART_EVENT eventType = SMART_EVENT((*i).GetEventType());
if (eventType == SMART_EVENT_LINK)//special handling
continue;
if ((*i).GetEventType() == e/* && (!(*i).event.event_phase_mask || IsInPhase((*i).event.event_phase_mask)) && !((*i).event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE && (*i).runOnce)*/)
if (eventType == e/* && (!(*i).event.event_phase_mask || IsInPhase((*i).event.event_phase_mask)) && !((*i).event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE && (*i).runOnce)*/)
ProcessEvent(*i, unit, var0, var1, bvar, spell, gob);
}
}
@@ -808,7 +809,6 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
{
ObjectList* targets = GetTargets(e, unit);
if (!targets) return;
uint32 map = e.action.teleport.mapID;
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
{
if(!IsPlayer((*itr))) continue;
@@ -2241,4 +2241,4 @@ void SmartScript::SetScript9(SmartScriptHolder &e, uint32 entry)
mResumeActionList = e.action.timedActionList.dontResume ? false : true;
InitTimer((*i));
}
}
}
@@ -225,7 +225,7 @@ class SmartScript
{
for (SmartAIEventList::iterator i = mStoredEvents.begin(); i != mStoredEvents.end(); ++i)
{
if (i->event_id = id)
if (i->event_id == id)
{
mStoredEvents.erase(i);
return;
@@ -756,7 +756,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST:
break;
default:
sLog.outErrorDb("SmartAIMgr: Not handled action_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
sLog.outErrorDb("SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
return false;
}
@@ -1262,16 +1262,16 @@ class SmartAIMgr
}
return true;
}
inline bool IsConditionValid(SmartScriptHolder e, uint32 t, uint32 v1, uint32 v2, uint32 v3)
inline bool IsConditionValid(SmartScriptHolder e, int32 t, int32 v1, int32 v2, int32 v3)
{
bool error = false;
if (t > 0 && v1 >= 0 && v2 >= 0 && v3 >= 0)
{
Condition cond;
cond.mConditionType = ConditionType(t);
cond.mConditionValue1 = v1;
cond.mConditionValue2 = v2;
cond.mConditionValue3 = v3;
cond.mConditionValue1 = uint32(v1);
cond.mConditionValue2 = uint32(v2);
cond.mConditionValue3 = uint32(v3);
if (!sConditionMgr.isConditionTypeValid(&cond))
error = true;
}
+1 -1
View File
@@ -193,7 +193,7 @@ void HostileRefManager::UpdateVisibility()
HostileReference* nextRef = ref->next();
if (!ref->getSource()->getOwner()->canSeeOrDetect(getOwner()))
{
HostileReference* nextRef = ref->next();
nextRef = ref->next();
ref->removeReference();
delete ref;
}
+2 -2
View File
@@ -97,10 +97,10 @@ static bool procPrepared = InitTriggerAuraData();
#pragma warning(disable:4355)
#endif
Unit::Unit(): WorldObject(),
m_movedPlayer(NULL), IsAIEnabled(false), NeedChangeAI(false),
m_movedPlayer(NULL), m_lastSanctuaryTime(0), IsAIEnabled(false), NeedChangeAI(false),
m_ControlledByPlayer(false), i_AI(NULL), i_disabledAI(NULL), m_procDeep(0),
m_removedAurasCount(0), i_motionMaster(this), m_ThreatManager(this), m_vehicle(NULL),
m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this), m_lastSanctuaryTime(0)
m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this)
{
#ifdef _MSC_VER
#pragma warning(default:4355)
+3 -3
View File
@@ -1147,9 +1147,9 @@ void Group::UpdatePlayerOutOfRange(Player* pPlayer)
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
if (player = itr->getSource())
if (!player->IsWithinDist(pPlayer, player->GetSightRange(), false))
player->GetSession()->SendPacket(&data);
player = itr->getSource();
if (player && !player->IsWithinDist(pPlayer, player->GetSightRange(), false))
player->GetSession()->SendPacket(&data);
}
}
+5 -5
View File
@@ -4472,7 +4472,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
unitTarget->GetPosition(x, y, z);
uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z);
AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag);
if (canFly && (pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE) || !pArea)
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
canFly = false;
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
@@ -4517,7 +4517,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
unitTarget->GetPosition(x, y, z);
uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z);
AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag);
if (canFly && (pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE) || !pArea)
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
canFly = false;
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
@@ -4842,7 +4842,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
unitTarget->GetPosition(x, y, z);
uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z);
AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag);
if (canFly && (pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE) || !pArea)
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
canFly = false;
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
@@ -4888,7 +4888,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
unitTarget->GetPosition(x, y, z);
uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z);
AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag);
if (canFly && (pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE) || !pArea)
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
canFly = false;
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
@@ -4951,7 +4951,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
unitTarget->GetPosition(x, y, z);
uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z);
AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag);
if (canFly && (pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE) || !pArea)
if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE)))
canFly = false;
switch(unitTarget->ToPlayer()->GetBaseSkillValue(SKILL_RIDING))
+2 -2
View File
@@ -721,13 +721,13 @@ class debug_commandscript : public CommandScript
return true;
}
static bool HandleDebugBattlegroundCommand(ChatHandler* handler, const char* /*args*/)
static bool HandleDebugBattlegroundCommand(ChatHandler* /*handler*/, const char* /*args*/)
{
sBattlegroundMgr.ToggleTesting();
return true;
}
static bool HandleDebugArenaCommand(ChatHandler* handler, const char* /*args*/)
static bool HandleDebugArenaCommand(ChatHandler* /*handler*/, const char* /*args*/)
{
sBattlegroundMgr.ToggleArenaTesting();
return true;
+3 -3
View File
@@ -1271,7 +1271,7 @@ class npc_commandscript : public CommandScript
}
//TODO: NpcCommands that needs to be fixed :
static bool HandleNpcAddWeaponCommand(ChatHandler* handler, const char* /*args*/)
static bool HandleNpcAddWeaponCommand(ChatHandler* /*handler*/, const char* /*args*/)
{
/*if (!*args)
return false;
@@ -1339,7 +1339,7 @@ class npc_commandscript : public CommandScript
return true;
}
static bool HandleNpcSetNameCommand(ChatHandler* handler, const char* /*args*/)
static bool HandleNpcSetNameCommand(ChatHandler* /*handler*/, const char* /*args*/)
{
/* Temp. disabled
if (!*args)
@@ -1386,7 +1386,7 @@ class npc_commandscript : public CommandScript
return true;
}
static bool HandleNpcSetSubNameCommand(ChatHandler* handler, const char* /*args*/)
static bool HandleNpcSetSubNameCommand(ChatHandler* /*handler*/, const char* /*args*/)
{
/* Temp. disabled
@@ -180,7 +180,7 @@ public:
return true;
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
@@ -278,7 +278,7 @@ public:
return true;
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
@@ -106,7 +106,7 @@ class boss_bronjahm : public CreatureScript
DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
}
void DamageTaken(Unit* /*attacker*/, uint32& damage)
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
{
if (events.GetPhaseMask() & (1 << PHASE_1) && !HealthAbovePct(30))
{
@@ -299,7 +299,7 @@ class player_overlord_brandAI : public PlayerAI
me->CastCustomSpell(SPELL_OVERLORD_BRAND_HEAL, SPELLVALUE_BASE_POINT0, int32(addHealth*5.5f), tyrannus, true, NULL, NULL, tyrannus->GetGUID());
}
void UpdateAI(const uint32 diff) { }
void UpdateAI(const uint32 /*diff*/) { }
private:
Creature* tyrannus;
@@ -202,7 +202,7 @@ class boss_blood_council_controller : public CreatureScript
instance->SetBossState(DATA_BLOOD_PRINCE_COUNCIL, NOT_STARTED);
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* /*who*/)
{
instance->SetBossState(DATA_BLOOD_PRINCE_COUNCIL, IN_PROGRESS);
@@ -18,7 +18,7 @@
#ifndef DEF_ICECROWN_CITADEL_H
#define DEF_ICECROWN_CITADEL_H
static const char* ICCScriptName = "instance_icecrown_citadel";
#define ICCScriptName "instance_icecrown_citadel"
enum eSharedSpells
{
+1 -1
View File
@@ -499,7 +499,7 @@ class spell_gen_animal_blood : public SpellScriptLoader
return true;
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraApplication const* aurApp, AuraEffectHandleModes /*mode*/)
void OnRemove(AuraEffect const* /*aurEff*/, AuraApplication const* /*aurApp*/, AuraEffectHandleModes /*mode*/)
{
if (GetUnitOwner()->IsInWater())
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SPAWN_BLOOD_POOL, true);