Core/Scripts: Code style cleanup in ScriptedAI and BossAI
This commit is contained in:
@@ -135,7 +135,7 @@ class InstanceScript : public ZoneScript
|
||||
virtual void Initialize() {}
|
||||
|
||||
//On load
|
||||
virtual void Load(const char * data) { LoadBossState(data); }
|
||||
virtual void Load(char const* data) { LoadBossState(data); }
|
||||
|
||||
//When save is needed, this function generates the data
|
||||
virtual std::string GetSaveData() { return GetBossSaveData(); }
|
||||
@@ -149,30 +149,30 @@ class InstanceScript : public ZoneScript
|
||||
virtual bool IsEncounterInProgress() const;
|
||||
|
||||
//Called when a player successfully enters the instance.
|
||||
virtual void OnPlayerEnter(Player *) {}
|
||||
virtual void OnPlayerEnter(Player* /*player*/) {}
|
||||
|
||||
//Handle open / close objects
|
||||
//use HandleGameObject(0, boolen, GO); in OnObjectCreate in instance scripts
|
||||
//use HandleGameObject(GUID, boolen, NULL); in any other script
|
||||
void HandleGameObject(uint64 GUID, bool open, GameObject *go = NULL);
|
||||
void HandleGameObject(uint64 guid, bool open, GameObject* go = NULL);
|
||||
|
||||
//change active state of doors or buttons
|
||||
void DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false);
|
||||
void DoUseDoorOrButton(uint64 guid, uint32 withRestoreTime = 0, bool useAlternativeState = false);
|
||||
|
||||
//Respawns a GO having negative spawntimesecs in gameobject-table
|
||||
void DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn = MINUTE);
|
||||
void DoRespawnGameObject(uint64 guid, uint32 timeToDespawn = MINUTE);
|
||||
|
||||
//sends world state update to all players in instance
|
||||
void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData);
|
||||
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue);
|
||||
|
||||
// Send Notify to all players in instance
|
||||
void DoSendNotifyToInstance(const char *format,...);
|
||||
void DoSendNotifyToInstance(char const* format, ...);
|
||||
|
||||
// Complete Achievement for all players in instance
|
||||
void DoCompleteAchievement(uint32 achievement);
|
||||
|
||||
// Update Achievement Criteria for all players in instance
|
||||
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1=0, uint32 miscvalue2=0, Unit *unit=NULL, uint32 time=0);
|
||||
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1 = 0, uint32 miscvalue2 = 0, Unit* unit = NULL, uint32 time = 0);
|
||||
|
||||
// Start/Stop Timed Achievement Criteria for all players in instance
|
||||
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry);
|
||||
@@ -189,7 +189,7 @@ class InstanceScript : public ZoneScript
|
||||
|
||||
virtual bool SetBossState(uint32 id, EncounterState state);
|
||||
EncounterState GetBossState(uint32 id) const { return id < bosses.size() ? bosses[id].state : TO_BE_DECIDED; }
|
||||
const BossBoundaryMap * GetBossBoundary(uint32 id) const { return id < bosses.size() ? &bosses[id].boundary : NULL; }
|
||||
BossBoundaryMap const* GetBossBoundary(uint32 id) const { return id < bosses.size() ? &bosses[id].boundary : NULL; }
|
||||
|
||||
// Achievement criteria additional requirements check
|
||||
// NOTE: not use this if same can be checked existed requirement types from AchievementCriteriaRequirementType
|
||||
@@ -213,16 +213,16 @@ class InstanceScript : public ZoneScript
|
||||
|
||||
protected:
|
||||
void SetBossNumber(uint32 number) { bosses.resize(number); }
|
||||
void LoadDoorData(const DoorData *data);
|
||||
void LoadMinionData(const MinionData *data);
|
||||
void LoadDoorData(DoorData const* data);
|
||||
void LoadMinionData(MinionData const* data);
|
||||
|
||||
void AddDoor(GameObject *door, bool add);
|
||||
void AddMinion(Creature *minion, bool add);
|
||||
void AddDoor(GameObject* door, bool add);
|
||||
void AddMinion(Creature* minion, bool add);
|
||||
|
||||
void UpdateDoorState(GameObject *door);
|
||||
void UpdateMinionState(Creature *minion, EncounterState state);
|
||||
|
||||
std::string LoadBossState(const char * data);
|
||||
std::string LoadBossState(char const* data);
|
||||
std::string GetBossSaveData();
|
||||
private:
|
||||
std::vector<BossInfo> bosses;
|
||||
|
||||
Reference in New Issue
Block a user