Core: Fix warnings
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user