summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormik1893 <michele.roscelli@gmail.com>2016-08-17 02:00:26 +0200
committermik1893 <michele.roscelli@gmail.com>2016-08-17 02:00:26 +0200
commitee6f1523f4b80b7c6411035222a628cca45a54ec (patch)
treea25fbbd3f6e3e13fad03a6d9f02f56dc229897ff
parentec7a174be2445d950bf1d99d65c07dcb9deb153a (diff)
[AZTH] Crossfaction battleground: fixed cache reset on disconnectsCrossfaction_BG_Stable
-rw-r--r--modules/azerothshard/src/server/plugins/CrossFaction/CrossFaction.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/azerothshard/src/server/plugins/CrossFaction/CrossFaction.cpp b/modules/azerothshard/src/server/plugins/CrossFaction/CrossFaction.cpp
index 60104af879..c3a7d9dcee 100644
--- a/modules/azerothshard/src/server/plugins/CrossFaction/CrossFaction.cpp
+++ b/modules/azerothshard/src/server/plugins/CrossFaction/CrossFaction.cpp
@@ -110,10 +110,11 @@ void CrossFaction::SetMorph(Player* player, bool value)
{
if (player)
{
- SetFakeRaceAndMorph(player);
-
if (value)
{
+ if (GetFakeRace(player->GetGUID()) == 0 || GetFakeMorph(player->GetGUID()) == 0)
+ SetFakeRaceAndMorph(player);
+
player->setRace(GetFakeRace(player->GetGUID()));
player->SetDisplayId(GetFakeMorph(player->GetGUID()));
player->SetNativeDisplayId(GetFakeMorph(player->GetGUID()));
@@ -418,6 +419,9 @@ public:
// Called when a player changes to a new map (after moving to new map)
void OnMapChanged(Player* player) override
{
+ if(player && player->GetBattleground())
+ sCrossFaction->DoForgetPlayersInBG(player->GetBattleground(), player);
+
sCrossFaction->UpdatePlayerTeam(player->GetGroup(), player->GetGUID());
}