Core/GameObject: Implement ControlZone gameobject type
Port From (https://github.com/TrinityCore/TrinityCore/commit/f96f041c3edadfb5f1f09705fe699c2d7a9ed423)
This commit is contained in:
@@ -353,9 +353,9 @@ namespace Game.BattleGrounds.Zones
|
||||
if (capturedNodes >= 4)
|
||||
CastSpellOnTeam(BattlegroundConst.AbQuestReward4Bases, team);
|
||||
|
||||
Creature trigger = !BgCreatures[node + 7].IsEmpty() ? GetBGCreature(node + 7) : null; // 0-6 spirit guides
|
||||
Creature trigger = !BgCreatures[node + 7].IsEmpty() ? GetBGCreature(node + 7u) : null; // 0-6 spirit guides
|
||||
if (trigger == null)
|
||||
trigger = AddCreature(SharedConst.WorldTrigger, node + 7, NodePositions[node], GetTeamIndexByTeamId(team));
|
||||
trigger = AddCreature(SharedConst.WorldTrigger, node + 7u, NodePositions[node], GetTeamIndexByTeamId(team));
|
||||
|
||||
//add bonus honor aura trigger creature when node is accupied
|
||||
//cast bonus aura (+50% honor in 25yards)
|
||||
@@ -374,7 +374,7 @@ namespace Game.BattleGrounds.Zones
|
||||
return;
|
||||
|
||||
//remove bonus honor aura trigger creature when node is lost
|
||||
DelCreature(node + 7);//null checks are in DelCreature! 0-6 spirit guides
|
||||
DelCreature(node + 7u);//null checks are in DelCreature! 0-6 spirit guides
|
||||
|
||||
DelCreature(node);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user