mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[7402] Fixed graveyards in WSG, prevent from cheating. Patch provided by Balrok. Thx.
Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
parent
898fef99d2
commit
0de4c02fd2
3 changed files with 29 additions and 3 deletions
|
|
@ -648,6 +648,29 @@ void BattleGroundWS::UpdatePlayerScore(Player *Source, uint32 type, uint32 value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WorldSafeLocsEntry const* BattleGroundWS::GetClosestGraveYard(Player* player)
|
||||||
|
{
|
||||||
|
//if status in progress, it returns main graveyards with spiritguides
|
||||||
|
//else it will return the graveyard in the flagroom - this is especially good
|
||||||
|
//if a player dies in preparation phase - then the player can't cheat
|
||||||
|
//and teleport to the graveyard outside the flagroom
|
||||||
|
//and start running around, while the doors are still closed
|
||||||
|
if(player->GetTeam() == ALLIANCE)
|
||||||
|
{
|
||||||
|
if(GetStatus() == STATUS_IN_PROGRESS)
|
||||||
|
return sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE);
|
||||||
|
else
|
||||||
|
return sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_FLAGROOM_ALLIANCE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(GetStatus() == STATUS_IN_PROGRESS)
|
||||||
|
return sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_HORDE);
|
||||||
|
else
|
||||||
|
return sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_FLAGROOM_HORDE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BattleGroundWS::FillInitialWorldStates(WorldPacket& data)
|
void BattleGroundWS::FillInitialWorldStates(WorldPacket& data)
|
||||||
{
|
{
|
||||||
data << uint32(BG_WS_FLAG_CAPTURES_ALLIANCE) << uint32(GetTeamScore(ALLIANCE));
|
data << uint32(BG_WS_FLAG_CAPTURES_ALLIANCE) << uint32(GetTeamScore(ALLIANCE));
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,10 @@ enum BG_WS_FlagState
|
||||||
|
|
||||||
enum BG_WS_Graveyards
|
enum BG_WS_Graveyards
|
||||||
{
|
{
|
||||||
WS_GRAVEYARD_MAIN_ALLIANCE = 771,
|
WS_GRAVEYARD_FLAGROOM_ALLIANCE = 769,
|
||||||
WS_GRAVEYARD_MAIN_HORDE = 772
|
WS_GRAVEYARD_FLAGROOM_HORDE = 770,
|
||||||
|
WS_GRAVEYARD_MAIN_ALLIANCE = 771,
|
||||||
|
WS_GRAVEYARD_MAIN_HORDE = 772
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BG_WS_CreatureTypes
|
enum BG_WS_CreatureTypes
|
||||||
|
|
@ -162,6 +164,7 @@ class BattleGroundWS : public BattleGround
|
||||||
void HandleKillPlayer(Player *player, Player *killer);
|
void HandleKillPlayer(Player *player, Player *killer);
|
||||||
bool SetupBattleGround();
|
bool SetupBattleGround();
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
|
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||||
|
|
||||||
void UpdateFlagState(uint32 team, uint32 value);
|
void UpdateFlagState(uint32 team, uint32 value);
|
||||||
void UpdateTeamScore(uint32 team);
|
void UpdateTeamScore(uint32 team);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7401"
|
#define REVISION_NR "7402"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue