Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Achievements/AchievementMgr.cpp src/server/game/Achievements/AchievementMgr.h src/server/game/Globals/ObjectMgr.cpp
This commit is contained in:
commit
f767aef12e
52 files changed
+3136
-959
No files matched your search
@@ -1005,7 +1005,7 @@ template<class T>
|
||||
void AchievementMgr<T>::CheckAllAchievementCriteria(Player* referencePlayer)
|
||||
{
|
||||
// suppress sending packets
|
||||
for (uint32 i=0; i<ACHIEVEMENT_CRITERIA_TYPE_TOTAL; ++i)
|
||||
for (uint32 i = 0; i < ACHIEVEMENT_CRITERIA_TYPE_TOTAL; ++i)
|
||||
UpdateAchievementCriteria(AchievementCriteriaTypes(i), 0, 0, 0, NULL, referencePlayer);
|
||||
}
|
||||
|
||||
@@ -1408,7 +1408,7 @@ bool AchievementMgr<T>::IsCompletedCriteria(AchievementCriteriaEntry const* achi
|
||||
if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL))
|
||||
{
|
||||
// someone on this realm has already completed that achievement
|
||||
if (sAchievementMgr->IsRealmCompleted(achievement))
|
||||
if (sAchievementMgr->IsRealmCompleted(achievement, GetOwner()->GetInstanceId())
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1822,10 +1822,7 @@ void AchievementMgr<Player>::CompletedAchievement(AchievementEntry const* achiev
|
||||
ca.date = time(NULL);
|
||||
ca.changed = true;
|
||||
|
||||
// don't insert for ACHIEVEMENT_FLAG_REALM_FIRST_KILL since otherwise only the first group member would reach that achievement
|
||||
/// @todo where do set this instead?
|
||||
if (!(achievement->flags & ACHIEVEMENT_FLAG_REALM_FIRST_KILL))
|
||||
sAchievementMgr->SetRealmCompleted(achievement);
|
||||
sAchievementMgr->SetRealmCompleted(achievement, GetOwner()->GetInstanceId());
|
||||
|
||||
_achievementPoints += achievement->points;
|
||||
|
||||
@@ -1918,7 +1915,7 @@ void AchievementMgr<Guild>::CompletedAchievement(AchievementEntry const* achieve
|
||||
ca.guids.insert(groupMember->GetGUID());
|
||||
}
|
||||
|
||||
sAchievementMgr->SetRealmCompleted(achievement);
|
||||
sAchievementMgr->SetRealmCompleted(achievement, referencePlayer->GetInstanceId());
|
||||
|
||||
_achievementPoints += achievement->points;
|
||||
|
||||
@@ -3183,7 +3180,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
||||
continue;
|
||||
}
|
||||
else if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL))
|
||||
m_allCompletedAchievements.insert(achievementId);
|
||||
m_allCompletedAchievements[achievementId] = uint32(0xFFFFFFFF);
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
@@ -3360,3 +3357,10 @@ AchievementCriteriaEntry const* AchievementGlobalMgr::GetAchievementCriteria(uin
|
||||
{
|
||||
return sAchievementCriteriaStore.LookupEntry(criteriaId);
|
||||
}
|
||||
|
||||
void AchievementGlobalMgr::OnInstanceDestroyed(uint32 instanceId)
|
||||
{
|
||||
for (auto& realmCompletion : m_allCompletedAchievements)
|
||||
if (realmCompletion.second == instanceId)
|
||||
realmCompletion.second = uint32(0xFFFFFFFF);
|
||||
}
|
||||
@@ -352,14 +352,24 @@ class AchievementGlobalMgr
|
||||
return iter != m_criteriaDataMap.end() ? &iter->second : NULL;
|
||||
}
|
||||
|
||||
bool IsRealmCompleted(AchievementEntry const* achievement) const
|
||||
bool IsRealmCompleted(AchievementEntry const* achievement, uint32 instanceId) const
|
||||
{
|
||||
return m_allCompletedAchievements.find(achievement->ID) != m_allCompletedAchievements.end();
|
||||
AllCompletedAchievements::const_iterator itr = m_allCompletedAchievements.find(achievement->ID);
|
||||
if (itr == m_allCompletedAchievements.end())
|
||||
return false;
|
||||
|
||||
if (achievement->flags & ACHIEVEMENT_FLAG_REALM_FIRST_KILL)
|
||||
return itr->second != instanceId;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetRealmCompleted(AchievementEntry const* achievement)
|
||||
void SetRealmCompleted(AchievementEntry const* achievement, uint32 instanceId)
|
||||
{
|
||||
m_allCompletedAchievements.insert(achievement->ID);
|
||||
if (IsRealmCompleted(achievement, instanceId))
|
||||
return;
|
||||
|
||||
m_allCompletedAchievements[achievement->ID] = instanceId;
|
||||
}
|
||||
|
||||
bool IsGroupCriteriaType(AchievementCriteriaTypes type) const
|
||||
@@ -380,6 +390,9 @@ class AchievementGlobalMgr
|
||||
return false;
|
||||
}
|
||||
|
||||
// Removes instanceId as valid id to complete realm first kill achievements
|
||||
void OnInstanceDestroyed(uint32 instanceId);
|
||||
|
||||
void LoadAchievementCriteriaList();
|
||||
void LoadAchievementCriteriaData();
|
||||
void LoadAchievementReferenceList();
|
||||
@@ -403,7 +416,7 @@ class AchievementGlobalMgr
|
||||
// store achievements by referenced achievement id to speed up lookup
|
||||
AchievementListByReferencedId m_AchievementListByReferencedId;
|
||||
|
||||
typedef std::set<uint32> AllCompletedAchievements;
|
||||
typedef std::map<uint32 /*achievementId*/, uint32 /*instanceId*/> AllCompletedAchievements;
|
||||
AllCompletedAchievements m_allCompletedAchievements;
|
||||
|
||||
AchievementRewards m_achievementRewards;
|
||||
|
||||
@@ -322,8 +322,6 @@ void Battlefield::StartBattle()
|
||||
InvitePlayersInZoneToWar();
|
||||
InvitePlayersInQueueToWar();
|
||||
|
||||
DoPlaySoundToAll(BF_START);
|
||||
|
||||
OnBattleStart();
|
||||
}
|
||||
|
||||
@@ -339,11 +337,6 @@ void Battlefield::EndBattle(bool endByTimer)
|
||||
if (!endByTimer)
|
||||
SetDefenderTeam(GetAttackerTeam());
|
||||
|
||||
if (GetDefenderTeam() == TEAM_ALLIANCE)
|
||||
DoPlaySoundToAll(BF_ALLIANCE_WINS);
|
||||
else
|
||||
DoPlaySoundToAll(BF_HORDE_WINS);
|
||||
|
||||
OnBattleEnd(endByTimer);
|
||||
|
||||
// Reset battlefield timer
|
||||
|
||||
@@ -45,9 +45,9 @@ enum BattlefieldObjectiveStates
|
||||
|
||||
enum BattlefieldSounds
|
||||
{
|
||||
BF_HORDE_WINS = 8454,
|
||||
BF_ALLIANCE_WINS = 8455,
|
||||
BF_START = 3439
|
||||
BF_SOUND_HORDE_WINS = 8454,
|
||||
BF_SOUND_ALLIANCE_WINS = 8455,
|
||||
BF_SOUND_START = 3439
|
||||
};
|
||||
|
||||
enum BattlefieldTimers
|
||||
@@ -98,9 +98,10 @@ class BfCapturePoint
|
||||
|
||||
bool SetCapturePointData(GameObject* capturePoint);
|
||||
GameObject* GetCapturePointGo();
|
||||
uint32 GetCapturePointEntry(){ return m_capturePointEntry; }
|
||||
uint32 GetCapturePointEntry() const { return m_capturePointEntry; }
|
||||
|
||||
TeamId GetTeamId() { return m_team; }
|
||||
|
||||
protected:
|
||||
bool DelCapturePoint();
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -25,11 +25,11 @@ class BattlefieldWG;
|
||||
class WintergraspCapturePoint;
|
||||
|
||||
struct BfWGGameObjectBuilding;
|
||||
struct WGWorkshop;
|
||||
struct WintergraspWorkshop;
|
||||
|
||||
typedef std::set<GameObject*> GameObjectSet;
|
||||
typedef std::set<BfWGGameObjectBuilding*> GameObjectBuilding;
|
||||
typedef std::set<WGWorkshop*> Workshop;
|
||||
typedef std::set<BfWGGameObjectBuilding*> GameObjectBuildingSet;
|
||||
typedef std::set<WintergraspWorkshop*> WorkshopSet;
|
||||
typedef std::set<Group*> GroupSet;
|
||||
//typedef std::set<WintergraspCapturePoint *> CapturePointSet; unused ?
|
||||
|
||||
@@ -222,7 +222,7 @@ struct BfWGCoordGY
|
||||
float o;
|
||||
uint32 gyid;
|
||||
uint8 type;
|
||||
int32 textid; // for gossip menu
|
||||
uint32 textid; // for gossip menu
|
||||
TeamId startcontrol;
|
||||
};
|
||||
|
||||
@@ -253,13 +253,13 @@ class WintergraspCapturePoint : public BfCapturePoint
|
||||
public:
|
||||
WintergraspCapturePoint(BattlefieldWG* battlefield, TeamId teamInControl);
|
||||
|
||||
void LinkToWorkshop(WGWorkshop* workshop) { m_Workshop = workshop; }
|
||||
void LinkToWorkshop(WintergraspWorkshop* workshop) { m_Workshop = workshop; }
|
||||
|
||||
void ChangeTeam(TeamId oldteam) override;
|
||||
TeamId GetTeam() const { return m_team; }
|
||||
|
||||
protected:
|
||||
WGWorkshop* m_Workshop;
|
||||
WintergraspWorkshop* m_Workshop;
|
||||
};
|
||||
|
||||
/* ######################### *
|
||||
@@ -415,11 +415,11 @@ class BattlefieldWG : public Battlefield
|
||||
protected:
|
||||
bool m_isRelicInteractible;
|
||||
|
||||
Workshop WorkshopsList;
|
||||
WorkshopSet Workshops;
|
||||
|
||||
GuidSet DefenderPortalList;
|
||||
GuidSet m_KeepGameObject[BG_TEAMS_COUNT];
|
||||
GameObjectBuilding BuildingsInZone;
|
||||
GameObjectBuildingSet BuildingsInZone;
|
||||
|
||||
GuidSet m_vehicles[BG_TEAMS_COUNT];
|
||||
GuidSet CanonList;
|
||||
@@ -446,6 +446,7 @@ uint8 const WG_MAX_OUTSIDE_NPC = 14;
|
||||
uint8 const WG_OUTSIDE_ALLIANCE_NPC = 7;
|
||||
uint8 const WG_MAX_TELEPORTER = 12;
|
||||
uint8 const WG_MAX_WORKSHOP = 6;
|
||||
uint8 const WG_MAX_TOWER = 7;
|
||||
|
||||
enum WintergraspGameObjectBuildingType
|
||||
{
|
||||
@@ -471,6 +472,17 @@ enum WintergraspGameObjectState
|
||||
BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY
|
||||
};
|
||||
|
||||
enum WintergraspTowerIds
|
||||
{
|
||||
BATTLEFIELD_WG_TOWER_FORTRESS_NW,
|
||||
BATTLEFIELD_WG_TOWER_FORTRESS_SW,
|
||||
BATTLEFIELD_WG_TOWER_FORTRESS_SE,
|
||||
BATTLEFIELD_WG_TOWER_FORTRESS_NE,
|
||||
BATTLEFIELD_WG_TOWER_SHADOWSIGHT,
|
||||
BATTLEFIELD_WG_TOWER_WINTER_S_EDGE,
|
||||
BATTLEFIELD_WG_TOWER_FLAMEWATCH
|
||||
};
|
||||
|
||||
enum WintergraspWorkshopIds
|
||||
{
|
||||
BATTLEFIELD_WG_WORKSHOP_NE,
|
||||
@@ -498,32 +510,50 @@ enum WintergraspTeamControl
|
||||
BATTLEFIELD_WG_TEAM_NEUTRAL
|
||||
};
|
||||
|
||||
/// @todo: Can this be handled with creature_text or SmartAI ?
|
||||
enum WintergraspText
|
||||
{
|
||||
BATTLEFIELD_WG_TEXT_WORKSHOP_NAME_NE = 12055,
|
||||
BATTLEFIELD_WG_TEXT_WORKSHOP_NAME_NW = 12052,
|
||||
BATTLEFIELD_WG_TEXT_WORKSHOP_NAME_SE = 12053,
|
||||
BATTLEFIELD_WG_TEXT_WORKSHOP_NAME_SW = 12054,
|
||||
BATTLEFIELD_WG_TEXT_WORKSHOP_ATTACK = 12051,
|
||||
BATTLEFIELD_WG_TEXT_WORKSHOP_TAKEN = 12050,
|
||||
BATTLEFIELD_WG_TEXT_ALLIANCE = 12057,
|
||||
BATTLEFIELD_WG_TEXT_HORDE = 12056,
|
||||
BATTLEFIELD_WG_TEXT_WILL_START = 12058,
|
||||
BATTLEFIELD_WG_TEXT_START = 12067,
|
||||
BATTLEFIELD_WG_TEXT_FIRSTRANK = 12059,
|
||||
BATTLEFIELD_WG_TEXT_SECONDRANK = 12060,
|
||||
BATTLEFIELD_WG_TEXT_KEEPTOWER_NAME_NE = 12062,
|
||||
BATTLEFIELD_WG_TEXT_KEEPTOWER_NAME_NW = 12064,
|
||||
BATTLEFIELD_WG_TEXT_KEEPTOWER_NAME_SE = 12061,
|
||||
BATTLEFIELD_WG_TEXT_KEEPTOWER_NAME_SW = 12063,
|
||||
BATTLEFIELD_WG_TEXT_TOWER_DAMAGE = 12065,
|
||||
BATTLEFIELD_WG_TEXT_TOWER_DESTROY = 12066,
|
||||
BATTLEFIELD_WG_TEXT_TOWER_NAME_S = 12069,
|
||||
BATTLEFIELD_WG_TEXT_TOWER_NAME_E = 12070,
|
||||
BATTLEFIELD_WG_TEXT_TOWER_NAME_W = 12071,
|
||||
BATTLEFIELD_WG_TEXT_DEFEND_KEEP = 12068,
|
||||
BATTLEFIELD_WG_TEXT_WIN_KEEP = 12072
|
||||
// Invisible Stalker
|
||||
BATTLEFIELD_WG_TEXT_SOUTHERN_TOWER_DAMAGE = 1,
|
||||
BATTLEFIELD_WG_TEXT_SOUTHERN_TOWER_DESTROY = 2,
|
||||
BATTLEFIELD_WG_TEXT_EASTERN_TOWER_DAMAGE = 3,
|
||||
BATTLEFIELD_WG_TEXT_EASTERN_TOWER_DESTROY = 4,
|
||||
BATTLEFIELD_WG_TEXT_WESTERN_TOWER_DAMAGE = 5,
|
||||
BATTLEFIELD_WG_TEXT_WESTERN_TOWER_DESTROY = 6,
|
||||
BATTLEFIELD_WG_TEXT_NW_KEEPTOWER_DAMAGE = 7,
|
||||
BATTLEFIELD_WG_TEXT_NW_KEEPTOWER_DESTROY = 8,
|
||||
BATTLEFIELD_WG_TEXT_SE_KEEPTOWER_DAMAGE = 9,
|
||||
BATTLEFIELD_WG_TEXT_SE_KEEPTOWER_DESTROY = 10,
|
||||
BATTLEFIELD_WG_TEXT_BROKEN_TEMPLE_ATTACK_ALLIANCE = 11,
|
||||
BATTLEFIELD_WG_TEXT_BROKEN_TEMPLE_CAPTURE_ALLIANCE = 12,
|
||||
BATTLEFIELD_WG_TEXT_BROKEN_TEMPLE_ATTACK_HORDE = 13,
|
||||
BATTLEFIELD_WG_TEXT_BROKEN_TEMPLE_CAPTURE_HORDE = 14,
|
||||
BATTLEFIELD_WG_TEXT_EASTSPARK_ATTACK_ALLIANCE = 15,
|
||||
BATTLEFIELD_WG_TEXT_EASTSPARK_CAPTURE_ALLIANCE = 16,
|
||||
BATTLEFIELD_WG_TEXT_EASTSPARK_ATTACK_HORDE = 17,
|
||||
BATTLEFIELD_WG_TEXT_EASTSPARK_CAPTURE_HORDE = 18,
|
||||
BATTLEFIELD_WG_TEXT_SUNKEN_RING_ATTACK_ALLIANCE = 19,
|
||||
BATTLEFIELD_WG_TEXT_SUNKEN_RING_CAPTURE_ALLIANCE = 20,
|
||||
BATTLEFIELD_WG_TEXT_SUNKEN_RING_ATTACK_HORDE = 21,
|
||||
BATTLEFIELD_WG_TEXT_SUNKEN_RING_CAPTURE_HORDE = 22,
|
||||
BATTLEFIELD_WG_TEXT_WESTSPARK_ATTACK_ALLIANCE = 23,
|
||||
BATTLEFIELD_WG_TEXT_WESTSPARK_CAPTURE_ALLIANCE = 24,
|
||||
BATTLEFIELD_WG_TEXT_WESTSPARK_ATTACK_HORDE = 25,
|
||||
BATTLEFIELD_WG_TEXT_WESTSPARK_CAPTURE_HORDE = 26,
|
||||
|
||||
BATTLEFIELD_WG_TEXT_START_GROUPING = 27,
|
||||
BATTLEFIELD_WG_TEXT_START_BATTLE = 28,
|
||||
BATTLEFIELD_WG_TEXT_FORTRESS_DEFEND_ALLIANCE = 29,
|
||||
BATTLEFIELD_WG_TEXT_FORTRESS_CAPTURE_ALLIANCE = 30,
|
||||
BATTLEFIELD_WG_TEXT_FORTRESS_DEFEND_HORDE = 31,
|
||||
BATTLEFIELD_WG_TEXT_FORTRESS_CAPTURE_HORDE = 32,
|
||||
|
||||
BATTLEFIELD_WG_TEXT_NE_KEEPTOWER_DAMAGE = 33,
|
||||
BATTLEFIELD_WG_TEXT_NE_KEEPTOWER_DESTROY = 34,
|
||||
BATTLEFIELD_WG_TEXT_SW_KEEPTOWER_DAMAGE = 35,
|
||||
BATTLEFIELD_WG_TEXT_SW_KEEPTOWER_DESTROY = 36,
|
||||
|
||||
BATTLEFIELD_WG_TEXT_RANK_CORPORAL = 37,
|
||||
BATTLEFIELD_WG_TEXT_RANK_FIRST_LIEUTENANT = 38
|
||||
};
|
||||
|
||||
enum WintergraspGameObject
|
||||
@@ -550,16 +580,6 @@ enum WintergraspGameObject
|
||||
GO_WINTERGRASP_KEEP_COLLISION_WALL = 194323
|
||||
};
|
||||
|
||||
struct WintergraspObjectPositionData
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float o;
|
||||
uint32 entryHorde;
|
||||
uint32 entryAlliance;
|
||||
};
|
||||
|
||||
// *****************************************************
|
||||
// ************ Destructible (Wall, Tower..) ***********
|
||||
// *****************************************************
|
||||
@@ -572,72 +592,90 @@ struct WintergraspBuildingSpawnData
|
||||
float y;
|
||||
float z;
|
||||
float o;
|
||||
uint32 type;
|
||||
uint32 nameId;
|
||||
WintergraspGameObjectBuildingType type;
|
||||
};
|
||||
|
||||
struct WintergraspRebuildableBuildingData
|
||||
struct WintergraspObjectPositionData
|
||||
{
|
||||
ObjectGuid Guid;
|
||||
uint32 entry;
|
||||
uint32 WorldState;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float o;
|
||||
uint32 type;
|
||||
uint32 nameId;
|
||||
uint32 entryHorde;
|
||||
uint32 entryAlliance;
|
||||
};
|
||||
|
||||
const WintergraspBuildingSpawnData WGGameObjectBuilding[WG_MAX_OBJ] =
|
||||
WintergraspBuildingSpawnData const WGGameObjectBuilding[WG_MAX_OBJ] =
|
||||
{
|
||||
// Wall (Not spawned in db)
|
||||
// Entry WS X Y Z O type NameID
|
||||
{ 190219, 3749, 5371.46f, 3047.47f, 407.571f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 190220, 3750, 5331.26f, 3047.1f, 407.923f, 0.052359f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191795, 3764, 5385.84f, 2909.49f, 409.713f, 0.00872f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191796, 3772, 5384.45f, 2771.84f, 410.27f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191799, 3762, 5371.44f, 2630.61f, 408.816f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191800, 3766, 5301.84f, 2909.09f, 409.866f, 0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191801, 3770, 5301.06f, 2771.41f, 409.901f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191802, 3751, 5280.2f, 2995.58f, 408.825f, 1.61443f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191803, 3752, 5279.14f, 2956.02f, 408.604f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191804, 3767, 5278.69f, 2882.51f, 409.539f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191806, 3769, 5279.5f, 2798.94f, 409.998f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191807, 3759, 5279.94f, 2724.77f, 409.945f, 1.56207f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191808, 3760, 5279.6f, 2683.79f, 409.849f, 1.55334f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191809, 3761, 5330.96f, 2630.78f, 409.283f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 190369, 3753, 5256.08f, 2933.96f, 409.357f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 190370, 3758, 5257.46f, 2747.33f, 409.743f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 190371, 3754, 5214.96f, 2934.09f, 409.19f, -0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 190372, 3757, 5215.82f, 2747.57f, 409.188f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 190374, 3755, 5162.27f, 2883.04f, 410.256f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 190376, 3756, 5163.72f, 2799.84f, 409.227f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
// Entry WS X Y Z O Type
|
||||
{ 190219, 3749, 5371.46f, 3047.47f, 407.571f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 190220, 3750, 5331.26f, 3047.1f, 407.923f, 0.052359f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191795, 3764, 5385.84f, 2909.49f, 409.713f, 0.00872f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191796, 3772, 5384.45f, 2771.84f, 410.27f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191799, 3762, 5371.44f, 2630.61f, 408.816f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191800, 3766, 5301.84f, 2909.09f, 409.866f, 0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191801, 3770, 5301.06f, 2771.41f, 409.901f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191802, 3751, 5280.2f, 2995.58f, 408.825f, 1.61443f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191803, 3752, 5279.14f, 2956.02f, 408.604f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191804, 3767, 5278.69f, 2882.51f, 409.539f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191806, 3769, 5279.5f, 2798.94f, 409.998f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191807, 3759, 5279.94f, 2724.77f, 409.945f, 1.56207f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191808, 3760, 5279.6f, 2683.79f, 409.849f, 1.55334f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191809, 3761, 5330.96f, 2630.78f, 409.283f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 190369, 3753, 5256.08f, 2933.96f, 409.357f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 190370, 3758, 5257.46f, 2747.33f, 409.743f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 190371, 3754, 5214.96f, 2934.09f, 409.19f, -0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 190372, 3757, 5215.82f, 2747.57f, 409.188f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 190374, 3755, 5162.27f, 2883.04f, 410.256f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 190376, 3756, 5163.72f, 2799.84f, 409.227f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
|
||||
// Tower of keep (Not spawned in db)
|
||||
{ 190221, 3711, 5281.15f, 3044.59f, 407.843f, 3.11539f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER, BATTLEFIELD_WG_TEXT_KEEPTOWER_NAME_NW },
|
||||
{ 190373, 3713, 5163.76f, 2932.23f, 409.19f, 3.12412f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER, BATTLEFIELD_WG_TEXT_KEEPTOWER_NAME_SW },
|
||||
{ 190377, 3714, 5166.4f, 2748.37f, 409.188f, -1.5708f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER, BATTLEFIELD_WG_TEXT_KEEPTOWER_NAME_SE },
|
||||
{ 190378, 3712, 5281.19f, 2632.48f, 409.099f, -1.58825f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER, BATTLEFIELD_WG_TEXT_KEEPTOWER_NAME_NE },
|
||||
{ 190221, 3711, 5281.15f, 3044.59f, 407.843f, 3.11539f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER }, // NW
|
||||
{ 190373, 3713, 5163.76f, 2932.23f, 409.19f, 3.12412f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER }, // SW
|
||||
{ 190377, 3714, 5166.4f, 2748.37f, 409.188f, -1.5708f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER }, // SE
|
||||
{ 190378, 3712, 5281.19f, 2632.48f, 409.099f, -1.58825f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER }, // NE
|
||||
|
||||
// Wall (with passage) (Not spawned in db)
|
||||
{ 191797, 3765, 5343.29f, 2908.86f, 409.576f, 0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191798, 3771, 5342.72f, 2771.39f, 409.625f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191805, 3768, 5279.13f, 2840.8f, 409.783f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL, 0 },
|
||||
{ 191797, 3765, 5343.29f, 2908.86f, 409.576f, 0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191798, 3771, 5342.72f, 2771.39f, 409.625f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
{ 191805, 3768, 5279.13f, 2840.8f, 409.783f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
|
||||
|
||||
// South tower (Not spawned in db)
|
||||
{ 190356, 3704, 4557.17f, 3623.94f, 395.883f, 1.67552f, BATTLEFIELD_WG_OBJECTTYPE_TOWER, BATTLEFIELD_WG_TEXT_TOWER_NAME_W },
|
||||
{ 190357, 3705, 4398.17f, 2822.5f, 405.627f, -3.12412f, BATTLEFIELD_WG_OBJECTTYPE_TOWER, BATTLEFIELD_WG_TEXT_TOWER_NAME_S },
|
||||
{ 190358, 3706, 4459.1f, 1944.33f, 434.991f, -2.00276f, BATTLEFIELD_WG_OBJECTTYPE_TOWER, BATTLEFIELD_WG_TEXT_TOWER_NAME_E },
|
||||
{ 190356, 3704, 4557.17f, 3623.94f, 395.883f, 1.67552f, BATTLEFIELD_WG_OBJECTTYPE_TOWER }, // W
|
||||
{ 190357, 3705, 4398.17f, 2822.5f, 405.627f, -3.12412f, BATTLEFIELD_WG_OBJECTTYPE_TOWER }, // S
|
||||
{ 190358, 3706, 4459.1f, 1944.33f, 434.991f, -2.00276f, BATTLEFIELD_WG_OBJECTTYPE_TOWER }, // E
|
||||
|
||||
// Door of forteress (Not spawned in db)
|
||||
{ GO_WINTERGRASP_FORTRESS_GATE, 3763, 5162.99f, 2841.23f, 410.162f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_DOOR, 0 },
|
||||
{ GO_WINTERGRASP_FORTRESS_GATE, 3763, 5162.99f, 2841.23f, 410.162f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_DOOR },
|
||||
|
||||
// Last door (Not spawned in db)
|
||||
{ GO_WINTERGRASP_VAULT_GATE, 3773, 5397.11f, 2841.54f, 425.899f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST, 0 },
|
||||
{ GO_WINTERGRASP_VAULT_GATE, 3773, 5397.11f, 2841.54f, 425.899f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST },
|
||||
};
|
||||
|
||||
const Position WGTurret[WG_MAX_TURRET] =
|
||||
struct StaticWintergraspTowerInfo
|
||||
{
|
||||
uint8 TowerId;
|
||||
|
||||
struct
|
||||
{
|
||||
uint8 Damaged;
|
||||
uint8 Destroyed;
|
||||
} TextIds;
|
||||
};
|
||||
|
||||
StaticWintergraspTowerInfo const TowerData[WG_MAX_TOWER] =
|
||||
{
|
||||
{ BATTLEFIELD_WG_TOWER_FORTRESS_NW, { BATTLEFIELD_WG_TEXT_NW_KEEPTOWER_DAMAGE, BATTLEFIELD_WG_TEXT_NW_KEEPTOWER_DESTROY } },
|
||||
{ BATTLEFIELD_WG_TOWER_FORTRESS_SW, { BATTLEFIELD_WG_TEXT_SW_KEEPTOWER_DAMAGE, BATTLEFIELD_WG_TEXT_SW_KEEPTOWER_DESTROY } },
|
||||
{ BATTLEFIELD_WG_TOWER_FORTRESS_SE, { BATTLEFIELD_WG_TEXT_SE_KEEPTOWER_DAMAGE, BATTLEFIELD_WG_TEXT_SE_KEEPTOWER_DESTROY } },
|
||||
{ BATTLEFIELD_WG_TOWER_FORTRESS_NE, { BATTLEFIELD_WG_TEXT_NE_KEEPTOWER_DAMAGE, BATTLEFIELD_WG_TEXT_NE_KEEPTOWER_DESTROY } },
|
||||
{ BATTLEFIELD_WG_TOWER_SHADOWSIGHT, { BATTLEFIELD_WG_TEXT_WESTERN_TOWER_DAMAGE, BATTLEFIELD_WG_TEXT_WESTERN_TOWER_DESTROY } },
|
||||
{ BATTLEFIELD_WG_TOWER_WINTER_S_EDGE, { BATTLEFIELD_WG_TEXT_SOUTHERN_TOWER_DAMAGE, BATTLEFIELD_WG_TEXT_SOUTHERN_TOWER_DESTROY } },
|
||||
{ BATTLEFIELD_WG_TOWER_FLAMEWATCH, { BATTLEFIELD_WG_TEXT_EASTERN_TOWER_DAMAGE, BATTLEFIELD_WG_TEXT_EASTERN_TOWER_DESTROY } }
|
||||
};
|
||||
|
||||
Position const WGTurret[WG_MAX_TURRET] =
|
||||
{
|
||||
{ 5391.19f, 3060.8f, 419.616f, 1.69557f },
|
||||
{ 5266.75f, 2976.5f, 421.067f, 3.20354f },
|
||||
@@ -657,7 +695,7 @@ const Position WGTurret[WG_MAX_TURRET] =
|
||||
};
|
||||
|
||||
// Here there is all npc keeper spawn point
|
||||
const WintergraspObjectPositionData WGKeepNPC[WG_MAX_KEEP_NPC] =
|
||||
WintergraspObjectPositionData const WGKeepNPC[WG_MAX_KEEP_NPC] =
|
||||
{
|
||||
// X Y Z O horde alliance
|
||||
// North East
|
||||
@@ -735,7 +773,7 @@ struct WintergraspTeleporterData
|
||||
float o;
|
||||
};
|
||||
|
||||
const WintergraspTeleporterData WGPortalDefenderData[WG_MAX_TELEPORTER] =
|
||||
WintergraspTeleporterData const WGPortalDefenderData[WG_MAX_TELEPORTER] =
|
||||
{
|
||||
// Player teleporter
|
||||
{ 190763, 5153.41f, 2901.35f, 409.191f, -0.069f },
|
||||
@@ -1030,67 +1068,70 @@ const WintergraspTowerCannonData TowerCannon[WG_MAX_TOWER_CANNON] =
|
||||
// *****************WorkShop Data & Element*****************
|
||||
// *********************************************************
|
||||
|
||||
struct WGWorkshopData
|
||||
struct StaticWintergraspWorkshopInfo
|
||||
{
|
||||
uint8 id;
|
||||
uint32 worldstate;
|
||||
uint32 text;
|
||||
uint8 WorkshopId;
|
||||
uint32 WorldStateId;
|
||||
|
||||
struct
|
||||
{
|
||||
uint8 AllianceCapture;
|
||||
uint8 AllianceAttack;
|
||||
uint8 HordeCapture;
|
||||
uint8 HordeAttack;
|
||||
} TextIds;
|
||||
};
|
||||
|
||||
const WGWorkshopData WorkshopsData[WG_MAX_WORKSHOP] =
|
||||
StaticWintergraspWorkshopInfo const WorkshopData[WG_MAX_WORKSHOP] =
|
||||
{
|
||||
// NE
|
||||
{BATTLEFIELD_WG_WORKSHOP_NE, WORLDSTATE_WORKSHOP_NE, BATTLEFIELD_WG_TEXT_WORKSHOP_NAME_NE},
|
||||
// NW
|
||||
{BATTLEFIELD_WG_WORKSHOP_NW, WORLDSTATE_WORKSHOP_NW, BATTLEFIELD_WG_TEXT_WORKSHOP_NAME_NW},
|
||||
// SE
|
||||
{BATTLEFIELD_WG_WORKSHOP_SE, WORLDSTATE_WORKSHOP_SE, BATTLEFIELD_WG_TEXT_WORKSHOP_NAME_SE},
|
||||
// SW
|
||||
{BATTLEFIELD_WG_WORKSHOP_SW, WORLDSTATE_WORKSHOP_SW, BATTLEFIELD_WG_TEXT_WORKSHOP_NAME_SW},
|
||||
// KEEP WEST - It can't be taken, so it doesn't have a textid
|
||||
{BATTLEFIELD_WG_WORKSHOP_KEEP_WEST, WORLDSTATE_WORKSHOP_K_W, 0},
|
||||
// KEEP EAST - It can't be taken, so it doesn't have a textid
|
||||
{BATTLEFIELD_WG_WORKSHOP_KEEP_EAST, WORLDSTATE_WORKSHOP_K_E, 0}
|
||||
{ BATTLEFIELD_WG_WORKSHOP_NE, WORLDSTATE_WORKSHOP_NE, { BATTLEFIELD_WG_TEXT_SUNKEN_RING_CAPTURE_ALLIANCE, BATTLEFIELD_WG_TEXT_SUNKEN_RING_ATTACK_ALLIANCE, BATTLEFIELD_WG_TEXT_SUNKEN_RING_CAPTURE_HORDE, BATTLEFIELD_WG_TEXT_SUNKEN_RING_ATTACK_HORDE } },
|
||||
{ BATTLEFIELD_WG_WORKSHOP_NW, WORLDSTATE_WORKSHOP_NW, { BATTLEFIELD_WG_TEXT_BROKEN_TEMPLE_CAPTURE_ALLIANCE, BATTLEFIELD_WG_TEXT_BROKEN_TEMPLE_ATTACK_ALLIANCE, BATTLEFIELD_WG_TEXT_BROKEN_TEMPLE_CAPTURE_HORDE, BATTLEFIELD_WG_TEXT_BROKEN_TEMPLE_ATTACK_HORDE } },
|
||||
{ BATTLEFIELD_WG_WORKSHOP_SE, WORLDSTATE_WORKSHOP_SE, { BATTLEFIELD_WG_TEXT_EASTSPARK_CAPTURE_ALLIANCE, BATTLEFIELD_WG_TEXT_EASTSPARK_ATTACK_ALLIANCE, BATTLEFIELD_WG_TEXT_EASTSPARK_CAPTURE_HORDE, BATTLEFIELD_WG_TEXT_EASTSPARK_ATTACK_HORDE } },
|
||||
{ BATTLEFIELD_WG_WORKSHOP_SW, WORLDSTATE_WORKSHOP_SW, { BATTLEFIELD_WG_TEXT_WESTSPARK_CAPTURE_ALLIANCE, BATTLEFIELD_WG_TEXT_WESTSPARK_ATTACK_ALLIANCE, BATTLEFIELD_WG_TEXT_WESTSPARK_CAPTURE_HORDE, BATTLEFIELD_WG_TEXT_WESTSPARK_ATTACK_HORDE } },
|
||||
// KEEP WORKSHOPS - It can't be taken, so it doesn't have a textids
|
||||
{ BATTLEFIELD_WG_WORKSHOP_KEEP_WEST, WORLDSTATE_WORKSHOP_K_W, { 0, 0, 0, 0 } },
|
||||
{ BATTLEFIELD_WG_WORKSHOP_KEEP_EAST, WORLDSTATE_WORKSHOP_K_E, { 0, 0, 0, 0 } }
|
||||
};
|
||||
|
||||
// ********************************************************************
|
||||
// * Structs using for Building, Graveyard, Workshop *
|
||||
// ********************************************************************
|
||||
|
||||
// Structure for different buildings that can be destroyed during battle
|
||||
struct BfWGGameObjectBuilding
|
||||
{
|
||||
BfWGGameObjectBuilding(BattlefieldWG* wg);
|
||||
|
||||
// the team that controls this point
|
||||
uint8 m_Team;
|
||||
|
||||
private:
|
||||
// WG object
|
||||
BattlefieldWG* m_WG;
|
||||
BattlefieldWG* _wg;
|
||||
|
||||
// Linked gameobject
|
||||
ObjectGuid m_BuildGUID;
|
||||
ObjectGuid _buildGUID;
|
||||
|
||||
// eWGGameObjectBuildingType
|
||||
uint32 m_Type;
|
||||
// the team that controls this point
|
||||
TeamId _teamControl;
|
||||
|
||||
// WorldState
|
||||
uint32 m_WorldState;
|
||||
WintergraspGameObjectBuildingType _type;
|
||||
uint32 _worldState;
|
||||
|
||||
// eWGGameObjectState
|
||||
uint32 m_State;
|
||||
WintergraspGameObjectState _state;
|
||||
|
||||
// Name id for warning text
|
||||
uint32 m_NameId;
|
||||
StaticWintergraspTowerInfo const* _staticTowerInfo;
|
||||
|
||||
// GameObject associations
|
||||
GuidSet m_GameObjectList[2];
|
||||
GuidSet m_GameObjectList[BG_TEAMS_COUNT];
|
||||
|
||||
// Creature associations
|
||||
GuidSet m_CreatureBottomList[2];
|
||||
GuidSet m_CreatureTopList[2];
|
||||
GuidSet m_CreatureBottomList[BG_TEAMS_COUNT];
|
||||
GuidSet m_CreatureTopList[BG_TEAMS_COUNT];
|
||||
GuidSet m_TowerCannonBottomList;
|
||||
GuidSet m_TurretTopList;
|
||||
|
||||
public:
|
||||
BfWGGameObjectBuilding(BattlefieldWG* wg, WintergraspGameObjectBuildingType type, uint32 worldState);
|
||||
void Init(GameObject* go);
|
||||
|
||||
ObjectGuid const& GetGUID() const { return _buildGUID; }
|
||||
|
||||
void Rebuild();
|
||||
|
||||
// Called when associated gameobject is damaged
|
||||
@@ -1099,49 +1140,33 @@ struct BfWGGameObjectBuilding
|
||||
// Called when associated gameobject is destroyed
|
||||
void Destroyed();
|
||||
|
||||
void Init(GameObject* go, uint32 type, uint32 worldstate, uint32 nameId);
|
||||
|
||||
void UpdateCreatureAndGo();
|
||||
|
||||
void UpdateTurretAttack(bool disable);
|
||||
|
||||
void Save();
|
||||
};
|
||||
|
||||
struct WGWorkshop
|
||||
{
|
||||
// pointer to the battlefield that the workshop belongs to
|
||||
BattlefieldWG* bf;
|
||||
// id of the workshop, useful to retrieve data of the WorkshopsData array
|
||||
uint8 workshopId;
|
||||
// team that controls the node
|
||||
uint8 teamControl;
|
||||
// for worldstate
|
||||
uint32 state;
|
||||
|
||||
WGWorkshop(BattlefieldWG* _bf, uint8 _workshopId);
|
||||
|
||||
void GiveControlTo(uint8 team, bool init /*for first call in setup*/);
|
||||
|
||||
void UpdateGraveyardAndWorkshop();
|
||||
void FillInitialWorldStates(WorldPacket& data);
|
||||
|
||||
void Save();
|
||||
};
|
||||
|
||||
// Structure for the 6 workshop
|
||||
struct WintergraspWorkshopData
|
||||
struct WintergraspWorkshop
|
||||
{
|
||||
BattlefieldWG* m_WG; // Pointer to wintergrasp
|
||||
ObjectGuid m_BuildGUID;
|
||||
uint32 m_Type;
|
||||
uint32 m_State; // For worldstate
|
||||
uint32 m_WorldState;
|
||||
uint32 m_TeamControl; // Team witch control the workshop
|
||||
GuidSet m_CreatureOnPoint[2]; // Contain all Creature associate to this point
|
||||
GuidSet m_GameObjectOnPoint[2]; // Contain all Gameobject associate to this point
|
||||
uint32 m_NameId; // Id of trinity_string witch contain name of this node, using for alert message
|
||||
private:
|
||||
BattlefieldWG* _wg; // Pointer to wintergrasp
|
||||
ObjectGuid _buildGUID;
|
||||
WintergraspGameObjectState _state; // For worldstate
|
||||
TeamId _teamControl; // Team witch control the workshop
|
||||
GuidSet _creatureOnPoint[BG_TEAMS_COUNT]; // Contain all Creature associate to this point
|
||||
GuidSet _gameObjectOnPoint[BG_TEAMS_COUNT]; // Contain all Gameobject associate to this point
|
||||
|
||||
WintergraspWorkshopData(BattlefieldWG* wg);
|
||||
StaticWintergraspWorkshopInfo const* _staticInfo;
|
||||
|
||||
public:
|
||||
WintergraspWorkshop(BattlefieldWG* wg, uint8 type);
|
||||
|
||||
uint8 GetId() const { return _staticInfo->WorkshopId; }
|
||||
TeamId GetTeamControl() const { return _teamControl; }
|
||||
|
||||
// Spawning associate creature and store them
|
||||
void AddCreature(WintergraspObjectPositionData const& obj);
|
||||
@@ -1149,14 +1174,13 @@ struct WintergraspWorkshopData
|
||||
// Spawning Associate gameobject and store them
|
||||
void AddGameObject(WintergraspObjectPositionData const& obj);
|
||||
|
||||
// Init method, setup variable
|
||||
void Init(uint32 worldstate, uint32 type, uint32 nameId);
|
||||
|
||||
// Called on change faction in CapturePoint class
|
||||
void GiveControlTo(uint8 team, bool init /*for first call in setup*/);
|
||||
void GiveControlTo(TeamId teamId, bool init = false);
|
||||
|
||||
void UpdateGraveyardAndWorkshop();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data);
|
||||
|
||||
void Save();
|
||||
};
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "LFGMgr.h"
|
||||
#include "Log.h"
|
||||
#include "MapManager.h"
|
||||
#include "Object.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "PoolMgr.h"
|
||||
@@ -1763,6 +1764,12 @@ void ObjectMgr::LoadCreatures()
|
||||
}
|
||||
}
|
||||
|
||||
if (std::abs(data.orientation) > 2 * float(M_PI))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u Entry: %u) with abs(`orientation`) > 2*PI (orientation is expressed in radians), normalized.", guid, data.id);
|
||||
data.orientation = Position::NormalizeOrientation(data.orientation);
|
||||
}
|
||||
|
||||
if (data.phaseMask == 0)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id);
|
||||
@@ -2065,6 +2072,12 @@ void ObjectMgr::LoadGameobjects()
|
||||
data.phaseGroup = 0;
|
||||
}
|
||||
|
||||
if (std::abs(data.orientation) > 2 * float(M_PI))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with abs(`orientation`) > 2*PI (orientation is expressed in radians), normalized.", guid, data.id);
|
||||
data.orientation = Position::NormalizeOrientation(data.orientation);
|
||||
}
|
||||
|
||||
if (data.rotation2 < -1.0f || data.rotation2 > 1.0f)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation2 (%f) value, skip", guid, data.id, data.rotation2);
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "Player.h"
|
||||
#include "WorldSession.h"
|
||||
#include "Opcodes.h"
|
||||
#include "AchievementMgr.h"
|
||||
|
||||
MapManager::MapManager()
|
||||
{
|
||||
@@ -393,4 +394,5 @@ void MapManager::FreeInstanceId(uint32 instanceId)
|
||||
SetNextInstanceId(instanceId);
|
||||
|
||||
_instanceIds[instanceId] = false;
|
||||
sAchievementMgr->OnInstanceDestroyed(instanceId);
|
||||
}
|
||||
@@ -57,13 +57,10 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
RebuffTimer = 0;
|
||||
work = false;
|
||||
}
|
||||
|
||||
uint64 PlayerGUID;
|
||||
|
||||
uint32 RebuffTimer;
|
||||
bool work;
|
||||
|
||||
|
||||
@@ -44,9 +44,18 @@ public:
|
||||
{
|
||||
boss_lavanthorAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiFireboltTimer = 1000;
|
||||
uiFlameBreathTimer = 5000;
|
||||
uiLavaBurnTimer = 10000;
|
||||
uiCauterizingFlamesTimer = 3000;
|
||||
}
|
||||
|
||||
uint32 uiFireboltTimer;
|
||||
uint32 uiFlameBreathTimer;
|
||||
uint32 uiLavaBurnTimer;
|
||||
@@ -56,10 +65,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiFireboltTimer = 1000;
|
||||
uiFlameBreathTimer = 5000;
|
||||
uiLavaBurnTimer = 10000;
|
||||
uiCauterizingFlamesTimer = 3000;
|
||||
Initialize();
|
||||
if (instance->GetData(DATA_WAVE_COUNT) == 6)
|
||||
instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED);
|
||||
else if (instance->GetData(DATA_WAVE_COUNT) == 12)
|
||||
|
||||
@@ -40,9 +40,16 @@ public:
|
||||
{
|
||||
boss_moraggAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiOpticLinkTimer = 10000;
|
||||
uiCorrosiveSalivaTimer = 5000;
|
||||
}
|
||||
|
||||
uint32 uiOpticLinkTimer;
|
||||
uint32 uiCorrosiveSalivaTimer;
|
||||
|
||||
@@ -50,8 +57,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiOpticLinkTimer = 10000;
|
||||
uiCorrosiveSalivaTimer = 5000;
|
||||
Initialize();
|
||||
|
||||
if (instance->GetData(DATA_WAVE_COUNT) == 6)
|
||||
instance->SetData(DATA_1ST_BOSS_EVENT, NOT_STARTED);
|
||||
|
||||
@@ -70,9 +70,17 @@ public:
|
||||
{
|
||||
boss_xevozzAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiSummonEtherealSphere_Timer = urand(10000, 12000);
|
||||
uiArcaneBarrageVolley_Timer = urand(20000, 22000);
|
||||
uiArcaneBuffet_Timer = uiSummonEtherealSphere_Timer + urand(5000, 6000);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiSummonEtherealSphere_Timer;
|
||||
@@ -86,9 +94,7 @@ public:
|
||||
else if (instance->GetData(DATA_WAVE_COUNT) == 12)
|
||||
instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED);
|
||||
|
||||
uiSummonEtherealSphere_Timer = urand(10000, 12000);
|
||||
uiArcaneBarrageVolley_Timer = urand(20000, 22000);
|
||||
uiArcaneBuffet_Timer = uiSummonEtherealSphere_Timer + urand(5000, 6000);
|
||||
Initialize();
|
||||
DespawnSphere();
|
||||
}
|
||||
|
||||
@@ -229,9 +235,16 @@ public:
|
||||
{
|
||||
npc_ethereal_sphereAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiSummonPlayers_Timer = urand(33000, 35000);
|
||||
uiRangeCheck_Timer = 1000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiSummonPlayers_Timer;
|
||||
@@ -239,8 +252,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiSummonPlayers_Timer = urand(33000, 35000);
|
||||
uiRangeCheck_Timer = 1000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) override
|
||||
|
||||
@@ -65,9 +65,18 @@ public:
|
||||
{
|
||||
boss_zuramatAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
SpellShroudOfDarknessTimer = 22000;
|
||||
SpellVoidShiftTimer = 15000;
|
||||
SpellSummonVoidTimer = 12000;
|
||||
voidDance = true;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 SpellVoidShiftTimer;
|
||||
@@ -82,10 +91,7 @@ public:
|
||||
else if (instance->GetData(DATA_WAVE_COUNT) == 12)
|
||||
instance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED);
|
||||
|
||||
SpellShroudOfDarknessTimer = 22000;
|
||||
SpellVoidShiftTimer = 15000;
|
||||
SpellSummonVoidTimer = 12000;
|
||||
voidDance = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
|
||||
@@ -305,9 +305,16 @@ public:
|
||||
{
|
||||
npc_sinclariAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiPhase = 0;
|
||||
uiTimer = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint8 uiPhase;
|
||||
@@ -315,8 +322,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiPhase = 0;
|
||||
uiTimer = 0;
|
||||
Initialize();
|
||||
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
@@ -549,8 +555,14 @@ public:
|
||||
{
|
||||
npc_teleportation_portalAI(Creature* creature) : ScriptedAI(creature), listOfMobs(me)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
uiTypeOfMobsPortal = urand(0, 1); // 0 - elite mobs 1 - portal guardian or portal keeper with regular mobs
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiSpawnTimer = 10000;
|
||||
bPortalGuardianOrKeeperOrEliteSpawn = false;
|
||||
}
|
||||
|
||||
@@ -564,8 +576,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiSpawnTimer = 10000;
|
||||
bPortalGuardianOrKeeperOrEliteSpawn = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
@@ -672,7 +683,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
instance = creature->GetInstanceScript();
|
||||
bHasGotMovingPoints = false;
|
||||
portalLocationID = instance->GetData(DATA_PORTAL_LOCATION);
|
||||
Reset();
|
||||
secondPortalRouteID = 0;
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -797,9 +808,18 @@ public:
|
||||
{
|
||||
npc_azure_invaderAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiCleaveTimer = 5000;
|
||||
uiImpaleTimer = 4000;
|
||||
uiBrutalStrikeTimer = 5000;
|
||||
uiSunderArmorTimer = 4000;
|
||||
}
|
||||
|
||||
uint32 uiCleaveTimer;
|
||||
uint32 uiImpaleTimer;
|
||||
uint32 uiBrutalStrikeTimer;
|
||||
@@ -807,10 +827,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiCleaveTimer = 5000;
|
||||
uiImpaleTimer = 4000;
|
||||
uiBrutalStrikeTimer = 5000;
|
||||
uiSunderArmorTimer = 4000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -875,9 +892,18 @@ public:
|
||||
{
|
||||
npc_azure_binderAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiArcaneExplosionTimer = 5000;
|
||||
uiArcainBarrageTimer = 4000;
|
||||
uiFrostNovaTimer = 5000;
|
||||
uiFrostboltTimer = 4000;
|
||||
}
|
||||
|
||||
uint32 uiArcaneExplosionTimer;
|
||||
uint32 uiArcainBarrageTimer;
|
||||
uint32 uiFrostNovaTimer;
|
||||
@@ -885,10 +911,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiArcaneExplosionTimer = 5000;
|
||||
uiArcainBarrageTimer = 4000;
|
||||
uiFrostNovaTimer = 5000;
|
||||
uiFrostboltTimer = 4000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -953,16 +976,22 @@ public:
|
||||
{
|
||||
npc_azure_mage_slayerAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiArcaneEmpowermentTimer = 5000;
|
||||
uiSpellLockTimer = 5000;
|
||||
}
|
||||
|
||||
uint32 uiArcaneEmpowermentTimer;
|
||||
uint32 uiSpellLockTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiArcaneEmpowermentTimer = 5000;
|
||||
uiSpellLockTimer = 5000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -1013,16 +1042,22 @@ public:
|
||||
{
|
||||
npc_azure_raiderAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiConcussionBlowTimer = 5000;
|
||||
uiMagicReflectionTimer = 8000;
|
||||
}
|
||||
|
||||
uint32 uiConcussionBlowTimer;
|
||||
uint32 uiMagicReflectionTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiConcussionBlowTimer = 5000;
|
||||
uiMagicReflectionTimer = 8000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -1060,14 +1095,20 @@ public:
|
||||
{
|
||||
npc_azure_stalkerAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_backstabTimer = 1300;
|
||||
_tacticalBlinkTimer = 8000;
|
||||
_tacticalBlinkCast = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_backstabTimer = 1300;
|
||||
_tacticalBlinkTimer = 8000;
|
||||
_tacticalBlinkCast =false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -1125,9 +1166,18 @@ public:
|
||||
{
|
||||
npc_azure_spellbreakerAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiArcaneBlastTimer = 5000;
|
||||
uiSlowTimer = 4000;
|
||||
uiChainsOfIceTimer = 5000;
|
||||
uiConeOfColdTimer = 4000;
|
||||
}
|
||||
|
||||
uint32 uiArcaneBlastTimer;
|
||||
uint32 uiSlowTimer;
|
||||
uint32 uiChainsOfIceTimer;
|
||||
@@ -1135,10 +1185,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiArcaneBlastTimer = 5000;
|
||||
uiSlowTimer = 4000;
|
||||
uiChainsOfIceTimer = 5000;
|
||||
uiConeOfColdTimer = 4000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -1209,16 +1256,22 @@ public:
|
||||
{
|
||||
npc_azure_captainAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiMortalStrikeTimer = 5000;
|
||||
uiWhirlwindTimer = 8000;
|
||||
}
|
||||
|
||||
uint32 uiMortalStrikeTimer;
|
||||
uint32 uiWhirlwindTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiMortalStrikeTimer = 5000;
|
||||
uiWhirlwindTimer = 8000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -1261,18 +1314,24 @@ public:
|
||||
{
|
||||
npc_azure_sorcerorAI(Creature* creature) : violet_hold_trashAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiArcaneStreamTimer = 4000;
|
||||
uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer;
|
||||
uiManaDetonationTimer = 5000;
|
||||
}
|
||||
|
||||
uint32 uiArcaneStreamTimer;
|
||||
uint32 uiArcaneStreamTimerStartingValueHolder;
|
||||
uint32 uiManaDetonationTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiArcaneStreamTimer = 4000;
|
||||
uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer;
|
||||
uiManaDetonationTimer = 5000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -1311,13 +1370,21 @@ public:
|
||||
|
||||
struct npc_violet_hold_arcane_sphereAI : public ScriptedAI
|
||||
{
|
||||
npc_violet_hold_arcane_sphereAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_violet_hold_arcane_sphereAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
DespawnTimer = 3000;
|
||||
}
|
||||
|
||||
uint32 DespawnTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
DespawnTimer = 3000;
|
||||
Initialize();
|
||||
|
||||
me->SetDisableGravity(true);
|
||||
DoCast(me, SPELL_ARCANE_SPHERE_PASSIVE, true);
|
||||
|
||||
@@ -565,7 +565,18 @@ class npc_wyrmrest_defender : public CreatureScript
|
||||
|
||||
struct npc_wyrmrest_defenderAI : public VehicleAI
|
||||
{
|
||||
npc_wyrmrest_defenderAI(Creature* creature) : VehicleAI(creature) { }
|
||||
npc_wyrmrest_defenderAI(Creature* creature) : VehicleAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
hpWarningReady = true;
|
||||
renewRecoveryCanCheck = false;
|
||||
|
||||
RenewRecoveryChecker = 0;
|
||||
}
|
||||
|
||||
bool hpWarningReady;
|
||||
bool renewRecoveryCanCheck;
|
||||
@@ -574,10 +585,7 @@ class npc_wyrmrest_defender : public CreatureScript
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
hpWarningReady = true;
|
||||
renewRecoveryCanCheck = false;
|
||||
|
||||
RenewRecoveryChecker = 0;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -464,7 +464,6 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
_despawnTimer = 5000;
|
||||
_playerGUID = 0;
|
||||
}
|
||||
|
||||
void MovementInform(uint32, uint32 id) override
|
||||
@@ -498,7 +497,6 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
uint64 _playerGUID;
|
||||
uint32 _despawnTimer;
|
||||
};
|
||||
|
||||
|
||||
@@ -91,17 +91,23 @@ public:
|
||||
{
|
||||
npc_argent_valiantAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
creature->GetMotionMaster()->MovePoint(0, 8599.258f, 963.951f, 547.553f);
|
||||
creature->setFaction(35); //wrong faction in db?
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiChargeTimer = 7000;
|
||||
uiShieldBreakerTimer = 10000;
|
||||
}
|
||||
|
||||
uint32 uiChargeTimer;
|
||||
uint32 uiShieldBreakerTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiChargeTimer = 7000;
|
||||
uiShieldBreakerTimer = 10000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void MovementInform(uint32 uiType, uint32 /*uiId*/) override
|
||||
@@ -285,9 +291,15 @@ class npc_tournament_training_dummy : public CreatureScript
|
||||
{
|
||||
npc_tournament_training_dummyAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
isVulnerable = false;
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
bool isVulnerable;
|
||||
|
||||
@@ -295,7 +307,7 @@ class npc_tournament_training_dummy : public CreatureScript
|
||||
{
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
|
||||
isVulnerable = false;
|
||||
Initialize();
|
||||
|
||||
// Cast Defend spells to max stack size
|
||||
switch (me->GetEntry())
|
||||
|
||||
@@ -229,7 +229,15 @@ public:
|
||||
|
||||
struct npc_engineer_heliceAI : public npc_escortAI
|
||||
{
|
||||
npc_engineer_heliceAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
npc_engineer_heliceAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
m_uiChatTimer = 4000;
|
||||
}
|
||||
|
||||
uint32 m_uiChatTimer;
|
||||
|
||||
@@ -274,7 +282,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
m_uiChatTimer = 4000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -366,9 +374,12 @@ public:
|
||||
|
||||
struct npc_jungle_punch_targetAI : public ScriptedAI
|
||||
{
|
||||
npc_jungle_punch_targetAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_jungle_punch_targetAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
sayTimer = 3500;
|
||||
sayStep = 0;
|
||||
@@ -378,6 +389,11 @@ public:
|
||||
orphanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!phase && who && who->GetDistance2d(me) < 10.0f)
|
||||
|
||||
@@ -179,13 +179,21 @@ public:
|
||||
|
||||
struct npc_brunnhildar_prisonerAI : public ScriptedAI
|
||||
{
|
||||
npc_brunnhildar_prisonerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_brunnhildar_prisonerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
freed = false;
|
||||
}
|
||||
|
||||
bool freed;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
freed = false;
|
||||
Initialize();
|
||||
me->CastSpell(me, SPELL_ICE_PRISON, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -318,13 +318,21 @@ public:
|
||||
|
||||
struct npc_avatar_of_martyredAI : public ScriptedAI
|
||||
{
|
||||
npc_avatar_of_martyredAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_avatar_of_martyredAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Mortal_Strike_timer = 10000;
|
||||
}
|
||||
|
||||
uint32 Mortal_Strike_timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Mortal_Strike_timer = 10000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
+19
-7
@@ -62,6 +62,16 @@ public:
|
||||
{
|
||||
boss_shirrak_the_dead_watcherAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Inhibitmagic_Timer = 0;
|
||||
Attractmagic_Timer = 28000;
|
||||
Carnivorousbite_Timer = 10000;
|
||||
FocusFire_Timer = 17000;
|
||||
FocusedTargetGUID.Clear();
|
||||
}
|
||||
|
||||
uint32 Inhibitmagic_Timer;
|
||||
@@ -73,11 +83,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Inhibitmagic_Timer = 0;
|
||||
Attractmagic_Timer = 28000;
|
||||
Carnivorousbite_Timer = 10000;
|
||||
FocusFire_Timer = 17000;
|
||||
FocusedTargetGUID.Clear();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -174,6 +180,13 @@ public:
|
||||
{
|
||||
npc_focus_fireAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
FieryBlast_Timer = 3000 + (rand32() % 1000);
|
||||
fiery1 = fiery2 = true;
|
||||
}
|
||||
|
||||
uint32 FieryBlast_Timer;
|
||||
@@ -181,8 +194,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
FieryBlast_Timer = 3000 + (rand32() % 1000);
|
||||
fiery1 = fiery2 = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -78,7 +78,22 @@ public:
|
||||
|
||||
struct boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
{
|
||||
boss_nexusprince_shaffarAI(Creature* creature) : ScriptedAI(creature), summons(me) { HasTaunted = false; }
|
||||
boss_nexusprince_shaffarAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
{
|
||||
Initialize();
|
||||
HasTaunted = false;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Blink_Timer = 1500;
|
||||
Beacon_Timer = 10000;
|
||||
FireBall_Timer = 8000;
|
||||
Frostbolt_Timer = 4000;
|
||||
FrostNova_Timer = 15000;
|
||||
|
||||
CanBlink = false;
|
||||
}
|
||||
|
||||
uint32 Blink_Timer;
|
||||
uint32 Beacon_Timer;
|
||||
@@ -93,13 +108,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Blink_Timer = 1500;
|
||||
Beacon_Timer = 10000;
|
||||
FireBall_Timer = 8000;
|
||||
Frostbolt_Timer = 4000;
|
||||
FrostNova_Timer = 15000;
|
||||
|
||||
CanBlink = false;
|
||||
Initialize();
|
||||
|
||||
float dist = 8.0f;
|
||||
float posX, posY, posZ, angle;
|
||||
@@ -241,6 +250,14 @@ public:
|
||||
{
|
||||
npc_ethereal_beaconAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Apprentice_Timer = DUNGEON_MODE(20000, 10000);
|
||||
ArcaneBolt_Timer = 1000;
|
||||
Check_Timer = 1000;
|
||||
}
|
||||
|
||||
uint32 Apprentice_Timer;
|
||||
@@ -254,9 +271,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Apprentice_Timer = DUNGEON_MODE(20000, 10000);
|
||||
ArcaneBolt_Timer = 1000;
|
||||
Check_Timer = 1000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
@@ -331,7 +346,16 @@ public:
|
||||
|
||||
struct npc_ethereal_apprenticeAI : public ScriptedAI
|
||||
{
|
||||
npc_ethereal_apprenticeAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_ethereal_apprenticeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Cast_Timer = 3000;
|
||||
isFireboltTurn = true;
|
||||
}
|
||||
|
||||
uint32 Cast_Timer;
|
||||
|
||||
@@ -339,8 +363,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Cast_Timer = 3000;
|
||||
isFireboltTurn = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -67,14 +67,22 @@ class boss_anzu : public CreatureScript
|
||||
|
||||
struct boss_anzuAI : public BossAI
|
||||
{
|
||||
boss_anzuAI(Creature* creature) : BossAI(creature, DATA_ANZU) { }
|
||||
boss_anzuAI(Creature* creature) : BossAI(creature, DATA_ANZU)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_under33Percent = false;
|
||||
_under66Percent = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
//_Reset();
|
||||
events.Reset();
|
||||
_under33Percent = false;
|
||||
_under66Percent = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -71,14 +71,22 @@ public:
|
||||
|
||||
struct boss_darkweaver_sythAI : public BossAI
|
||||
{
|
||||
boss_darkweaver_sythAI(Creature* creature) : BossAI(creature, DATA_DARKWEAVER_SYTH) { }
|
||||
boss_darkweaver_sythAI(Creature* creature) : BossAI(creature, DATA_DARKWEAVER_SYTH)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_summon90 = false;
|
||||
_summon50 = false;
|
||||
_summon10 = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
_Reset();
|
||||
summon90 = false;
|
||||
summon50 = false;
|
||||
summon10 = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -109,6 +117,29 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->AI()->AttackStart(target);
|
||||
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(90, damage) && !_summon90)
|
||||
{
|
||||
SythSummoning();
|
||||
_summon90 = true;
|
||||
}
|
||||
|
||||
if (me->HealthBelowPctDamaged(50, damage) && !_summon50)
|
||||
{
|
||||
SythSummoning();
|
||||
_summon50 = true;
|
||||
}
|
||||
|
||||
if (me->HealthBelowPctDamaged(10, damage) && !_summon10)
|
||||
{
|
||||
SythSummoning();
|
||||
_summon10 = true;
|
||||
}
|
||||
}
|
||||
|
||||
void SythSummoning()
|
||||
@@ -124,72 +155,44 @@ public:
|
||||
DoCast(me, SPELL_SUMMON_SYTH_SHADOW, true); //right
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
switch (eventId)
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FLAME_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_FLAME_SHOCK);
|
||||
events.ScheduleEvent(EVENT_FLAME_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_ARCANE_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ARCANE_SHOCK);
|
||||
events.ScheduleEvent(EVENT_ARCANE_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_FROST_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_FROST_SHOCK);
|
||||
events.ScheduleEvent(EVENT_FROST_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_SHADOW_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_SHADOW_SHOCK);
|
||||
events.ScheduleEvent(EVENT_SHADOW_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_CHAIN_LIGHTNING:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 25000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case EVENT_FLAME_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_FLAME_SHOCK);
|
||||
events.ScheduleEvent(EVENT_FLAME_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_ARCANE_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ARCANE_SHOCK);
|
||||
events.ScheduleEvent(EVENT_ARCANE_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_FROST_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_FROST_SHOCK);
|
||||
events.ScheduleEvent(EVENT_FROST_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_SHADOW_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_SHADOW_SHOCK);
|
||||
events.ScheduleEvent(EVENT_SHADOW_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_CHAIN_LIGHTNING:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 25000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (HealthBelowPct(90) && !summon90)
|
||||
{
|
||||
SythSummoning();
|
||||
summon90 = true;
|
||||
}
|
||||
|
||||
if (HealthBelowPct(50) && !summon50)
|
||||
{
|
||||
SythSummoning();
|
||||
summon50 = true;
|
||||
}
|
||||
|
||||
if (HealthBelowPct(10) && !summon10)
|
||||
{
|
||||
SythSummoning();
|
||||
summon10 = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool summon90;
|
||||
bool summon50;
|
||||
bool summon10;
|
||||
bool _summon90;
|
||||
bool _summon50;
|
||||
bool _summon10;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -208,19 +211,20 @@ public:
|
||||
{
|
||||
npc_syth_fireAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
uint32 flameshock_timer;
|
||||
uint32 flamebuffet_timer;
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
flameshock_timer = 2500;
|
||||
flamebuffet_timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
@@ -245,6 +249,10 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 flameshock_timer;
|
||||
uint32 flamebuffet_timer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -258,28 +266,24 @@ class npc_syth_arcane : public CreatureScript
|
||||
public:
|
||||
npc_syth_arcane() : CreatureScript("npc_syth_arcane") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_syth_arcaneAI(creature);
|
||||
}
|
||||
|
||||
struct npc_syth_arcaneAI : public ScriptedAI
|
||||
{
|
||||
npc_syth_arcaneAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 arcanebuffet_timer;
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
|
||||
arcaneshock_timer = 2500;
|
||||
arcanebuffet_timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
@@ -304,7 +308,16 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 arcanebuffet_timer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_syth_arcaneAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_syth_frost : public CreatureScript
|
||||
@@ -312,28 +325,24 @@ class npc_syth_frost : public CreatureScript
|
||||
public:
|
||||
npc_syth_frost() : CreatureScript("npc_syth_frost") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_syth_frostAI(creature);
|
||||
}
|
||||
|
||||
struct npc_syth_frostAI : public ScriptedAI
|
||||
{
|
||||
npc_syth_frostAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
uint32 frostshock_timer;
|
||||
uint32 frostbuffet_timer;
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||
frostshock_timer = 2500;
|
||||
frostbuffet_timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
@@ -358,8 +367,16 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 frostshock_timer;
|
||||
uint32 frostbuffet_timer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_syth_frostAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_syth_shadow : public CreatureScript
|
||||
@@ -367,28 +384,24 @@ class npc_syth_shadow : public CreatureScript
|
||||
public:
|
||||
npc_syth_shadow() : CreatureScript("npc_syth_shadow") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_syth_shadowAI(creature);
|
||||
}
|
||||
|
||||
struct npc_syth_shadowAI : public ScriptedAI
|
||||
{
|
||||
npc_syth_shadowAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
uint32 shadowshock_timer;
|
||||
uint32 shadowbuffet_timer;
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
|
||||
shadowshock_timer = 2500;
|
||||
shadowbuffet_timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
@@ -413,8 +426,16 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 shadowshock_timer;
|
||||
uint32 shadowbuffet_timer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_syth_shadowAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_darkweaver_syth()
|
||||
|
||||
@@ -86,13 +86,19 @@ class boss_grandmaster_vorpil : public CreatureScript
|
||||
{
|
||||
boss_grandmaster_vorpilAI(Creature* creature) : BossAI(creature, DATA_GRANDMASTER_VORPIL)
|
||||
{
|
||||
Initialize();
|
||||
_intro = false;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_helpYell = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
_helpYell = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void SummonPortals()
|
||||
@@ -223,13 +229,19 @@ class npc_voidtraveler : public CreatureScript
|
||||
{
|
||||
npc_voidtravelerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_moveTimer = 0;
|
||||
_sacrificed = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_moveTimer = 0;
|
||||
_sacrificed = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
@@ -95,13 +95,19 @@ public:
|
||||
{
|
||||
npc_wrathbone_flayerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_enteredCombat = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_GET_CHANNELERS, 3000);
|
||||
_enteredCombat = false;
|
||||
Initialize();
|
||||
_bloodmageList.clear();
|
||||
_deathshaperList.clear();
|
||||
}
|
||||
|
||||
@@ -68,9 +68,29 @@ public:
|
||||
{
|
||||
boss_gurtogg_bloodboilAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
TargetGUID.Clear();
|
||||
TargetThreat = 0;
|
||||
|
||||
BloodboilTimer = 10000;
|
||||
BloodboilCount = 0;
|
||||
AcidGeyserTimer = 1000;
|
||||
AcidicWoundTimer = 6000;
|
||||
ArcingSmashTimer = 19000;
|
||||
EnrageTimer = 600000;
|
||||
FelAcidTimer = 25000;
|
||||
EjectTimer = 10000;
|
||||
BewilderingStrikeTimer = 15000;
|
||||
PhaseChangeTimer = 60000;
|
||||
|
||||
Phase1 = true;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
ObjectGuid TargetGUID;
|
||||
@@ -94,22 +114,7 @@ public:
|
||||
{
|
||||
instance->SetBossState(DATA_GURTOGG_BLOODBOIL, NOT_STARTED);
|
||||
|
||||
TargetGUID.Clear();
|
||||
|
||||
TargetThreat = 0;
|
||||
|
||||
BloodboilTimer = 10000;
|
||||
BloodboilCount = 0;
|
||||
AcidGeyserTimer = 1000;
|
||||
AcidicWoundTimer = 6000;
|
||||
ArcingSmashTimer = 19000;
|
||||
EnrageTimer = 600000;
|
||||
FelAcidTimer = 25000;
|
||||
EjectTimer = 10000;
|
||||
BewilderingStrikeTimer = 15000;
|
||||
PhaseChangeTimer = 60000;
|
||||
|
||||
Phase1 = true;
|
||||
Initialize();
|
||||
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, false);
|
||||
|
||||
@@ -375,15 +375,23 @@ public:
|
||||
|
||||
struct flame_of_azzinothAI : public ScriptedAI
|
||||
{
|
||||
flame_of_azzinothAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
flame_of_azzinothAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
FlameBlastTimer = 15000;
|
||||
CheckTimer = 5000;
|
||||
GlaiveGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
DoZoneInCombat();
|
||||
@@ -474,10 +482,30 @@ public:
|
||||
{
|
||||
boss_illidan_stormrageAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
DoCast(me, SPELL_DUAL_WIELD, true);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
MaievGUID.Clear();
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
FlameGUID[i].Clear();
|
||||
GlaiveGUID[i].Clear();
|
||||
}
|
||||
|
||||
Phase = PHASE_ILLIDAN_NULL;
|
||||
Event = EVENT_NULL;
|
||||
Timer[EVENT_BERSERK] = 1500000;
|
||||
|
||||
HoverPoint = 0;
|
||||
TalkCount = 0;
|
||||
FlightCount = 0;
|
||||
TransformCount = 0;
|
||||
}
|
||||
|
||||
void Reset() override;
|
||||
|
||||
void JustSummoned(Creature* summon) override;
|
||||
@@ -1133,9 +1161,12 @@ public:
|
||||
|
||||
struct boss_maievAI : public ScriptedAI
|
||||
{
|
||||
boss_maievAI(Creature* creature) : ScriptedAI(creature) { };
|
||||
boss_maievAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
MaxTimer = 0;
|
||||
Phase = PHASE_NORMAL_MAIEV;
|
||||
@@ -1143,6 +1174,11 @@ public:
|
||||
Timer[EVENT_MAIEV_STEALTH] = 0;
|
||||
Timer[EVENT_MAIEV_TAUNT] = urand(22, 43) * 1000;
|
||||
Timer[EVENT_MAIEV_SHADOW_STRIKE] = 30000;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND_MAIEV, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, 45738);
|
||||
}
|
||||
@@ -1268,7 +1304,7 @@ public:
|
||||
&& !Timer[EVENT_MAIEV_STEALTH])
|
||||
return;
|
||||
|
||||
Event = EVENT_MAIEV_NULL;
|
||||
EventMaiev Event = EVENT_MAIEV_NULL;
|
||||
for (uint8 i = 1; i <= MaxTimer; ++i)
|
||||
if (Timer[i])
|
||||
{
|
||||
@@ -1334,7 +1370,6 @@ public:
|
||||
private:
|
||||
ObjectGuid IllidanGUID;
|
||||
PhaseIllidan Phase;
|
||||
EventMaiev Event;
|
||||
uint32 Timer[5];
|
||||
uint32 MaxTimer;
|
||||
};
|
||||
@@ -1354,13 +1389,29 @@ public:
|
||||
{
|
||||
npc_akama_illidanAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
JustCreated = true;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
ChannelGUID.Clear();
|
||||
SpiritGUID[0].Clear();
|
||||
SpiritGUID[1].Clear();
|
||||
|
||||
Phase = PHASE_AKAMA_NULL;
|
||||
Timer = 0;
|
||||
|
||||
ChannelCount = 0;
|
||||
TalkCount = 0;
|
||||
Check_Timer = 5000;
|
||||
WalkCount = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
WalkCount = 0;
|
||||
Initialize();
|
||||
instance->SetBossState(DATA_ILLIDAN_STORMRAGE, NOT_STARTED);
|
||||
|
||||
IllidanGUID = instance->GetGuidData(DATA_ILLIDAN_STORMRAGE);
|
||||
@@ -1384,17 +1435,6 @@ public:
|
||||
instance->HandleGameObject(DoorGUID[i], true);
|
||||
}
|
||||
|
||||
ChannelGUID.Clear();
|
||||
SpiritGUID[0].Clear();
|
||||
SpiritGUID[1].Clear();
|
||||
|
||||
Phase = PHASE_AKAMA_NULL;
|
||||
Timer = 0;
|
||||
|
||||
ChannelCount = 0;
|
||||
TalkCount = 0;
|
||||
Check_Timer = 5000;
|
||||
|
||||
KillAllElites();
|
||||
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has strange values..
|
||||
@@ -1552,7 +1592,6 @@ public:
|
||||
break;
|
||||
}
|
||||
Phase = NextPhase;
|
||||
Event = false;
|
||||
}
|
||||
|
||||
void HandleTalkSequence()
|
||||
@@ -1674,7 +1713,7 @@ public:
|
||||
Check_Timer = 5000;
|
||||
} else Check_Timer -= diff;
|
||||
}
|
||||
Event = false;
|
||||
bool Event = false;
|
||||
if (Timer)
|
||||
{
|
||||
if (Timer <= diff)
|
||||
@@ -1755,7 +1794,6 @@ public:
|
||||
bool JustCreated;
|
||||
InstanceScript* instance;
|
||||
PhaseAkama Phase;
|
||||
bool Event;
|
||||
uint32 Timer;
|
||||
ObjectGuid IllidanGUID;
|
||||
ObjectGuid ChannelGUID;
|
||||
@@ -1786,21 +1824,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::Reset()
|
||||
akama->AI()->EnterEvadeMode();
|
||||
}
|
||||
|
||||
MaievGUID.Clear();
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
FlameGUID[i].Clear();
|
||||
GlaiveGUID[i].Clear();
|
||||
}
|
||||
|
||||
Phase = PHASE_ILLIDAN_NULL;
|
||||
Event = EVENT_NULL;
|
||||
Timer[EVENT_BERSERK] = 1500000;
|
||||
|
||||
HoverPoint = 0;
|
||||
TalkCount = 0;
|
||||
FlightCount = 0;
|
||||
TransformCount = 0;
|
||||
Initialize();
|
||||
|
||||
me->SetDisplayId(MODEL_ILLIDAN);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
@@ -1951,9 +1975,12 @@ public:
|
||||
|
||||
struct cage_trap_triggerAI : public ScriptedAI
|
||||
{
|
||||
cage_trap_triggerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
cage_trap_triggerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
IllidanGUID.Clear();
|
||||
|
||||
@@ -1961,6 +1988,11 @@ public:
|
||||
SummonedBeams = false;
|
||||
|
||||
DespawnTimer = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
@@ -2130,14 +2162,20 @@ public:
|
||||
{
|
||||
npc_parasitic_shadowfiendAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
CheckTimer = 5000;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
IllidanGUID = instance->GetGuidData(DATA_ILLIDAN_STORMRAGE);
|
||||
|
||||
CheckTimer = 5000;
|
||||
Initialize();
|
||||
DoCast(me, SPELL_SHADOWFIEND_PASSIVE, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,17 @@ public:
|
||||
{
|
||||
boss_reliquary_of_soulsAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
Counter = 0;
|
||||
Timer = 0;
|
||||
SoulCount = 0;
|
||||
SoulDeathCount = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Phase = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -170,7 +180,7 @@ public:
|
||||
EssenceGUID.Clear();
|
||||
}
|
||||
|
||||
Phase = 0;
|
||||
Initialize();
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
@@ -396,9 +406,19 @@ public:
|
||||
|
||||
struct boss_essence_of_sufferingAI : public ScriptedAI
|
||||
{
|
||||
boss_essence_of_sufferingAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
boss_essence_of_sufferingAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
uint64 StatAuraGUID;
|
||||
void Initialize()
|
||||
{
|
||||
AggroYellTimer = 5000;
|
||||
FixateTimer = 8000;
|
||||
EnrageTimer = 30000;
|
||||
SoulDrainTimer = 45000;
|
||||
AuraTimer = 5000;
|
||||
}
|
||||
|
||||
uint32 AggroYellTimer;
|
||||
uint32 FixateTimer;
|
||||
@@ -408,13 +428,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
StatAuraGUID = 0;
|
||||
|
||||
AggroYellTimer = 5000;
|
||||
FixateTimer = 8000;
|
||||
EnrageTimer = 30000;
|
||||
SoulDrainTimer = 45000;
|
||||
AuraTimer = 5000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) override
|
||||
@@ -519,7 +533,17 @@ public:
|
||||
|
||||
struct boss_essence_of_desireAI : public ScriptedAI
|
||||
{
|
||||
boss_essence_of_desireAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
boss_essence_of_desireAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
RuneShieldTimer = 60000;
|
||||
DeadenTimer = 30000;
|
||||
SoulShockTimer = 5000;
|
||||
}
|
||||
|
||||
uint32 RuneShieldTimer;
|
||||
uint32 DeadenTimer;
|
||||
@@ -527,9 +551,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
RuneShieldTimer = 60000;
|
||||
DeadenTimer = 30000;
|
||||
SoulShockTimer = 5000;
|
||||
Initialize();
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_CONFUSE, true);
|
||||
}
|
||||
|
||||
@@ -622,19 +644,12 @@ public:
|
||||
|
||||
struct boss_essence_of_angerAI : public ScriptedAI
|
||||
{
|
||||
boss_essence_of_angerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
boss_essence_of_angerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
ObjectGuid AggroTargetGUID;
|
||||
|
||||
uint32 CheckTankTimer;
|
||||
uint32 SoulScreamTimer;
|
||||
uint32 SpiteTimer;
|
||||
|
||||
std::list<uint64> SpiteTargetGUID;
|
||||
|
||||
bool CheckedAggro;
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
AggroTargetGUID.Clear();
|
||||
|
||||
@@ -642,11 +657,22 @@ public:
|
||||
SoulScreamTimer = 10000;
|
||||
SpiteTimer = 30000;
|
||||
|
||||
SpiteTargetGUID.clear();
|
||||
|
||||
CheckedAggro = false;
|
||||
}
|
||||
|
||||
ObjectGuid AggroTargetGUID;
|
||||
|
||||
uint32 CheckTankTimer;
|
||||
uint32 SoulScreamTimer;
|
||||
uint32 SpiteTimer;
|
||||
|
||||
bool CheckedAggro;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
Talk(ANGER_SAY_FREED);
|
||||
|
||||
@@ -165,12 +165,21 @@ public:
|
||||
|
||||
struct boss_shade_of_akamaAI : public ScriptedAI
|
||||
{
|
||||
boss_shade_of_akamaAI(Creature* creature) : ScriptedAI(creature), HasKilledAkamaAndReseting(false)
|
||||
boss_shade_of_akamaAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
combatStarted = false;
|
||||
akamaReached = false;
|
||||
HasKilledAkama = false;
|
||||
HasKilledAkamaAndReseting = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if (!HasKilledAkamaAndReseting)
|
||||
@@ -190,10 +199,7 @@ public:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
|
||||
me->SetWalk(true);
|
||||
combatStarted = false;
|
||||
akamaReached = false;
|
||||
HasKilledAkama = false;
|
||||
HasKilledAkamaAndReseting = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -417,18 +423,24 @@ public:
|
||||
{
|
||||
npc_akamaAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
StartChannel = false;
|
||||
StartCombat = false;
|
||||
HasYelledOnce = false;
|
||||
ShadeHasDied = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->setFaction(FACTION_FRIENDLY);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
DoCast(me, SPELL_STEALTH);
|
||||
StartChannel = false;
|
||||
StartCombat = false;
|
||||
HasYelledOnce = false;
|
||||
ShadeHasDied = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -631,15 +643,21 @@ public:
|
||||
{
|
||||
npc_creature_generator_akamaAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
doSpawning = false;
|
||||
leftSide = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Summons.DespawnAll();
|
||||
|
||||
doSpawning = false;
|
||||
leftSide = false;
|
||||
Initialize();
|
||||
|
||||
if (me->GetPositionY() < 400.0f)
|
||||
leftSide = true;
|
||||
@@ -739,8 +757,14 @@ public:
|
||||
{
|
||||
npc_ashtongue_sorcererAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
startedBanishing = false;
|
||||
switchToCombat = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -760,8 +784,7 @@ public:
|
||||
}
|
||||
|
||||
summonerGuid.Clear();
|
||||
startedBanishing = false;
|
||||
switchToCombat = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -1111,14 +1134,20 @@ public:
|
||||
{
|
||||
npc_ashtongue_spiritbinderAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
spiritMend = false;
|
||||
chainHeal = false;
|
||||
summonerGuid.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
spiritMend = false;
|
||||
chainHeal = false;
|
||||
summonerGuid.Clear();
|
||||
Initialize();
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE)))
|
||||
AttackStart(target);
|
||||
|
||||
@@ -223,16 +223,22 @@ public:
|
||||
{
|
||||
npc_volcanoAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
wait = 3000;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//DoCast(me, SPELL_VOLCANIC_ERUPTION);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
wait = 3000;
|
||||
Initialize();
|
||||
}
|
||||
uint32 wait;
|
||||
|
||||
|
||||
@@ -63,7 +63,17 @@ public:
|
||||
|
||||
struct npc_doom_blossomAI : public ScriptedAI
|
||||
{
|
||||
npc_doom_blossomAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_doom_blossomAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
CheckTeronTimer = 5000;
|
||||
ShadowBoltTimer = 12000;
|
||||
TeronGUID.Clear();
|
||||
}
|
||||
|
||||
uint32 CheckTeronTimer;
|
||||
uint32 ShadowBoltTimer;
|
||||
@@ -71,9 +81,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
CheckTeronTimer = 5000;
|
||||
ShadowBoltTimer = 12000;
|
||||
TeronGUID.Clear();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
@@ -132,7 +140,19 @@ public:
|
||||
|
||||
struct npc_shadowy_constructAI : public ScriptedAI
|
||||
{
|
||||
npc_shadowy_constructAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_shadowy_constructAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
GhostGUID.Clear();
|
||||
TeronGUID.Clear();
|
||||
|
||||
CheckPlayerTimer = 2000;
|
||||
CheckTeronTimer = 5000;
|
||||
}
|
||||
|
||||
ObjectGuid GhostGUID;
|
||||
ObjectGuid TeronGUID;
|
||||
@@ -142,11 +162,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
GhostGUID.Clear();
|
||||
TeronGUID.Clear();
|
||||
|
||||
CheckPlayerTimer = 2000;
|
||||
CheckTeronTimer = 5000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
@@ -224,9 +240,25 @@ public:
|
||||
{
|
||||
boss_teron_gorefiendAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
IncinerateTimer = urand(20000, 31000);
|
||||
SummonDoomBlossomTimer = 12000;
|
||||
EnrageTimer = 600000;
|
||||
CrushingShadowsTimer = 22000;
|
||||
SummonShadowsTimer = 60000;
|
||||
RandomYellTimer = 50000;
|
||||
|
||||
AggroTimer = 20000;
|
||||
AggroTargetGUID.Clear();
|
||||
Intro = false;
|
||||
Done = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 IncinerateTimer;
|
||||
@@ -248,21 +280,11 @@ public:
|
||||
{
|
||||
instance->SetBossState(DATA_TERON_GOREFIEND, NOT_STARTED);
|
||||
|
||||
IncinerateTimer = urand(20000, 31000);
|
||||
SummonDoomBlossomTimer = 12000;
|
||||
EnrageTimer = 600000;
|
||||
CrushingShadowsTimer = 22000;
|
||||
SummonShadowsTimer = 60000;
|
||||
RandomYellTimer = 50000;
|
||||
Initialize();
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
// Start off unattackable so that the intro is done properly
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
AggroTimer = 20000;
|
||||
AggroTargetGUID.Clear();
|
||||
Intro = false;
|
||||
Done = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
@@ -129,6 +129,17 @@ public:
|
||||
{
|
||||
npc_blood_elf_council_voice_triggerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
EnrageTimer = 900000; // 15 minutes
|
||||
AggroYellTimer = 500;
|
||||
|
||||
YellCounter = 0;
|
||||
|
||||
EventStarted = false;
|
||||
}
|
||||
|
||||
ObjectGuid Council[4];
|
||||
@@ -142,12 +153,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
EnrageTimer = 900000; // 15 minutes
|
||||
AggroYellTimer = 500;
|
||||
|
||||
YellCounter = 0;
|
||||
|
||||
EventStarted = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
// finds and stores the GUIDs for each Council member using instance data system.
|
||||
@@ -223,9 +229,19 @@ public:
|
||||
{
|
||||
npc_illidari_councilAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
CheckTimer = 2000;
|
||||
EndEventTimer = 0;
|
||||
|
||||
DeathCount = 0;
|
||||
EventBegun = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
ObjectGuid Council[4];
|
||||
@@ -239,10 +255,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
CheckTimer = 2000;
|
||||
EndEventTimer = 0;
|
||||
|
||||
DeathCount = 0;
|
||||
Initialize();
|
||||
|
||||
Creature* pMember = NULL;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
@@ -263,8 +276,6 @@ public:
|
||||
if (Creature* VoiceTrigger = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_BLOOD_ELF_COUNCIL_VOICE)))
|
||||
VoiceTrigger->AI()->EnterEvadeMode();
|
||||
|
||||
EventBegun = false;
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(11686);
|
||||
@@ -451,7 +462,19 @@ public:
|
||||
|
||||
struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_gathios_the_shattererAI(Creature* creature) : boss_illidari_councilAI(creature) { }
|
||||
boss_gathios_the_shattererAI(Creature* creature) : boss_illidari_councilAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
ConsecrationTimer = 40000;
|
||||
HammerOfJusticeTimer = 10000;
|
||||
SealTimer = 40000;
|
||||
AuraTimer = 90000;
|
||||
BlessingTimer = 60000;
|
||||
}
|
||||
|
||||
uint32 ConsecrationTimer;
|
||||
uint32 HammerOfJusticeTimer;
|
||||
@@ -461,11 +484,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
ConsecrationTimer = 40000;
|
||||
HammerOfJusticeTimer = 10000;
|
||||
SealTimer = 40000;
|
||||
AuraTimer = 90000;
|
||||
BlessingTimer = 60000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
@@ -583,7 +602,20 @@ public:
|
||||
|
||||
struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_high_nethermancer_zerevorAI(Creature* creature) : boss_illidari_councilAI(creature) { }
|
||||
boss_high_nethermancer_zerevorAI(Creature* creature) : boss_illidari_councilAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
BlizzardTimer = urand(30, 91) * 1000;
|
||||
FlamestrikeTimer = urand(30, 91) * 1000;
|
||||
ArcaneBoltTimer = 10000;
|
||||
DampenMagicTimer = 2000;
|
||||
ArcaneExplosionTimer = 14000;
|
||||
Cooldown = 0;
|
||||
}
|
||||
|
||||
uint32 BlizzardTimer;
|
||||
uint32 FlamestrikeTimer;
|
||||
@@ -594,12 +626,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
BlizzardTimer = urand(30, 91) * 1000;
|
||||
FlamestrikeTimer = urand(30, 91) * 1000;
|
||||
ArcaneBoltTimer = 10000;
|
||||
DampenMagicTimer = 2000;
|
||||
ArcaneExplosionTimer = 14000;
|
||||
Cooldown = 0;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
@@ -687,7 +714,18 @@ public:
|
||||
|
||||
struct boss_lady_malandeAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_lady_malandeAI(Creature* creature) : boss_illidari_councilAI(creature) { }
|
||||
boss_lady_malandeAI(Creature* creature) : boss_illidari_councilAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
EmpoweredSmiteTimer = 38000;
|
||||
CircleOfHealingTimer = 20000;
|
||||
DivineWrathTimer = 40000;
|
||||
ReflectiveShieldTimer = 0;
|
||||
}
|
||||
|
||||
uint32 EmpoweredSmiteTimer;
|
||||
uint32 CircleOfHealingTimer;
|
||||
@@ -696,10 +734,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
EmpoweredSmiteTimer = 38000;
|
||||
CircleOfHealingTimer = 20000;
|
||||
DivineWrathTimer = 40000;
|
||||
ReflectiveShieldTimer = 0;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
@@ -765,9 +800,19 @@ public:
|
||||
|
||||
struct boss_veras_darkshadowAI : public boss_illidari_councilAI
|
||||
{
|
||||
boss_veras_darkshadowAI(Creature* creature) : boss_illidari_councilAI(creature) { }
|
||||
boss_veras_darkshadowAI(Creature* creature) : boss_illidari_councilAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
uint64 EnvenomTargetGUID;
|
||||
void Initialize()
|
||||
{
|
||||
DeadlyPoisonTimer = 20000;
|
||||
VanishTimer = urand(60, 121) * 1000;
|
||||
AppearEnvenomTimer = 150000;
|
||||
|
||||
HasVanished = false;
|
||||
}
|
||||
|
||||
uint32 DeadlyPoisonTimer;
|
||||
uint32 VanishTimer;
|
||||
@@ -777,13 +822,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
EnvenomTargetGUID = 0;
|
||||
|
||||
DeadlyPoisonTimer = 20000;
|
||||
VanishTimer = urand(60, 121) * 1000;
|
||||
AppearEnvenomTimer = 150000;
|
||||
|
||||
HasVanished = false;
|
||||
Initialize();
|
||||
me->SetVisible(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
+43
-19
@@ -111,9 +111,19 @@ public:
|
||||
{
|
||||
boss_fathomlord_karathressAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
CataclysmicBolt_Timer = 10000;
|
||||
Enrage_Timer = 600000; //10 minutes
|
||||
SearNova_Timer = 20000 + rand32() % 40000; // 20 - 60 seconds
|
||||
|
||||
BlessingOfTides = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 CataclysmicBolt_Timer;
|
||||
@@ -126,11 +136,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
CataclysmicBolt_Timer = 10000;
|
||||
Enrage_Timer = 600000; //10 minutes
|
||||
SearNova_Timer = 20000 + rand32() % 40000; // 20 - 60 seconds
|
||||
|
||||
BlessingOfTides = false;
|
||||
Initialize();
|
||||
|
||||
ObjectGuid RAdvisors[MAX_ADVISORS];
|
||||
RAdvisors[0] = instance->GetGuidData(DATA_SHARKKIS);
|
||||
@@ -304,9 +310,20 @@ public:
|
||||
{
|
||||
boss_fathomguard_sharkkisAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
LeechingThrow_Timer = 20000;
|
||||
TheBeastWithin_Timer = 30000;
|
||||
Multishot_Timer = 15000;
|
||||
Pet_Timer = 10000;
|
||||
|
||||
pet = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 LeechingThrow_Timer;
|
||||
@@ -320,12 +337,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
LeechingThrow_Timer = 20000;
|
||||
TheBeastWithin_Timer = 30000;
|
||||
Multishot_Timer = 15000;
|
||||
Pet_Timer = 10000;
|
||||
|
||||
pet = false;
|
||||
Initialize();
|
||||
|
||||
Creature* Pet = ObjectAccessor::GetCreature(*me, SummonedPet);
|
||||
if (Pet && Pet->IsAlive())
|
||||
@@ -442,9 +454,18 @@ public:
|
||||
{
|
||||
boss_fathomguard_tidalvessAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
FrostShock_Timer = 25000;
|
||||
Spitfire_Timer = 60000;
|
||||
PoisonCleansing_Timer = 30000;
|
||||
Earthbind_Timer = 45000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 FrostShock_Timer;
|
||||
@@ -454,10 +475,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
FrostShock_Timer = 25000;
|
||||
Spitfire_Timer = 60000;
|
||||
PoisonCleansing_Timer = 30000;
|
||||
Earthbind_Timer = 45000;
|
||||
Initialize();
|
||||
|
||||
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -558,9 +576,18 @@ public:
|
||||
{
|
||||
boss_fathomguard_caribdisAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
WaterBoltVolley_Timer = 35000;
|
||||
TidalSurge_Timer = 15000 + rand32() % 5000;
|
||||
Heal_Timer = 55000;
|
||||
Cyclone_Timer = 30000 + rand32() % 10000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 WaterBoltVolley_Timer;
|
||||
@@ -570,10 +597,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
WaterBoltVolley_Timer = 35000;
|
||||
TidalSurge_Timer = 15000 + rand32() % 5000;
|
||||
Heal_Timer = 55000;
|
||||
Cyclone_Timer = 30000 + rand32() % 10000;
|
||||
Initialize();
|
||||
|
||||
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
+19
-12
@@ -93,9 +93,27 @@ public:
|
||||
{
|
||||
boss_hydross_the_unstableAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
beams[0].Clear();
|
||||
beams[1].Clear();
|
||||
PosCheck_Timer = 2500;
|
||||
MarkOfHydross_Timer = 15000;
|
||||
MarkOfCorruption_Timer = 15000;
|
||||
WaterTomb_Timer = 7000;
|
||||
VileSludge_Timer = 7000;
|
||||
MarkOfHydross_Count = 0;
|
||||
MarkOfCorruption_Count = 0;
|
||||
EnrageTimer = 600000;
|
||||
|
||||
CorruptedForm = false;
|
||||
beam = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
ObjectGuid beams[2];
|
||||
@@ -114,18 +132,8 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
DeSummonBeams();
|
||||
beams[0].Clear();
|
||||
beams[1].Clear();
|
||||
PosCheck_Timer = 2500;
|
||||
MarkOfHydross_Timer = 15000;
|
||||
MarkOfCorruption_Timer = 15000;
|
||||
WaterTomb_Timer = 7000;
|
||||
VileSludge_Timer = 7000;
|
||||
MarkOfHydross_Count = 0;
|
||||
MarkOfCorruption_Count = 0;
|
||||
EnrageTimer = 600000;
|
||||
Initialize();
|
||||
|
||||
CorruptedForm = false;
|
||||
me->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
|
||||
@@ -133,7 +141,6 @@ public:
|
||||
me->SetDisplayId(MODEL_CLEAN);
|
||||
|
||||
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
|
||||
beam = false;
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -147,12 +147,34 @@ public:
|
||||
{
|
||||
boss_lady_vashjAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
Intro = false;
|
||||
JustCreated = true;
|
||||
CanAttack = false;
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // set it only once on Creature create (no need do intro if wiped)
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
AggroTimer = 19000;
|
||||
ShockBlastTimer = 1 + rand32() % 60000;
|
||||
EntangleTimer = 30000;
|
||||
StaticChargeTimer = 10000 + rand32() % 15000;
|
||||
ForkedLightningTimer = 2000;
|
||||
CheckTimer = 15000;
|
||||
EnchantedElementalTimer = 5000;
|
||||
TaintedElementalTimer = 50000;
|
||||
CoilfangEliteTimer = 45000 + rand32() % 5000;
|
||||
CoilfangStriderTimer = 60000 + rand32() % 10000;
|
||||
SummonSporebatTimer = 10000;
|
||||
SummonSporebatStaticTimer = 30000;
|
||||
EnchantedElementalPos = 0;
|
||||
Phase = 0;
|
||||
|
||||
Entangle = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
ObjectGuid ShieldGeneratorChannel[4];
|
||||
@@ -179,22 +201,8 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
AggroTimer = 19000;
|
||||
ShockBlastTimer = 1 + rand32() % 60000;
|
||||
EntangleTimer = 30000;
|
||||
StaticChargeTimer = 10000 + rand32() % 15000;
|
||||
ForkedLightningTimer = 2000;
|
||||
CheckTimer = 15000;
|
||||
EnchantedElementalTimer = 5000;
|
||||
TaintedElementalTimer = 50000;
|
||||
CoilfangEliteTimer = 45000 + rand32() % 5000;
|
||||
CoilfangStriderTimer = 60000 + rand32() % 10000;
|
||||
SummonSporebatTimer = 10000;
|
||||
SummonSporebatStaticTimer = 30000;
|
||||
EnchantedElementalPos = 0;
|
||||
Phase = 0;
|
||||
Initialize();
|
||||
|
||||
Entangle = false;
|
||||
if (JustCreated)
|
||||
{
|
||||
CanAttack = false;
|
||||
@@ -555,9 +563,20 @@ public:
|
||||
{
|
||||
npc_enchanted_elementalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Move = 0;
|
||||
Phase = 1;
|
||||
|
||||
X = ElementWPPos[0][0];
|
||||
Y = ElementWPPos[0][1];
|
||||
Z = ElementWPPos[0][2];
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
uint32 Move;
|
||||
uint32 Phase;
|
||||
@@ -569,12 +588,7 @@ public:
|
||||
{
|
||||
me->SetSpeed(MOVE_WALK, 0.6f); // walk
|
||||
me->SetSpeed(MOVE_RUN, 0.6f); // run
|
||||
Move = 0;
|
||||
Phase = 1;
|
||||
|
||||
X = ElementWPPos[0][0];
|
||||
Y = ElementWPPos[0][1];
|
||||
Z = ElementWPPos[0][2];
|
||||
Initialize();
|
||||
|
||||
//search for nearest waypoint (up on stairs)
|
||||
for (uint32 i = 1; i < 8; ++i)
|
||||
@@ -644,9 +658,16 @@ public:
|
||||
{
|
||||
npc_tainted_elementalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PoisonBoltTimer = 5000 + rand32() % 5000;
|
||||
DespawnTimer = 30000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 PoisonBoltTimer;
|
||||
@@ -654,8 +675,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
PoisonBoltTimer = 5000 + rand32() % 5000;
|
||||
DespawnTimer = 30000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -712,10 +732,19 @@ public:
|
||||
{
|
||||
npc_toxic_sporebatAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
EnterEvadeMode();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
MovementTimer = 0;
|
||||
ToxicSporeTimer = 5000;
|
||||
BoltTimer = 5500;
|
||||
CheckTimer = 1000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 MovementTimer;
|
||||
@@ -727,10 +756,7 @@ public:
|
||||
{
|
||||
me->SetDisableGravity(true);
|
||||
me->setFaction(14);
|
||||
MovementTimer = 0;
|
||||
ToxicSporeTimer = 5000;
|
||||
BoltTimer = 5500;
|
||||
CheckTimer = 1000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) override
|
||||
@@ -808,17 +834,23 @@ public:
|
||||
{
|
||||
npc_shield_generator_channelAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
CheckTimer = 0;
|
||||
Cast = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
uint32 CheckTimer;
|
||||
bool Cast;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
CheckTimer = 0;
|
||||
Cast = false;
|
||||
Initialize();
|
||||
me->SetDisplayId(11686); // invisible
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -73,13 +73,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 OgreGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
OgreGUID = 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
};
|
||||
|
||||
|
||||
@@ -459,7 +459,10 @@ class spell_dru_innervate : public SpellScriptLoader
|
||||
|
||||
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
amount = CalculatePct(int32(GetUnitOwner()->GetCreatePowers(POWER_MANA) / aurEff->GetTotalTicks()), amount);
|
||||
if (Unit* caster = GetCaster())
|
||||
amount = int32(CalculatePct(caster->GetCreatePowers(POWER_MANA), amount) / aurEff->GetTotalTicks());
|
||||
else
|
||||
amount = 0;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in new issue
Block a user