Core/GameObject: Implement ControlZone gameobject type

Port From (https://github.com/TrinityCore/TrinityCore/commit/f96f041c3edadfb5f1f09705fe699c2d7a9ed423)
This commit is contained in:
hondacrx
2024-01-31 20:53:44 -05:00
parent 7545d9395d
commit e2caec12dc
11 changed files with 998 additions and 1270 deletions
@@ -158,7 +158,7 @@ namespace Game.BattleGrounds.Zones
ShipsStarted = false;
//Graveyards
for (byte i = 0; i < SAGraveyards.Max; i++)
for (uint i = 0; i < SAGraveyards.Max; i++)
{
WorldSafeLocsEntry sg = Global.ObjectMgr.GetWorldSafeLoc(SAMiscConst.GYEntries[i]);
if (sg == null)
@@ -744,7 +744,7 @@ namespace Game.BattleGrounds.Zones
}
}
void CaptureGraveyard(int i, Player source)
void CaptureGraveyard(uint i, Player source)
{
if (GraveyardStatus[i] == Attackers)
return;
@@ -773,7 +773,7 @@ namespace Game.BattleGrounds.Zones
SAMiscConst.ObjSpawnlocs[flag], 0, 0, 0, 0, BattlegroundConst.RespawnOneDay);
npc = SACreatureTypes.Rigspark;
Creature rigspark = AddCreature(SAMiscConst.NpcEntries[npc], (int)npc, SAMiscConst.NpcSpawnlocs[npc], Attackers);
Creature rigspark = AddCreature(SAMiscConst.NpcEntries[npc], npc, SAMiscConst.NpcSpawnlocs[npc], Attackers);
if (rigspark != null)
rigspark.GetAI().Talk(SATextIds.SparklightRigsparkSpawn);
@@ -801,7 +801,7 @@ namespace Game.BattleGrounds.Zones
SAMiscConst.ObjSpawnlocs[flag], 0, 0, 0, 0, BattlegroundConst.RespawnOneDay);
npc = SACreatureTypes.Sparklight;
Creature sparklight = AddCreature(SAMiscConst.NpcEntries[npc], (int)npc, SAMiscConst.NpcSpawnlocs[npc], Attackers);
Creature sparklight = AddCreature(SAMiscConst.NpcEntries[npc], npc, SAMiscConst.NpcSpawnlocs[npc], Attackers);
if (sparklight != null)
sparklight.GetAI().Talk(SATextIds.SparklightRigsparkSpawn);