mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-22 22:51:10 -04:00
Core/Misc: Define some methods const
This commit is contained in:
@@ -42,7 +42,7 @@ class GameObjectAI
|
||||
// Pass parameters between AI
|
||||
virtual void DoAction(const int32 /*param = 0 */) {}
|
||||
virtual void SetGUID(uint64 /*guid*/, int32 /*id = 0 */) {}
|
||||
virtual uint64 GetGUID(int32 /*id = 0 */) { return 0; }
|
||||
virtual uint64 GetGUID(int32 /*id = 0 */) const { return 0; }
|
||||
|
||||
static int Permissible(GameObject const* go);
|
||||
|
||||
@@ -53,9 +53,9 @@ class GameObjectAI
|
||||
virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
|
||||
virtual uint32 GetDialogStatus(Player* /*player*/) { return 100; }
|
||||
virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {}
|
||||
virtual uint32 GetData(uint32 /*id*/) { return 0; }
|
||||
virtual uint32 GetData(uint32 /*id*/) const { return 0; }
|
||||
virtual void SetData64(uint32 /*id*/, uint64 /*value*/) {}
|
||||
virtual uint64 GetData64(uint32 /*id*/) { return 0; }
|
||||
virtual uint64 GetData64(uint32 /*id*/) const { return 0; }
|
||||
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
|
||||
virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
|
||||
virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) {}
|
||||
|
||||
@@ -146,10 +146,10 @@ class UnitAI
|
||||
|
||||
// Pass parameters between AI
|
||||
virtual void DoAction(int32 const /*param*/) {}
|
||||
virtual uint32 GetData(uint32 /*id = 0*/) { return 0; }
|
||||
virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
|
||||
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
|
||||
virtual void SetGUID(uint64 /*guid*/, int32 /*id*/ = 0) {}
|
||||
virtual uint64 GetGUID(int32 /*id*/ = 0) { return 0; }
|
||||
virtual uint64 GetGUID(int32 /*id*/ = 0) const { return 0; }
|
||||
|
||||
Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
|
||||
// Select the targets satifying the predicate.
|
||||
|
||||
@@ -77,17 +77,13 @@ void SummonList::RemoveNotExisting()
|
||||
}
|
||||
}
|
||||
|
||||
bool SummonList::HasEntry(uint32 entry)
|
||||
bool SummonList::HasEntry(uint32 entry) const
|
||||
{
|
||||
for (iterator i = begin(); i != end();)
|
||||
for (const_iterator i = begin(); i != end(); ++i)
|
||||
{
|
||||
Creature* summon = Unit::GetCreature(*me, *i);
|
||||
if (!summon)
|
||||
erase(i++);
|
||||
else if (summon->GetEntry() == entry)
|
||||
if (summon && summon->GetEntry() == entry)
|
||||
return true;
|
||||
else
|
||||
++i;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -54,7 +54,7 @@ class SummonList : public std::list<uint64>
|
||||
|
||||
void DoZoneInCombat(uint32 entry = 0);
|
||||
void RemoveNotExisting();
|
||||
bool HasEntry(uint32 entry);
|
||||
bool HasEntry(uint32 entry) const;
|
||||
private:
|
||||
Creature* me;
|
||||
};
|
||||
|
||||
@@ -698,7 +698,7 @@ void SmartAI::DoAction(const int32 param)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ACTION_DONE, NULL, param);
|
||||
}
|
||||
|
||||
uint32 SmartAI::GetData(uint32 /*id*/)
|
||||
uint32 SmartAI::GetData(uint32 /*id*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -712,7 +712,7 @@ void SmartAI::SetGUID(uint64 /*guid*/, int32 /*id*/)
|
||||
{
|
||||
}
|
||||
|
||||
uint64 SmartAI::GetGUID(int32 /*id*/)
|
||||
uint64 SmartAI::GetGUID(int32 /*id*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ class SmartAI : public CreatureAI
|
||||
void DoAction(const int32 param = 0);
|
||||
|
||||
// Used in scripts to share variables
|
||||
uint32 GetData(uint32 id = 0);
|
||||
uint32 GetData(uint32 id = 0) const;
|
||||
|
||||
// Used in scripts to share variables
|
||||
void SetData(uint32 id, uint32 value);
|
||||
@@ -160,7 +160,7 @@ class SmartAI : public CreatureAI
|
||||
void SetGUID(uint64 guid, int32 id = 0);
|
||||
|
||||
// Used in scripts to share variables
|
||||
uint64 GetGUID(int32 id = 0);
|
||||
uint64 GetGUID(int32 id = 0) const;
|
||||
|
||||
//core related
|
||||
static int Permissible(const Creature*);
|
||||
|
||||
@@ -587,12 +587,12 @@ bool Battlefield::AddOrSetPlayerToCorrectBfGroup(Player* player)
|
||||
//--------------------
|
||||
//-Battlefield Method-
|
||||
//--------------------
|
||||
BfGraveyard* Battlefield::GetGraveyardById(uint32 id)
|
||||
BfGraveyard* Battlefield::GetGraveyardById(uint32 id) const
|
||||
{
|
||||
if (id < m_GraveyardList.size())
|
||||
{
|
||||
if (m_GraveyardList[id])
|
||||
return m_GraveyardList[id];
|
||||
if (BfGraveyard* graveyard = m_GraveyardList.at(id))
|
||||
return graveyard;
|
||||
else
|
||||
sLog->outError(LOG_FILTER_BATTLEFIELD, "Battlefield::GetGraveyardById Id:%u not existed", id);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ class BfGraveyard
|
||||
|
||||
// Method to changing who controls the graveyard
|
||||
void GiveControlTo(TeamId team);
|
||||
TeamId GetControlTeamId() { return m_ControlTeam; }
|
||||
TeamId GetControlTeamId() const { return m_ControlTeam; }
|
||||
|
||||
// Find the nearest graveyard to a player
|
||||
float GetDistance(Player* player);
|
||||
@@ -187,7 +187,7 @@ class BfGraveyard
|
||||
bool HasPlayer(uint64 guid) { return m_ResurrectQueue.find(guid) != m_ResurrectQueue.end(); }
|
||||
|
||||
// Get the graveyard's ID.
|
||||
uint32 GetGraveyardId() { return m_GraveyardId; }
|
||||
uint32 GetGraveyardId() const { return m_GraveyardId; }
|
||||
|
||||
protected:
|
||||
TeamId m_ControlTeam;
|
||||
@@ -260,11 +260,11 @@ class Battlefield : public ZoneScript
|
||||
void HandlePlayerLeaveZone(Player* player, uint32 zone);
|
||||
|
||||
// All-purpose data storage 64 bit
|
||||
virtual uint64 GetData64(uint32 dataId) { return m_Data64[dataId]; }
|
||||
virtual uint64 GetData64(uint32 dataId) const { return m_Data64[dataId]; }
|
||||
virtual void SetData64(uint32 dataId, uint64 value) { m_Data64[dataId] = value; }
|
||||
|
||||
// All-purpose data storage 32 bit
|
||||
virtual uint32 GetData(uint32 dataId) { return m_Data32[dataId]; }
|
||||
virtual uint32 GetData(uint32 dataId) const { return m_Data32[dataId]; }
|
||||
virtual void SetData(uint32 dataId, uint32 value) { m_Data32[dataId] = value; }
|
||||
virtual void UpdateData(uint32 index, int32 pad) { m_Data32[index] += pad; }
|
||||
|
||||
@@ -292,7 +292,7 @@ class Battlefield : public ZoneScript
|
||||
virtual void AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid);
|
||||
void RemovePlayerFromResurrectQueue(uint64 player_guid);
|
||||
void SetGraveyardNumber(uint32 number) { m_GraveyardList.resize(number); }
|
||||
BfGraveyard* GetGraveyardById(uint32 id);
|
||||
BfGraveyard* GetGraveyardById(uint32 id) const;
|
||||
|
||||
// Misc methods
|
||||
Creature* SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId team);
|
||||
|
||||
@@ -454,7 +454,7 @@ void BattlefieldWG::OnStartGrouping()
|
||||
SendWarningToAllInZone(BATTLEFIELD_WG_TEXT_WILL_START);
|
||||
}
|
||||
|
||||
uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId)
|
||||
uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId) const
|
||||
{
|
||||
switch (areaId)
|
||||
{
|
||||
@@ -802,7 +802,7 @@ void BattlefieldWG::OnPlayerEnterZone(Player* player)
|
||||
SendInitWorldStatesTo(player);
|
||||
}
|
||||
|
||||
uint32 BattlefieldWG::GetData(uint32 data)
|
||||
uint32 BattlefieldWG::GetData(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -813,8 +813,8 @@ uint32 BattlefieldWG::GetData(uint32 data)
|
||||
case AREA_WESTPARK_WORKSHOP:
|
||||
case AREA_EASTPARK_WORKSHOP:
|
||||
// Graveyards and Workshops are controlled by the same team.
|
||||
if (m_GraveyardList[GetSpiritGraveyardId(data)])
|
||||
return m_GraveyardList[GetSpiritGraveyardId(data)]->GetControlTeamId();
|
||||
if (BfGraveyard const* graveyard = GetGraveyardById(GetSpiritGraveyardId(data)))
|
||||
return graveyard->GetControlTeamId();
|
||||
}
|
||||
|
||||
return Battlefield::GetData(data);
|
||||
|
||||
@@ -410,9 +410,9 @@ class BattlefieldWG : public Battlefield
|
||||
bool FindAndRemoveVehicleFromList(Unit* vehicle);
|
||||
|
||||
// returns the graveyardId in the specified area.
|
||||
uint8 GetSpiritGraveyardId(uint32 areaId);
|
||||
uint8 GetSpiritGraveyardId(uint32 areaId) const;
|
||||
|
||||
uint32 GetData(uint32 data);
|
||||
uint32 GetData(uint32 data) const;
|
||||
|
||||
protected:
|
||||
bool m_isRelicInteractible;
|
||||
|
||||
@@ -1077,7 +1077,7 @@ bool Pet::HaveInDiet(ItemTemplate const* item) const
|
||||
return diet & FoodMask;
|
||||
}
|
||||
|
||||
uint32 Pet::GetCurrentFoodBenefitLevel(uint32 itemlevel)
|
||||
uint32 Pet::GetCurrentFoodBenefitLevel(uint32 itemlevel) const
|
||||
{
|
||||
// -5 or greater food level
|
||||
if (getLevel() <= itemlevel + 5) //possible to feed level 60 pet with level 55 level food for full effect
|
||||
@@ -1881,7 +1881,7 @@ void Pet::ToggleAutocast(SpellInfo const* spellInfo, bool apply)
|
||||
}
|
||||
}
|
||||
|
||||
bool Pet::IsPermanentPetFor(Player* owner)
|
||||
bool Pet::IsPermanentPetFor(Player* owner) const
|
||||
{
|
||||
switch (getPetType())
|
||||
{
|
||||
|
||||
@@ -112,9 +112,9 @@ class Pet : public Guardian
|
||||
bool isControlled() const { return getPetType() == SUMMON_PET || getPetType() == HUNTER_PET; }
|
||||
bool isTemporarySummoned() const { return m_duration > 0; }
|
||||
|
||||
bool IsPermanentPetFor(Player* owner); // pet have tab in character windows and set UNIT_FIELD_PETNUMBER
|
||||
bool IsPermanentPetFor(Player* owner) const; // pet have tab in character windows and set UNIT_FIELD_PETNUMBER
|
||||
|
||||
bool Create (uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 pet_number);
|
||||
bool Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 pet_number);
|
||||
bool CreateBaseAtCreature(Creature* creature);
|
||||
bool CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner);
|
||||
bool CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask);
|
||||
@@ -142,9 +142,9 @@ class Pet : public Guardian
|
||||
void GivePetLevel(uint8 level);
|
||||
void SynchronizeLevelWithOwner();
|
||||
bool HaveInDiet(ItemTemplate const* item) const;
|
||||
uint32 GetCurrentFoodBenefitLevel(uint32 itemlevel);
|
||||
uint32 GetCurrentFoodBenefitLevel(uint32 itemlevel) const;
|
||||
void SetDuration(int32 dur) { m_duration = dur; }
|
||||
int32 GetDuration() { return m_duration; }
|
||||
int32 GetDuration() const { return m_duration; }
|
||||
|
||||
/*
|
||||
bool UpdateStats(Stats stat);
|
||||
|
||||
@@ -32,19 +32,20 @@ class ZoneScript
|
||||
virtual uint32 GetCreatureEntry(uint32 /*guidlow*/, CreatureData const* data) { return data->id; }
|
||||
virtual uint32 GetGameObjectEntry(uint32 /*guidlow*/, uint32 entry) { return entry; }
|
||||
|
||||
virtual void OnCreatureCreate(Creature* /*creature*/) {}
|
||||
virtual void OnCreatureRemove(Creature* /*creature*/) {}
|
||||
virtual void OnGameObjectCreate(GameObject* /*go*/) {}
|
||||
virtual void OnGameObjectRemove(GameObject* /*go*/) {}
|
||||
virtual void OnCreatureCreate(Creature *) { }
|
||||
virtual void OnCreatureRemove(Creature *) { }
|
||||
|
||||
virtual void OnUnitDeath(Unit* /*unit*/) {}
|
||||
virtual void OnGameObjectCreate(GameObject *) { }
|
||||
virtual void OnGameObjectRemove(GameObject *) { }
|
||||
|
||||
virtual void OnUnitDeath(Unit*) { }
|
||||
|
||||
//All-purpose data storage 64 bit
|
||||
virtual uint64 GetData64(uint32 /*DataId*/) { return 0; }
|
||||
virtual uint64 GetData64(uint32 /*DataId*/) const { return 0; }
|
||||
virtual void SetData64(uint32 /*DataId*/, uint64 /*Value*/) {}
|
||||
|
||||
//All-purpose data storage 32 bit
|
||||
virtual uint32 GetData(uint32 /*DataId*/) { return 0; }
|
||||
virtual uint32 GetData(uint32 /*DataId*/) const { return 0; }
|
||||
virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) {}
|
||||
|
||||
virtual void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/) {}
|
||||
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -214,7 +214,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
uint32 GetData(uint32 uiType) const
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiType)
|
||||
uint64 GetData64(uint32 uiType) const
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
return strSaveData;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiData)
|
||||
uint32 GetData(uint32 uiData) const
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
uint64 GetData64(uint32 uiData) const
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
|
||||
@@ -75,6 +75,7 @@ public:
|
||||
uint32 size = instance->GetData(DATA_FEL_CRYSTAL_SIZE);
|
||||
for (uint8 i = 0; i < size; ++i)
|
||||
{
|
||||
instance->SetData64(DATA_FEL_CRYSTAL, i);
|
||||
uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "Selin: Adding Fel Crystal " UI64FMTD " to list", guid);
|
||||
Crystals.push_back(guid);
|
||||
|
||||
+13
-20
@@ -72,8 +72,7 @@ public:
|
||||
uint32 Encounter[MAX_ENCOUNTER];
|
||||
uint32 DelrissaDeathCount;
|
||||
|
||||
std::list<uint64> FelCrystals;
|
||||
std::list<uint64>::const_iterator CrystalItr;
|
||||
std::vector<uint64> FelCrystals;
|
||||
|
||||
uint64 SelinGUID;
|
||||
uint64 DelrissaGUID;
|
||||
@@ -85,8 +84,7 @@ public:
|
||||
uint64 KaelStatue[2];
|
||||
uint64 EscapeOrbGUID;
|
||||
uint32 StatuesState;
|
||||
|
||||
bool InitializedItr;
|
||||
uint8 felCristalIndex;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
@@ -107,8 +105,7 @@ public:
|
||||
KaelStatue[1] = 0;
|
||||
EscapeOrbGUID = 0;
|
||||
StatuesState = 0;
|
||||
|
||||
InitializedItr = false;
|
||||
felCristalIndex = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
@@ -119,7 +116,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 identifier)
|
||||
uint32 GetData(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -276,7 +273,7 @@ public:
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -297,26 +294,22 @@ public:
|
||||
case DATA_ESCAPE_ORB:
|
||||
return EscapeOrbGUID;
|
||||
case DATA_FEL_CRYSTAL:
|
||||
{
|
||||
if (FelCrystals.empty())
|
||||
if (FelCrystals.size() < felCristalIndex)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_TSCR, "Magisters Terrace: No Fel Crystals loaded in Inst Data");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!InitializedItr)
|
||||
{
|
||||
CrystalItr = FelCrystals.begin();
|
||||
InitializedItr = true;
|
||||
}
|
||||
|
||||
uint64 guid = *CrystalItr;
|
||||
++CrystalItr;
|
||||
return guid;
|
||||
}
|
||||
return FelCrystals.at(felCristalIndex);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetData64(uint32 identifier, uint64 value)
|
||||
{
|
||||
if (identifier == DATA_FEL_CRYSTAL)
|
||||
felCristalIndex = value;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class instance_molten_core : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -128,7 +128,7 @@ class instance_molten_core : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
prisonerGUID = guid;
|
||||
}
|
||||
|
||||
uint64 GetGUID(int32 /*id*/)
|
||||
uint64 GetGUID(int32 /*id*/) const
|
||||
{
|
||||
return prisonerGUID;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == TYPE_MOGRAINE_AND_WHITE_EVENT)
|
||||
return encounter[0];
|
||||
|
||||
@@ -67,7 +67,10 @@ public:
|
||||
instance->SetData(DATA_DOCTORTHEOLENKRASTINOV_DEATH, 0);
|
||||
|
||||
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
|
||||
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,10 @@ public:
|
||||
instance->SetData(DATA_LADYILLUCIABAROV_DEATH, 0);
|
||||
|
||||
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
|
||||
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,10 @@ public:
|
||||
instance->SetData(DATA_INSTRUCTORMALICIA_DEATH, 0);
|
||||
|
||||
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
|
||||
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,10 @@ public:
|
||||
instance->SetData(DATA_LORDALEXEIBAROV_DEATH, 0);
|
||||
|
||||
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
|
||||
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,10 @@ public:
|
||||
instance->SetData(DATA_LOREKEEPERPOLKELT_DEATH, 0);
|
||||
|
||||
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
|
||||
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,10 @@ public:
|
||||
instance->SetData(DATA_THERAVENIAN_DEATH, 0);
|
||||
|
||||
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
|
||||
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,21 +128,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == TYPE_GANDLING)
|
||||
{
|
||||
if (IsBossDied[0] && IsBossDied[1] && IsBossDied[2] && IsBossDied[3] && IsBossDied[4] && IsBossDied[5])
|
||||
{
|
||||
m_auiEncounter[0] = IN_PROGRESS;
|
||||
return IN_PROGRESS;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return (type == TYPE_GANDLING &&
|
||||
IsBossDied[0] && IsBossDied[1] && IsBossDied[2] &&
|
||||
IsBossDied[3] && IsBossDied[4] && IsBossDied[5])
|
||||
? IN_PROGRESS : 0;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_instance_scholomance()
|
||||
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -402,7 +402,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -426,7 +426,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
State = data;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == EVENT_STATE)
|
||||
return State;
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* GetPlayerInMap()
|
||||
Player const * GetPlayerInMap() const
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 id)
|
||||
uint32 GetData(uint32 id) const
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 id)
|
||||
uint64 GetData64(uint32 id) const
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
@@ -215,8 +215,8 @@ public:
|
||||
case DATA_ANVEENA: return Anveena;
|
||||
case DATA_KALECGOS_KJ: return KalecgosKJ;
|
||||
case DATA_PLAYER_GUID:
|
||||
Player* Target = GetPlayerInMap();
|
||||
return Target->GetGUID();
|
||||
Player const* target = GetPlayerInMap();
|
||||
return target ? target->GetGUID() : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -466,20 +466,27 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
if (identifier == 0) return uiWhoWokeuiArchaedasGUID;
|
||||
if (identifier == 1) return vVaultWalker[0]; // VaultWalker1
|
||||
if (identifier == 2) return vVaultWalker[1]; // VaultWalker2
|
||||
if (identifier == 3) return vVaultWalker[2]; // VaultWalker3
|
||||
if (identifier == 4) return vVaultWalker[3]; // VaultWalker4
|
||||
|
||||
if (identifier == 5) return vEarthenGuardian[0];
|
||||
if (identifier == 6) return vEarthenGuardian[1];
|
||||
if (identifier == 7) return vEarthenGuardian[2];
|
||||
if (identifier == 8) return vEarthenGuardian[3];
|
||||
if (identifier == 9) return vEarthenGuardian[4];
|
||||
if (identifier == 10) return vEarthenGuardian[5];
|
||||
switch (identifier)
|
||||
{
|
||||
case 0:
|
||||
return uiWhoWokeuiArchaedasGUID;
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
return vVaultWalker.at(identifier);
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
return vEarthenGuardian.at(identifier - 5);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
} // end GetData64
|
||||
|
||||
@@ -283,7 +283,7 @@ class instance_zulaman : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -113,7 +113,7 @@ class instance_zulgurub : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
uint32 GetData(uint32 uiType) const
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ class instance_zulgurub : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
uint64 GetData64(uint32 uiData) const
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
@@ -163,4 +163,4 @@ class instance_zulgurub : public InstanceMapScript
|
||||
void AddSC_instance_zulgurub()
|
||||
{
|
||||
new instance_zulgurub();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
+2
-2
@@ -196,7 +196,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -216,7 +216,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
if (data == DATA_MEDIVH)
|
||||
return MedivhGUID;
|
||||
|
||||
+2
-2
@@ -203,7 +203,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data)
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 Type)
|
||||
uint32 GetData(uint32 Type) const
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 Data)
|
||||
uint64 GetData64(uint32 Data) const
|
||||
{
|
||||
switch (Data)
|
||||
{
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
uint32 GetData(uint32 uiType) const
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiType)
|
||||
uint64 GetData64(uint32 uiType) const
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
if (data == DONE)SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
if (data == DATA_NARALEX)return NaralexGUID;
|
||||
return 0;
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
|
||||
@@ -116,7 +116,7 @@ class boss_elder_nadox : public CreatureScript
|
||||
GuardianDied = true;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_RESPECT_YOUR_ELDERS)
|
||||
return !GuardianDied ? 1 : 0;
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
volunteerWork = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_VOLUNTEER_WORK)
|
||||
return volunteerWork ? 1 : 0;
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -404,7 +404,7 @@ public:
|
||||
me->AddLootMode(LOOT_MODE_HARD_MODE_1); // Add 1st Drake loot mode
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == TWILIGHT_ACHIEVEMENTS)
|
||||
return drakeCount;
|
||||
|
||||
+2
-2
@@ -108,7 +108,7 @@ public:
|
||||
m_bVesperonKilled = true;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
uint32 GetData(uint32 uiType) const
|
||||
{
|
||||
if (uiType == TYPE_SARTHARION_EVENT)
|
||||
return m_auiEncounter[0];
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
uint64 GetData64(uint32 uiData) const
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
|
||||
@@ -162,7 +162,7 @@ class instance_ruby_sanctum : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -272,7 +272,7 @@ class instance_ruby_sanctum : public InstanceMapScript
|
||||
BaltharusSharedHealth = data;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type != DATA_BALTHARUS_SHARED_HEALTH)
|
||||
return 0;
|
||||
|
||||
+2
-2
@@ -235,7 +235,7 @@ public:
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiData)
|
||||
uint32 GetData(uint32 uiData) const
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
uint64 GetData64(uint32 uiData) const
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
|
||||
+1
-1
@@ -499,7 +499,7 @@ class mob_essence_of_twin : public CreatureScript
|
||||
{
|
||||
mob_essence_of_twinAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 GetData(uint32 data)
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
uint32 spellReturned = 0;
|
||||
switch (me->GetEntry())
|
||||
|
||||
+8
-11
@@ -43,7 +43,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
MistressOfPainCount = 0;
|
||||
TributeToImmortalityElegible = true;
|
||||
NeedSave = false;
|
||||
EventNPCId = 0;
|
||||
|
||||
TirionFordringGUID = 0;
|
||||
BarrentGUID = 0;
|
||||
@@ -470,7 +469,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -521,7 +520,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -575,7 +574,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
case 6000:
|
||||
case 6005:
|
||||
case 6010:
|
||||
EventNPCId = NPC_TIRION;
|
||||
return NPC_TIRION;
|
||||
break;
|
||||
case 5010:
|
||||
case 5030:
|
||||
@@ -584,7 +583,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
case 5060:
|
||||
case 5070:
|
||||
case 5080:
|
||||
EventNPCId = NPC_LICH_KING_1;
|
||||
return NPC_LICH_KING_1;
|
||||
break;
|
||||
case 120:
|
||||
case 122:
|
||||
@@ -593,7 +592,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
case 3051:
|
||||
case 3071:
|
||||
case 4020:
|
||||
EventNPCId = NPC_VARIAN;
|
||||
return NPC_VARIAN;
|
||||
break;
|
||||
case 130:
|
||||
case 132:
|
||||
@@ -602,7 +601,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
case 3070:
|
||||
case 3081:
|
||||
case 4030:
|
||||
EventNPCId = NPC_GARROSH;
|
||||
return NPC_GARROSH;
|
||||
break;
|
||||
case 1110:
|
||||
case 1120:
|
||||
@@ -614,13 +613,12 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
case 1142:
|
||||
case 1144:
|
||||
case 1150:
|
||||
EventNPCId = NPC_FIZZLEBANG;
|
||||
return NPC_FIZZLEBANG;
|
||||
break;
|
||||
default:
|
||||
EventNPCId = NPC_TIRION;
|
||||
return NPC_TIRION;
|
||||
break;
|
||||
};
|
||||
return EventNPCId;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -737,7 +735,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
uint32 TrialCounter;
|
||||
uint32 EventStage;
|
||||
uint32 EventTimer;
|
||||
uint32 EventNPCId;
|
||||
uint32 NorthrendBeasts;
|
||||
bool NeedSave;
|
||||
std::string SaveDataBuffer;
|
||||
|
||||
@@ -154,7 +154,7 @@ class boss_dred : public CreatureScript
|
||||
++raptorsKilled;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_KING_DRED)
|
||||
return raptorsKilled;
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
ohNovos = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_OH_NOVOS)
|
||||
return ohNovos ? 1 : 0;
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
instance->SetData(DATA_TROLLGORE_EVENT, DONE);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_CONSUMPTION_JUNCTION)
|
||||
return consumptionJunction ? 1 : 0;
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -246,7 +246,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
threeFaced = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_THREE_FACED)
|
||||
return threeFaced;
|
||||
|
||||
@@ -73,7 +73,7 @@ class instance_forge_of_souls : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ class instance_forge_of_souls : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
+2
-2
@@ -245,7 +245,7 @@ public:
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
|
||||
@@ -186,7 +186,7 @@ class boss_garfrost : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 /*type*/)
|
||||
uint32 GetData(uint32 /*type*/) const
|
||||
{
|
||||
return _permafrostStack;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ class instance_pit_of_saron : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -237,7 +237,7 @@ class instance_pit_of_saron : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -190,7 +190,7 @@ class boss_drakkari_colossus : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data)
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
if (data == DATA_COLOSSUS_PHASE)
|
||||
return phase;
|
||||
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
impaledList.push_back(guid);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_SHARE_THE_LOVE)
|
||||
return shareTheLove;
|
||||
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_LESS_RABI)
|
||||
return bPhase ? 0 : 1;
|
||||
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -339,7 +339,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -497,7 +497,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_MADE_A_MESS)
|
||||
if (_fallenChampionCastCount < RAID_MODE<uint32>(3, 5, 3, 5))
|
||||
|
||||
@@ -244,7 +244,7 @@ class boss_festergut : public CreatureScript
|
||||
_maxInoculatedStack = data;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_INOCULATED_STACK)
|
||||
return uint32(_maxInoculatedStack);
|
||||
|
||||
@@ -247,7 +247,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
return &_coldflameLastPos;
|
||||
}
|
||||
|
||||
uint64 GetGUID(int32 type/* = 0 */)
|
||||
uint64 GetGUID(int32 type/* = 0 */) const
|
||||
{
|
||||
if (type == DATA_COLDFLAME_GUID)
|
||||
return _coldflameTarget;
|
||||
|
||||
@@ -536,21 +536,15 @@ class boss_professor_putricide : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_EXPERIMENT_STAGE:
|
||||
{
|
||||
// ALSO MODIFIES!
|
||||
uint32 ret = uint32(_experimentState);
|
||||
_experimentState ^= true;
|
||||
return ret;
|
||||
}
|
||||
return _experimentState;
|
||||
case DATA_PHASE:
|
||||
return _phase;
|
||||
case DATA_ABOMINATION:
|
||||
summons.RemoveNotExisting();
|
||||
return uint32(summons.HasEntry(NPC_MUTATED_ABOMINATION_10) || summons.HasEntry(NPC_MUTATED_ABOMINATION_25));
|
||||
default:
|
||||
break;
|
||||
@@ -1010,7 +1004,11 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader
|
||||
if (GetCaster()->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
uint32 stage = GetCaster()->ToCreature()->AI()->GetData(DATA_EXPERIMENT_STAGE);
|
||||
Creature* creature = GetCaster()->ToCreature();
|
||||
|
||||
uint32 stage = creature->AI()->GetData(DATA_EXPERIMENT_STAGE);
|
||||
creature->AI()->SetData(DATA_EXPERIMENT_STAGE, !stage);
|
||||
|
||||
Creature* target = NULL;
|
||||
std::list<Creature*> creList;
|
||||
GetCreatureListWithEntryInGrid(creList, GetCaster(), NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER, 200.0f);
|
||||
|
||||
@@ -290,7 +290,7 @@ class boss_sindragosa : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_MYSTIC_BUFFET_STACK)
|
||||
return _mysticBuffetStack;
|
||||
@@ -978,7 +978,7 @@ class npc_sindragosa_trash : public CreatureScript
|
||||
_isTaunted = data != 0;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_FROSTWYRM_OWNER)
|
||||
return _frostwyrmId;
|
||||
|
||||
@@ -636,7 +636,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -460,7 +460,7 @@ class boss_valithria_dreamwalker : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == MISSED_PORTALS)
|
||||
return _missedPortals;
|
||||
@@ -1019,7 +1019,7 @@ class npc_dream_portal : public CreatureScript
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
return (type == MISSED_PORTALS && _used) ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -615,7 +615,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type)
|
||||
uint64 GetData64(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@ class boss_faerlina : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_FRENZY_DISPELS)
|
||||
return _frenzyDispels;
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
safetyDance = data ? true : false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_SAFETY_DANCE)
|
||||
return safetyDance ? 1 : 0;
|
||||
|
||||
@@ -85,7 +85,7 @@ class boss_loatheb : public CreatureScript
|
||||
_sporeLoserData = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 id)
|
||||
uint32 GetData(uint32 id) const
|
||||
{
|
||||
if (id != DATA_ACHIEVEMENT_SPORE_LOSER)
|
||||
return 0;
|
||||
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
polaritySwitch = data ? true : false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 id)
|
||||
uint32 GetData(uint32 id) const
|
||||
{
|
||||
if (id != DATA_POLARITY_SWITCH)
|
||||
return 0;
|
||||
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 id)
|
||||
uint32 GetData(uint32 id) const
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
@@ -329,7 +329,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 id)
|
||||
uint64 GetData64(uint32 id) const
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data)
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
if (data == DATA_SUMMON_DEATHS)
|
||||
return _summonDeaths;
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
uint64 GetData64(uint32 data) const
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
|
||||
@@ -110,7 +110,7 @@ class boss_anomalus : public CreatureScript
|
||||
instance->SetData(DATA_ANOMALUS_EVENT, DONE);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_CHAOS_THEORY)
|
||||
return chaosTheory ? 1 : 0;
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_SPLIT_PERSONALITY)
|
||||
return splitPersonality;
|
||||
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
_despawntimer = 2000;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
return type == DATA_COUNT ? _count : 0;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 identifier)
|
||||
uint32 GetData(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiIdentifier)
|
||||
uint64 GetData64(uint32 uiIdentifier) const
|
||||
{
|
||||
switch (uiIdentifier)
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
_amberVoid = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
|
||||
+2
-2
@@ -174,7 +174,7 @@ public:
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
uint32 GetData(uint32 uiType) const
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
uint64 GetData64(uint32 uiData) const
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
|
||||
@@ -236,7 +236,7 @@ public:
|
||||
++abuseTheOoze;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_ABUSE_THE_OOZE)
|
||||
return abuseTheOoze;
|
||||
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
brannSparklinNews = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_BRANN_SPARKLIN_NEWS)
|
||||
return brannSparklinNews ? 1 : 0;
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
|
||||
@@ -378,7 +378,7 @@ class boss_algalon_the_observer : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
return type == DATA_HAS_FED_ON_TEARS ? _fedOnTears : 1;
|
||||
}
|
||||
@@ -728,7 +728,7 @@ class npc_living_constellation : public CreatureScript
|
||||
_isActive = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 /*type*/)
|
||||
uint32 GetData(uint32 /*type*/) const
|
||||
{
|
||||
return _isActive ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class boss_auriaya : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -349,7 +349,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
++Shutdown;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -381,7 +381,7 @@ class boss_freya : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_SUNBEAM, urand(5000, 15000));
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user