Core/Graveyards: Drop Faction column and replace it with conditions

Port From (https://github.com/TrinityCore/TrinityCore/commit/c1df555e1691d788918845f95252358f25e54bb5)
This commit is contained in:
hondacrx
2023-06-13 04:20:54 -04:00
parent 2a12697cb2
commit 31ffbf3512
18 changed files with 131 additions and 123 deletions
+1 -1
View File
@@ -632,7 +632,7 @@ namespace Game.Entities
if (!ok)
{
WorldSafeLocsEntry loc = Global.ObjectMgr.GetDefaultGraveYard(GetTeam());
WorldSafeLocsEntry loc = Global.ObjectMgr.GetDefaultGraveyard(GetTeam());
if (loc == null && GetRace() == Race.PandarenNeutral)
loc = Global.ObjectMgr.GetWorldSafeLoc(3295); // The Wandering Isle, Starting Area GY
+1 -1
View File
@@ -562,7 +562,7 @@ namespace Game.Entities
// If map is dungeon find linked graveyard
if (GetMap().IsDungeon())
{
WorldSafeLocsEntry entry = Global.ObjectMgr.GetClosestGraveYard(this, GetTeam(), this);
WorldSafeLocsEntry entry = Global.ObjectMgr.GetClosestGraveyard(this, GetTeam(), this);
if (entry != null)
m_bgData.joinPos = entry.Loc;
else
+3 -3
View File
@@ -4211,14 +4211,14 @@ namespace Game.Entities
// Special handle for Battlegroundmaps
Battleground bg = GetBattleground();
if (bg)
ClosestGrave = bg.GetClosestGraveYard(this);
ClosestGrave = bg.GetClosestGraveyard(this);
else
{
BattleField bf = BattleFieldMgr.GetBattlefieldToZoneId(GetMap(), GetZoneId());
if (bf != null)
ClosestGrave = bf.GetClosestGraveYard(this);
ClosestGrave = bf.GetClosestGraveyard(this);
else
ClosestGrave = ObjectMgr.GetClosestGraveYard(this, GetTeam(), this);
ClosestGrave = ObjectMgr.GetClosestGraveyard(this, GetTeam(), this);
}
// stop countdown until repop