diff options
-rw-r--r-- | modules/azerothshard/src/server/plugins/CrossFaction/CrossFaction.cpp | 8 |
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()); } |