Core/SAI: drop unneeded code

This commit is contained in:
joschiwald
2014-01-10 17:36:04 +01:00
parent dc09715312
commit 7ec7fcf78c
2 changed files with 5 additions and 11 deletions

View File

@@ -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)
{

View File

@@ -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