diff options
| author | Spp <none@none> | 2010-11-16 14:08:12 +0100 |
|---|---|---|
| committer | Spp <none@none> | 2010-11-16 14:08:12 +0100 |
| commit | addd762c4dbc08e6aac8081e105af48f7decbc0e (patch) | |
| tree | ceb7632cca41c3e7575e7dd200e9300e346792fb /src/server/game/AI/SmartScripts | |
| parent | 7abcf9812ead236307e60a2e686e89e5e21c2939 (diff) | |
Core: Fix warnings
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 22 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.h | 2 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.h | 2 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 8 |
6 files changed, 22 insertions, 22 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 4fb4cbdcc53..64251a8fa0d 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -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(); -}
\ No newline at end of file +} diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 6bc49b24f9f..ca07cada882 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -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); diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 700eb6c311a..3c404f0651c 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -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)); } -}
\ No newline at end of file +} diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 0384afc4a44..74b3a4f4d33 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -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; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index a4745f34555..836d0f074aa 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -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; } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 755f7e946f1..98f7f73483a 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -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; } |
