aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoschiwald <joschiwald@online.de>2014-01-10 17:36:04 +0100
committerjoschiwald <joschiwald@online.de>2014-01-10 17:36:04 +0100
commit7ec7fcf78c62efe66448c3a7a67c7b654f5932d5 (patch)
tree489a7c8e840ceec76ebbee6fd1e5c947712abe6f
parentdc09715312a389d8b231c89df3783c2731eee1e6 (diff)
Core/SAI: drop unneeded code
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp10
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h6
2 files changed, 5 insertions, 11 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index d6aa30dff23..a203aeb6b97 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -439,6 +439,8 @@ void SmartAI::EnterEvadeMode()
me->LoadCreaturesAddon();
me->SetLootRecipient(NULL);
me->ResetPlayerDamageReq();
+ me->SetLastDamagedTime(0);
+
GetScript()->ProcessEventsFor(SMART_EVENT_EVADE);//must be after aura clear so we can cast spells from db
SetRun(mRun);
@@ -574,7 +576,7 @@ void SmartAI::JustReachedHome()
GetScript()->ProcessEventsFor(SMART_EVENT_REACHED_HOME);
if (!UpdateVictim() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE && me->GetWaypointPath())
- me->ToCreature()->GetMotionMaster()->MovePath(me->GetWaypointPath(), true);
+ me->GetMotionMaster()->MovePath(me->GetWaypointPath(), true);
}
mJustReset = false;
@@ -904,12 +906,6 @@ bool SmartGameObjectAI::QuestReward(Player* player, Quest const* quest, uint32 o
return false;
}
-// Called when the dialog status between a player and the gameobject is requested.
-uint32 SmartGameObjectAI::GetDialogStatus(Player* /*player*/)
-{
- return DIALOG_STATUS_SCRIPTED_NO_STATUS;
-}
-
// Called when the gameobject is destroyed (destructible buildings only).
void SmartGameObjectAI::Destroyed(Player* player, uint32 eventId)
{
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 83f2ae0b4d9..dcf64b657f8 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -236,7 +236,7 @@ class SmartAI : public CreatureAI
class SmartGameObjectAI : public GameObjectAI
{
public:
- SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) { }
+ SmartGameObjectAI(GameObject* g) : GameObjectAI(g) { }
~SmartGameObjectAI() { }
void UpdateAI(uint32 diff);
@@ -250,7 +250,6 @@ class SmartGameObjectAI : public GameObjectAI
bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/);
bool QuestAccept(Player* player, Quest const* quest);
bool QuestReward(Player* player, Quest const* quest, uint32 opt);
- uint32 GetDialogStatus(Player* /*player*/);
void Destroyed(Player* player, uint32 eventId);
void SetData(uint32 id, uint32 value);
void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker);
@@ -258,8 +257,7 @@ class SmartGameObjectAI : public GameObjectAI
void OnStateChanged(uint32 state, Unit* unit);
void EventInform(uint32 eventId);
- protected:
- GameObject* const go;
+ private:
SmartScript mScript;
};
#endif