SOTA update
-proper warning text (under attack, destroyed, capture..) -proper icons on map for gate states -fixed second round starting --HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
DELETE FROM `trinity_string` WHERE `entry` BETWEEN 10056 AND 10073;
|
||||||
|
INSERT INTO `trinity_string` VALUES
|
||||||
|
(10056,'The battle for Strand of the Ancients begins in 2 minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10057,'The battle for Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10058,'The battle for Strand of the Ancients begins in 30 seconds. Prepare yourselves!.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10059,'Let the battle for Strand of the Ancients begin!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10060,'The %s is under attack!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10061,'The %s was destroyed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10062,'Round 1 - finished!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10063,'The Alliance captured the titan portal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10064,'The Horde captured the titan portal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10065,'Round 2 of the Battle for the Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10066,'Round 2 begins in 30 seconds. Prepare yourselves!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10067,'The chamber has been breached! The titan relic is vulnerable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10068,'The Alliance captured the South Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10069,'The Alliance captured the West Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10070,'The Alliance captured the East Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10071,'The Horde captured the South Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10072,'The Horde captured the West Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10073,'The Horde captured the East Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||||
+15
-3
@@ -15363,9 +15363,21 @@ INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_
|
|||||||
(10056,'The battle for Strand of the Ancients begins in 2 minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(10056,'The battle for Strand of the Ancients begins in 2 minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(10057,'The battle for Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(10057,'The battle for Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(10058,'The battle for Strand of the Ancients begins in 30 seconds. Prepare yourselves!.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(10058,'The battle for Strand of the Ancients begins in 30 seconds. Prepare yourselves!.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(10059, 'Let the battle for Strand of the Ancients begin!.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
(10059,'Let the battle for Strand of the Ancients begin!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(10061, '%s is destroyed!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
(10060,'The %s is under attack!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(10060, '%s is under attack!', NULL, NULL ,NULL , NULL, NULL, NULL, NULL, NULL),
|
(10061,'The %s was destroyed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10062,'Round 1 - finished!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10063,'The Alliance captured the titan portal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10064,'The Horde captured the titan portal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10065,'Round 2 of the Battle for the Strand of the Ancients begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10066,'Round 2 begins in 30 seconds. Prepare yourselves!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10067,'The chamber has been breached! The titan relic is vulnerable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10068,'The Alliance captured the South Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10069,'The Alliance captured the West Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10070,'The Alliance captured the East Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10071,'The Horde captured the South Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10072,'The Horde captured the West Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(10073,'The Horde captured the East Graveyard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||||
(11000, '|cffffff00[|c00077766Autobroadcast|cffffff00]: |cFFF222FF%s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
(11000, '|cffffff00[|c00077766Autobroadcast|cffffff00]: |cFFF222FF%s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||||
(11001, 'You have not chosen -1 or the current realmID that you are on.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
(11001, 'You have not chosen -1 or the current realmID that you are on.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
/*!40000 ALTER TABLE `trinity_string` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `trinity_string` ENABLE KEYS */;
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ void BattleGround::Update(uint32 diff)
|
|||||||
|
|
||||||
StartingEventOpenDoors();
|
StartingEventOpenDoors();
|
||||||
|
|
||||||
SendMessageToAll(m_StartMessageIds[BG_STARTING_EVENT_FOURTH], CHAT_MSG_BG_SYSTEM_NEUTRAL);
|
SendWarningToAll(m_StartMessageIds[BG_STARTING_EVENT_FOURTH]);
|
||||||
SetStatus(STATUS_IN_PROGRESS);
|
SetStatus(STATUS_IN_PROGRESS);
|
||||||
SetStartDelayTime(m_StartDelayTimes[BG_STARTING_EVENT_FOURTH]);
|
SetStartDelayTime(m_StartDelayTimes[BG_STARTING_EVENT_FOURTH]);
|
||||||
|
|
||||||
@@ -1634,6 +1634,34 @@ void BattleGround::PSendMessageToAll(int32 entry, ChatMsg type, Player const* so
|
|||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BattleGround::SendWarningToAll(int32 entry, ...)
|
||||||
|
{
|
||||||
|
const char *format = objmgr.GetTrinityStringForDBCLocale(entry);
|
||||||
|
va_list ap;
|
||||||
|
char str [1024];
|
||||||
|
va_start(ap, entry);
|
||||||
|
vsnprintf(str,1024,format, ap);
|
||||||
|
va_end(ap);
|
||||||
|
std::string msg = (std::string)str;
|
||||||
|
|
||||||
|
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||||
|
|
||||||
|
data << (uint8)CHAT_MSG_RAID_BOSS_EMOTE;
|
||||||
|
data << (uint32)LANG_UNIVERSAL;
|
||||||
|
data << (uint64)0;
|
||||||
|
data << (uint32)0; // 2.1.0
|
||||||
|
data << (uint32)1;
|
||||||
|
data << (uint8)0;
|
||||||
|
data << (uint64)0;
|
||||||
|
data << (uint32)(strlen(msg.c_str())+1);
|
||||||
|
data << msg.c_str();
|
||||||
|
data << (uint8)0;
|
||||||
|
for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||||
|
if (Player *plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
|
||||||
|
if (plr->GetSession())
|
||||||
|
plr->GetSession()->SendPacket(&data);
|
||||||
|
}
|
||||||
|
|
||||||
void BattleGround::SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 arg1, int32 arg2)
|
void BattleGround::SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 arg1, int32 arg2)
|
||||||
{
|
{
|
||||||
Trinity::BattleGround2ChatBuilder bg_builder(type, entry, source, arg1, arg2);
|
Trinity::BattleGround2ChatBuilder bg_builder(type, entry, source, arg1, arg2);
|
||||||
|
|||||||
+13
-1
@@ -258,6 +258,15 @@ enum BattleGroundStartingEventsIds
|
|||||||
};
|
};
|
||||||
#define BG_STARTING_EVENT_COUNT 4
|
#define BG_STARTING_EVENT_COUNT 4
|
||||||
|
|
||||||
|
enum BG_OBJECT_DMG_HIT_TYPE
|
||||||
|
{
|
||||||
|
BG_OBJECT_DMG_HIT_TYPE_JUST_DAMAGED = 0,
|
||||||
|
BG_OBJECT_DMG_HIT_TYPE_DAMAGED = 1,
|
||||||
|
BG_OBJECT_DMG_HIT_TYPE_JUST_HIGH_DAMAGED = 2,
|
||||||
|
BG_OBJECT_DMG_HIT_TYPE_HIGH_DAMAGED = 3,
|
||||||
|
BG_OBJECT_DMG_HIT_TYPE_JUST_DESTROYED = 4
|
||||||
|
};
|
||||||
|
|
||||||
enum GroupJoinBattlegroundResult
|
enum GroupJoinBattlegroundResult
|
||||||
{
|
{
|
||||||
// positive values are indexes in BattlemasterList.dbc
|
// positive values are indexes in BattlemasterList.dbc
|
||||||
@@ -330,6 +339,8 @@ class BattleGround
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void DestroyGate(Player* pl, GameObject* go, uint32 destroyedEvent) {}
|
||||||
|
|
||||||
/* achievement req. */
|
/* achievement req. */
|
||||||
virtual bool IsAllNodesConrolledByTeam(uint32 /*team*/) const { return false; }
|
virtual bool IsAllNodesConrolledByTeam(uint32 /*team*/) const { return false; }
|
||||||
bool IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const;
|
bool IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const;
|
||||||
@@ -468,6 +479,7 @@ class BattleGround
|
|||||||
void EndBattleGround(uint32 winner);
|
void EndBattleGround(uint32 winner);
|
||||||
void BlockMovement(Player *plr);
|
void BlockMovement(Player *plr);
|
||||||
|
|
||||||
|
void SendWarningToAll(int32 entry, ...);
|
||||||
void SendMessageToAll(int32 entry, ChatMsg type, Player const* source = NULL);
|
void SendMessageToAll(int32 entry, ChatMsg type, Player const* source = NULL);
|
||||||
void PSendMessageToAll(int32 entry, ChatMsg type, Player const* source, ...);
|
void PSendMessageToAll(int32 entry, ChatMsg type, Player const* source, ...);
|
||||||
|
|
||||||
@@ -512,7 +524,7 @@ class BattleGround
|
|||||||
virtual void EventPlayerCapturedFlag(Player* /*player*/) {}
|
virtual void EventPlayerCapturedFlag(Player* /*player*/) {}
|
||||||
void EventPlayerLoggedIn(Player* player, uint64 plr_guid);
|
void EventPlayerLoggedIn(Player* player, uint64 plr_guid);
|
||||||
void EventPlayerLoggedOut(Player* player);
|
void EventPlayerLoggedOut(Player* player);
|
||||||
virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*target_obj*/, uint32 /*eventId*/) {}
|
virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint8 hitType, uint32 destroyedEvent) {}
|
||||||
virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){}
|
virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){}
|
||||||
|
|
||||||
/* Death related */
|
/* Death related */
|
||||||
|
|||||||
+112
-45
@@ -34,6 +34,10 @@ BattleGroundSA::BattleGroundSA()
|
|||||||
m_BgObjects.resize(BG_SA_MAXOBJ);
|
m_BgObjects.resize(BG_SA_MAXOBJ);
|
||||||
m_BgCreatures.resize(BG_SA_MAXNPC + BG_SA_MAX_GY);
|
m_BgCreatures.resize(BG_SA_MAXNPC + BG_SA_MAX_GY);
|
||||||
TimerEnabled = false;
|
TimerEnabled = false;
|
||||||
|
UpdateWaitTimer = 0;
|
||||||
|
SignaledRoundTwo = false;
|
||||||
|
SignaledRoundTwoHalfMin = false;
|
||||||
|
InitSecondRound = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BattleGroundSA::~BattleGroundSA()
|
BattleGroundSA::~BattleGroundSA()
|
||||||
@@ -228,22 +232,60 @@ void BattleGroundSA::StartShips()
|
|||||||
|
|
||||||
void BattleGroundSA::Update(uint32 diff)
|
void BattleGroundSA::Update(uint32 diff)
|
||||||
{
|
{
|
||||||
|
if (InitSecondRound)
|
||||||
|
{
|
||||||
|
if (UpdateWaitTimer < diff)
|
||||||
|
{
|
||||||
|
if (!SignaledRoundTwo)
|
||||||
|
{
|
||||||
|
SignaledRoundTwo = true;
|
||||||
|
InitSecondRound = false;
|
||||||
|
SendMessageToAll(LANG_BG_SA_ROUND_TWO_ONE_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL);
|
||||||
|
ResetObjs();
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
UpdateWaitTimer -= diff;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
BattleGround::Update(diff);
|
BattleGround::Update(diff);
|
||||||
TotalTime += diff;
|
TotalTime += diff;
|
||||||
|
|
||||||
if (status == BG_SA_WARMUP || status == BG_SA_SECOND_WARMUP)
|
if (status == BG_SA_WARMUP )
|
||||||
{
|
{
|
||||||
if (TotalTime >= BG_SA_WARMUPLENGTH)
|
if (TotalTime >= BG_SA_WARMUPLENGTH)
|
||||||
{
|
{
|
||||||
TotalTime = 0;
|
TotalTime = 0;
|
||||||
ToggleTimer();
|
ToggleTimer();
|
||||||
DemolisherStartState(false);
|
DemolisherStartState(false);
|
||||||
status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
|
status = BG_SA_ROUND_ONE;
|
||||||
}
|
}
|
||||||
if (TotalTime >= BG_SA_BOAT_START)
|
if (TotalTime >= BG_SA_BOAT_START)
|
||||||
StartShips();
|
StartShips();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (status == BG_SA_SECOND_WARMUP)
|
||||||
|
{
|
||||||
|
if (TotalTime >= 60000)
|
||||||
|
{
|
||||||
|
SendWarningToAll(LANG_BG_SA_HAS_BEGUN);
|
||||||
|
TotalTime = 0;
|
||||||
|
ToggleTimer();
|
||||||
|
DemolisherStartState(false);
|
||||||
|
status = BG_SA_ROUND_TWO;
|
||||||
|
}
|
||||||
|
if (TotalTime >= 30000)
|
||||||
|
{
|
||||||
|
if (!SignaledRoundTwoHalfMin)
|
||||||
|
{
|
||||||
|
SignaledRoundTwoHalfMin = true;
|
||||||
|
SendMessageToAll(LANG_BG_SA_ROUND_TWO_START_HALF_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
StartShips();
|
||||||
|
return;
|
||||||
|
}
|
||||||
else if (GetStatus() == STATUS_IN_PROGRESS)
|
else if (GetStatus() == STATUS_IN_PROGRESS)
|
||||||
{
|
{
|
||||||
if (status == BG_SA_ROUND_ONE)
|
if (status == BG_SA_ROUND_ONE)
|
||||||
@@ -425,30 +467,35 @@ void BattleGroundSA::TeleportPlayers()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleGroundSA::EventPlayerDamagedGO(Player* plr, GameObject* /*go*/, uint32 event)
|
void BattleGroundSA::EventPlayerDamagedGO(Player* plr, GameObject* go, uint8 hitType, uint32 destroyedEvent)
|
||||||
{
|
{
|
||||||
switch(event)
|
if (!go || !go->GetGOInfo())
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch(hitType)
|
||||||
{
|
{
|
||||||
case 19046: //Green gate destroyed
|
case BG_OBJECT_DMG_HIT_TYPE_JUST_DAMAGED://under attack
|
||||||
DestroyGate(BG_SA_GREEN_GATE,plr);
|
SendWarningToAll(LANG_BG_SA_IS_UNDER_ATTACK, go->GetGOInfo()->name);
|
||||||
return;
|
break;
|
||||||
case 19045: //blue gate
|
case BG_OBJECT_DMG_HIT_TYPE_DAMAGED:
|
||||||
DestroyGate(BG_SA_BLUE_GATE,plr);
|
break;
|
||||||
return;
|
case BG_OBJECT_DMG_HIT_TYPE_JUST_HIGH_DAMAGED:
|
||||||
case 19047: //red gate
|
{
|
||||||
DestroyGate(BG_SA_RED_GATE,plr);
|
uint32 i = GetGateIDFromDestroyEventID(destroyedEvent);
|
||||||
return;
|
GateStatus[i] = BG_SA_GATE_DAMAGED;
|
||||||
case 19048: //purple gate
|
uint32 uws = GetWorldStateFromGateID(i);
|
||||||
DestroyGate(BG_SA_PURPLE_GATE,plr);
|
if (uws)
|
||||||
return;
|
UpdateWorldState(uws, GateStatus[i]);
|
||||||
case 19049: //yellow gate
|
break;
|
||||||
DestroyGate(BG_SA_YELLOW_GATE,plr);
|
}
|
||||||
return;
|
case BG_OBJECT_DMG_HIT_TYPE_HIGH_DAMAGED:
|
||||||
case 19837: //ancient gate
|
break;
|
||||||
DestroyGate(BG_SA_ANCIENT_GATE,plr);
|
case BG_OBJECT_DMG_HIT_TYPE_JUST_DESTROYED://handled at DestroyGate()
|
||||||
return;
|
if (destroyedEvent == 19837)
|
||||||
default:
|
SendWarningToAll(LANG_BG_SA_CHAMBER_BREACHED);
|
||||||
return;
|
else
|
||||||
|
SendWarningToAll(LANG_BG_SA_WAS_DESTROYED, go->GetGOInfo()->name);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,8 +547,9 @@ void BattleGroundSA::DemolisherStartState(bool start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleGroundSA::DestroyGate(uint32 i, Player* pl)
|
void BattleGroundSA::DestroyGate(Player* pl, GameObject* /*go*/, uint32 destroyedEvent)
|
||||||
{
|
{
|
||||||
|
uint32 i = GetGateIDFromDestroyEventID(destroyedEvent);
|
||||||
if (!GateStatus[i])
|
if (!GateStatus[i])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -510,36 +558,35 @@ void BattleGroundSA::DestroyGate(uint32 i, Player* pl)
|
|||||||
if (g->GetGOValue()->building.health == 0)
|
if (g->GetGOValue()->building.health == 0)
|
||||||
{
|
{
|
||||||
GateStatus[i] = BG_SA_GATE_DESTROYED;
|
GateStatus[i] = BG_SA_GATE_DESTROYED;
|
||||||
uint32 uws = 0;
|
uint32 uws = GetWorldStateFromGateID(i);
|
||||||
|
if (uws)
|
||||||
|
UpdateWorldState(uws, GateStatus[i]);
|
||||||
|
bool rewardHonor = true;
|
||||||
switch(i)
|
switch(i)
|
||||||
{
|
{
|
||||||
case 0:
|
case BG_SA_GREEN_GATE:
|
||||||
uws = BG_SA_GREEN_GATEWS;
|
if (GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED)
|
||||||
|
rewardHonor = false;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case BG_SA_BLUE_GATE:
|
||||||
uws = BG_SA_YELLOW_GATEWS;
|
if (GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED)
|
||||||
|
rewardHonor = false;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case BG_SA_RED_GATE:
|
||||||
uws = BG_SA_BLUE_GATEWS;
|
if (GateStatus[BG_SA_PURPLE_GATE] == BG_SA_GATE_DESTROYED)
|
||||||
|
rewardHonor = false;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case BG_SA_PURPLE_GATE:
|
||||||
uws = BG_SA_RED_GATEWS;
|
if (GateStatus[BG_SA_RED_GATE] == BG_SA_GATE_DESTROYED)
|
||||||
break;
|
rewardHonor = false;
|
||||||
case 4:
|
|
||||||
uws = BG_SA_PURPLE_GATEWS;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
uws = BG_SA_ANCIENT_GATEWS;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(false);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < 5)
|
if (i < 5)
|
||||||
DelObject(i+9);
|
DelObject(i+9);
|
||||||
UpdateWorldState(uws, GateStatus[i]);
|
|
||||||
UpdatePlayerScore(pl,SCORE_DESTROYED_WALL, 1);
|
UpdatePlayerScore(pl,SCORE_DESTROYED_WALL, 1);
|
||||||
|
if (rewardHonor)
|
||||||
|
UpdatePlayerScore(pl,SCORE_BONUS_HONOR,(GetBonusHonorFromKill(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -634,6 +681,10 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source)
|
|||||||
|
|
||||||
UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
||||||
UpdateWorldState(BG_SA_LEFT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
UpdateWorldState(BG_SA_LEFT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
||||||
|
if (Source->GetTeamId() == TEAM_ALLIANCE)
|
||||||
|
SendWarningToAll(LANG_BG_SA_A_GY_WEST);
|
||||||
|
else
|
||||||
|
SendWarningToAll(LANG_BG_SA_H_GY_WEST);
|
||||||
break;
|
break;
|
||||||
case BG_SA_RIGHT_CAPTURABLE_GY:
|
case BG_SA_RIGHT_CAPTURABLE_GY:
|
||||||
flag = BG_SA_RIGHT_FLAG;
|
flag = BG_SA_RIGHT_FLAG;
|
||||||
@@ -649,6 +700,10 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source)
|
|||||||
|
|
||||||
UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
||||||
UpdateWorldState(BG_SA_RIGHT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
UpdateWorldState(BG_SA_RIGHT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
||||||
|
if (Source->GetTeamId() == TEAM_ALLIANCE)
|
||||||
|
SendWarningToAll(LANG_BG_SA_A_GY_EAST);
|
||||||
|
else
|
||||||
|
SendWarningToAll(LANG_BG_SA_H_GY_EAST);
|
||||||
break;
|
break;
|
||||||
case BG_SA_CENTRAL_CAPTURABLE_GY:
|
case BG_SA_CENTRAL_CAPTURABLE_GY:
|
||||||
flag = BG_SA_CENTRAL_FLAG;
|
flag = BG_SA_CENTRAL_FLAG;
|
||||||
@@ -659,6 +714,10 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source)
|
|||||||
|
|
||||||
UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
||||||
UpdateWorldState(BG_SA_CENTER_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
UpdateWorldState(BG_SA_CENTER_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
||||||
|
if (Source->GetTeamId() == TEAM_ALLIANCE)
|
||||||
|
SendWarningToAll(LANG_BG_SA_A_GY_SOUTH);
|
||||||
|
else
|
||||||
|
SendWarningToAll(LANG_BG_SA_H_GY_SOUTH);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
@@ -672,6 +731,10 @@ void BattleGroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
|
|||||||
{
|
{
|
||||||
if (Source->GetTeamId() == attackers)
|
if (Source->GetTeamId() == attackers)
|
||||||
{
|
{
|
||||||
|
if (Source->GetTeamId() == ALLIANCE)
|
||||||
|
SendMessageToAll(LANG_BG_SA_ALLIANCE_CAPTURED_RELIC, CHAT_MSG_BG_SYSTEM_NEUTRAL);
|
||||||
|
else SendMessageToAll(LANG_BG_SA_HORDE_CAPTURED_RELIC, CHAT_MSG_BG_SYSTEM_NEUTRAL);
|
||||||
|
|
||||||
if (status == BG_SA_ROUND_ONE)
|
if (status == BG_SA_ROUND_ONE)
|
||||||
{
|
{
|
||||||
RoundScores[0].winner = attackers;
|
RoundScores[0].winner = attackers;
|
||||||
@@ -680,7 +743,11 @@ void BattleGroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
|
|||||||
status = BG_SA_SECOND_WARMUP;
|
status = BG_SA_SECOND_WARMUP;
|
||||||
TotalTime = 0;
|
TotalTime = 0;
|
||||||
ToggleTimer();
|
ToggleTimer();
|
||||||
ResetObjs();
|
SendWarningToAll(LANG_BG_SA_ROUND_ONE_END);
|
||||||
|
UpdateWaitTimer = 5000;
|
||||||
|
SignaledRoundTwo = false;
|
||||||
|
SignaledRoundTwoHalfMin = false;
|
||||||
|
InitSecondRound = true;
|
||||||
}
|
}
|
||||||
else if (status == BG_SA_ROUND_TWO)
|
else if (status == BG_SA_ROUND_TWO)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -314,12 +314,39 @@ class BattleGroundSA : public BattleGround
|
|||||||
virtual bool SetupBattleGround();
|
virtual bool SetupBattleGround();
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
virtual void FillInitialWorldStates(WorldPacket& data);
|
virtual void FillInitialWorldStates(WorldPacket& data);
|
||||||
virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint32 event);
|
virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint8 hitType, uint32 destroyedEvent);
|
||||||
virtual void HandleKillUnit(Creature* unit, Player* killer);
|
virtual void HandleKillUnit(Creature* unit, Player* killer);
|
||||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||||
virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
|
virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
|
||||||
virtual void EventPlayerUsedGO(Player* Source, GameObject* object);
|
virtual void EventPlayerUsedGO(Player* Source, GameObject* object);
|
||||||
|
uint32 GetGateIDFromDestroyEventID(uint32 id)
|
||||||
|
{
|
||||||
|
uint32 i = 0;
|
||||||
|
switch(id)
|
||||||
|
{
|
||||||
|
case 19046: i = BG_SA_GREEN_GATE; break; //Green gate destroyed
|
||||||
|
case 19045: i = BG_SA_BLUE_GATE; break; //blue gate
|
||||||
|
case 19047: i = BG_SA_RED_GATE; break; //red gate
|
||||||
|
case 19048: i = BG_SA_PURPLE_GATE; break; //purple gate
|
||||||
|
case 19049: i = BG_SA_YELLOW_GATE; break; //yellow gate
|
||||||
|
case 19837: i = BG_SA_ANCIENT_GATE; break; //ancient gate
|
||||||
|
}
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
uint32 GetWorldStateFromGateID(uint32 id)
|
||||||
|
{
|
||||||
|
uint32 uws = 0;
|
||||||
|
switch(id)
|
||||||
|
{
|
||||||
|
case BG_SA_GREEN_GATE: uws = BG_SA_GREEN_GATEWS; break;
|
||||||
|
case BG_SA_YELLOW_GATE: uws = BG_SA_YELLOW_GATEWS; break;
|
||||||
|
case BG_SA_BLUE_GATE: uws = BG_SA_BLUE_GATEWS; break;
|
||||||
|
case BG_SA_RED_GATE: uws = BG_SA_RED_GATEWS; break;
|
||||||
|
case BG_SA_PURPLE_GATE: uws = BG_SA_PURPLE_GATEWS; break;
|
||||||
|
case BG_SA_ANCIENT_GATE: uws = BG_SA_ANCIENT_GATEWS; break;
|
||||||
|
}
|
||||||
|
return uws;
|
||||||
|
}
|
||||||
void EndBattleGround(uint32 winner);
|
void EndBattleGround(uint32 winner);
|
||||||
|
|
||||||
void RemovePlayer(Player *plr,uint64 guid);
|
void RemovePlayer(Player *plr,uint64 guid);
|
||||||
@@ -335,7 +362,7 @@ class BattleGroundSA : public BattleGround
|
|||||||
void TeleportPlayers();
|
void TeleportPlayers();
|
||||||
void OverrideGunFaction();
|
void OverrideGunFaction();
|
||||||
void DemolisherStartState(bool start);
|
void DemolisherStartState(bool start);
|
||||||
void DestroyGate(uint32 i, Player* pl);
|
void DestroyGate(Player* pl, GameObject* /*go*/, uint32 destroyedEvent);
|
||||||
void SendTime();
|
void SendTime();
|
||||||
void CaptureGraveyard(BG_SA_Graveyards i, Player *Source);
|
void CaptureGraveyard(BG_SA_Graveyards i, Player *Source);
|
||||||
void ToggleTimer();
|
void ToggleTimer();
|
||||||
@@ -348,5 +375,9 @@ class BattleGroundSA : public BattleGround
|
|||||||
TeamId GraveyardStatus[BG_SA_MAX_GY];
|
TeamId GraveyardStatus[BG_SA_MAX_GY];
|
||||||
BG_SA_RoundScore RoundScores[2];
|
BG_SA_RoundScore RoundScores[2];
|
||||||
bool TimerEnabled;
|
bool TimerEnabled;
|
||||||
|
uint32 UpdateWaitTimer;//5secs before starting the 1min countdown for second round
|
||||||
|
bool SignaledRoundTwo;
|
||||||
|
bool SignaledRoundTwoHalfMin;
|
||||||
|
bool InitSecondRound;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+14
-1
@@ -1598,6 +1598,7 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
|
|||||||
|
|
||||||
if (HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED)) // from damaged to destroyed
|
if (HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED)) // from damaged to destroyed
|
||||||
{
|
{
|
||||||
|
uint8 hitType = BG_OBJECT_DMG_HIT_TYPE_HIGH_DAMAGED;
|
||||||
if (!m_goValue->building.health)
|
if (!m_goValue->building.health)
|
||||||
{
|
{
|
||||||
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
|
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
|
||||||
@@ -1607,11 +1608,19 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
|
|||||||
EventInform(m_goInfo->building.destroyedEvent);
|
EventInform(m_goInfo->building.destroyedEvent);
|
||||||
if (pwho)
|
if (pwho)
|
||||||
if (BattleGround* bg = pwho->GetBattleGround())
|
if (BattleGround* bg = pwho->GetBattleGround())
|
||||||
bg->EventPlayerDamagedGO(pwho, this, m_goInfo->building.destroyedEvent);
|
bg->DestroyGate(pwho, this, m_goInfo->building.destroyedEvent);
|
||||||
|
hitType = BG_OBJECT_DMG_HIT_TYPE_JUST_DESTROYED;
|
||||||
}
|
}
|
||||||
|
if (pwho)
|
||||||
|
if (BattleGround* bg = pwho->GetBattleGround())
|
||||||
|
bg->EventPlayerDamagedGO(pwho, this, hitType, m_goInfo->building.destroyedEvent);
|
||||||
}
|
}
|
||||||
else // from intact to damaged
|
else // from intact to damaged
|
||||||
{
|
{
|
||||||
|
uint8 hitType = BG_OBJECT_DMG_HIT_TYPE_JUST_DAMAGED;
|
||||||
|
if (m_goValue->building.health + damage < m_goInfo->building.intactNumHits + m_goInfo->building.damagedNumHits)
|
||||||
|
hitType = BG_OBJECT_DMG_HIT_TYPE_DAMAGED;
|
||||||
|
|
||||||
if (m_goValue->building.health <= m_goInfo->building.damagedNumHits)
|
if (m_goValue->building.health <= m_goInfo->building.damagedNumHits)
|
||||||
{
|
{
|
||||||
if (!m_goInfo->building.destroyedDisplayId)
|
if (!m_goInfo->building.destroyedDisplayId)
|
||||||
@@ -1622,7 +1631,11 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
|
|||||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
|
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
|
||||||
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->building.damagedDisplayId);
|
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->building.damagedDisplayId);
|
||||||
EventInform(m_goInfo->building.damagedEvent);
|
EventInform(m_goInfo->building.damagedEvent);
|
||||||
|
hitType = BG_OBJECT_DMG_HIT_TYPE_JUST_HIGH_DAMAGED;
|
||||||
}
|
}
|
||||||
|
if (pwho)
|
||||||
|
if (BattleGround* bg = pwho->GetBattleGround())
|
||||||
|
bg->EventPlayerDamagedGO(pwho, this, hitType, m_goInfo->building.destroyedEvent);
|
||||||
}
|
}
|
||||||
SetGoAnimProgress(m_goValue->building.health*255/(m_goInfo->building.intactNumHits + m_goInfo->building.damagedNumHits));
|
SetGoAnimProgress(m_goValue->building.health*255/(m_goInfo->building.intactNumHits + m_goInfo->building.damagedNumHits));
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-2
@@ -980,8 +980,20 @@ enum TrinityStrings
|
|||||||
LANG_BG_SA_START_ONE_MINUTE = 10057,
|
LANG_BG_SA_START_ONE_MINUTE = 10057,
|
||||||
LANG_BG_SA_START_HALF_MINUTE = 10058,
|
LANG_BG_SA_START_HALF_MINUTE = 10058,
|
||||||
LANG_BG_SA_HAS_BEGUN = 10059,
|
LANG_BG_SA_HAS_BEGUN = 10059,
|
||||||
LANG_BG_SA_IS_UNDER_ATTACK = 10060,
|
LANG_BG_SA_IS_UNDER_ATTACK = 10060,//The %s is under attack!
|
||||||
LANG_BG_SA_IS_DESTROYED = 10061,
|
LANG_BG_SA_WAS_DESTROYED = 10061,//The %s was destroyed!
|
||||||
|
LANG_BG_SA_ROUND_ONE_END = 10062,//Round 1 - finished!
|
||||||
|
LANG_BG_SA_ALLIANCE_CAPTURED_RELIC = 10063,//The Alliance captured the titan portal!
|
||||||
|
LANG_BG_SA_HORDE_CAPTURED_RELIC = 10064,//The Horde captured the titan portal!
|
||||||
|
LANG_BG_SA_ROUND_TWO_ONE_MINUTE = 10065,//Round 2 of the Battle for the Strand of the Ancients begins in 1 minute.
|
||||||
|
LANG_BG_SA_ROUND_TWO_START_HALF_MINUTE = 10066,//Round 2 begins in 30 seconds. Prepare yourselves!
|
||||||
|
LANG_BG_SA_CHAMBER_BREACHED = 10067,//The chamber has been breached! The titan relic is vulnerable!
|
||||||
|
LANG_BG_SA_A_GY_SOUTH = 10068,//The Alliance captured the South Graveyard!
|
||||||
|
LANG_BG_SA_A_GY_WEST = 10069,//The Alliance captured the West Graveyard!
|
||||||
|
LANG_BG_SA_A_GY_EAST = 10070,//The Alliance captured the East Graveyard!
|
||||||
|
LANG_BG_SA_H_GY_SOUTH = 10071,//The Horde captured the South Graveyard!
|
||||||
|
LANG_BG_SA_H_GY_WEST = 10072,//The Horde captured the West Graveyard!
|
||||||
|
LANG_BG_SA_H_GY_EAST = 10073,//The Horde captured the East Graveyard!
|
||||||
|
|
||||||
// Use for custom patches 11000-11999
|
// Use for custom patches 11000-11999
|
||||||
LANG_AUTO_BROADCAST = 11000,
|
LANG_AUTO_BROADCAST = 11000,
|
||||||
|
|||||||
Reference in New Issue
Block a user