Battleground/Strand of the Ancients: Fix broken gate state
This commit is contained in:
@@ -534,16 +534,16 @@ void BattlegroundSA::EventPlayerDamagedGO(Player* /*player*/, GameObject* go, ui
|
||||
|
||||
if (eventType == go->GetGOInfo()->building.damagedEvent)
|
||||
{
|
||||
uint32 i = GetGateIDFromDestroyEventID(eventType);
|
||||
uint32 i = getGateIdFromDamagedOrDestroyEventId(eventType);
|
||||
GateStatus[i] = BG_SA_GATE_DAMAGED;
|
||||
uint32 uws = GetWorldStateFromGateID(i);
|
||||
uint32 uws = getWorldStateFromGateId(i);
|
||||
if (uws)
|
||||
UpdateWorldState(uws, GateStatus[i]);
|
||||
}
|
||||
|
||||
if (eventType == go->GetGOInfo()->building.destroyedEvent)
|
||||
{
|
||||
if (go->GetGOInfo()->building.destroyedEvent == 19837)
|
||||
if (go->GetGOInfo()->building.destroyedEvent == BG_SA_EVENT_ANCIENT_GATE_DESTROYED)
|
||||
SendWarningToAll(LANG_BG_SA_CHAMBER_BREACHED);
|
||||
else
|
||||
SendWarningToAll(LANG_BG_SA_WAS_DESTROYED, go->GetGOInfo()->name.c_str());
|
||||
@@ -603,7 +603,7 @@ void BattlegroundSA::DemolisherStartState(bool start)
|
||||
|
||||
void BattlegroundSA::DestroyGate(Player* player, GameObject* go)
|
||||
{
|
||||
uint32 i = GetGateIDFromDestroyEventID(go->GetGOInfo()->building.destroyedEvent);
|
||||
uint32 i = getGateIdFromDamagedOrDestroyEventId(go->GetGOInfo()->building.destroyedEvent);
|
||||
if (!GateStatus[i])
|
||||
return;
|
||||
|
||||
@@ -612,7 +612,7 @@ void BattlegroundSA::DestroyGate(Player* player, GameObject* go)
|
||||
if (g->GetGOValue()->Building.Health == 0)
|
||||
{
|
||||
GateStatus[i] = BG_SA_GATE_DESTROYED;
|
||||
uint32 uws = GetWorldStateFromGateID(i);
|
||||
uint32 uws = getWorldStateFromGateId(i);
|
||||
if (uws)
|
||||
UpdateWorldState(uws, GateStatus[i]);
|
||||
bool rewardHonor = true;
|
||||
|
||||
Reference in New Issue
Block a user