public static void Spawn(Player plr, uint entry) { GameObject_proto proto = GameObjectService.GetGameObjectProto(entry); if (proto == null) { plr.SendClientMessage($"Invalid go entry({entry})", ChatLogFilters.CHATLOGFILTERS_CSR_TELL_RECEIVE); return; } plr.UpdateWorldPosition(); GameObject_spawn spawn = new GameObject_spawn(); spawn.Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(); spawn.BuildFromProto(proto); spawn.WorldO = plr._Value.WorldO; spawn.WorldY = plr._Value.WorldY; spawn.WorldZ = plr._Value.WorldZ; spawn.WorldX = plr._Value.WorldX; spawn.ZoneId = plr.Zone.ZoneId; WorldMgr.Database.AddObject(spawn); plr.Region.CreateGameObject(spawn); }
public void Spawn() { GameObject?.Destroy(); GameObject_proto proto = GameObjectService.GetGameObjectProto(Info.GameObjectId); if (proto == null) { Log.Error("KeepDoor", "No Door Proto"); return; } // Log.Info("KeepDoor", "Spawning Keep Door = " + Info.DoorId + " Number = " + Info.Number); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = Info.O, WorldY = Info.Y, WorldZ = Info.Z, WorldX = Info.X, ZoneId = Info.ZoneId, DoorId = Info.DoorId, }; spawn.BuildFromProto(proto); GameObject = new KeepGameObject(spawn, this, Keep); Region.AddObject(GameObject, spawn.ZoneId); GameObject.SetAttackable(Keep.KeepStatus != KeepStatus.KEEPSTATUS_LOCKED); WarZoneLib.RegionData.HideDoor(false, Info.ZoneId, Info.DoorId); }
public void Spawn(bool attackable) { GameObject?.Destroy(); GameObject_proto proto = GameObjectService.GetGameObjectProto(Info.GameObjectId); if (proto == null) { Log.Error("KeepDoor", "No Door Proto"); return; } _logger.Debug($"Spawning Keep Door = {Info.DoorId} Number = {Info.Number} for Keep = {Keep.Info.Name}"); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = Info.O, WorldY = Info.Y, WorldZ = Info.Z, WorldX = Info.X, ZoneId = Info.ZoneId, DoorId = Info.DoorId, }; spawn.BuildFromProto(proto); GameObject = new KeepGameObject(spawn, this, Keep); Region.AddObject(GameObject, spawn.ZoneId); GameObject.SetAttackable(attackable); Occlusion.SetFixtureVisible(Info.DoorId, true); }
public void CreateGlow() { if (Region != null) { if (_glowObject != null) { _glowObject.RemoveFromWorld(); } // Spawn objective glow (Big Poofy Glowy Nuet) GameObject_proto glowProto = GameObjectService.GetGameObjectProto(99858); if (glowProto != null) { GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = Heading, WorldX = _x, WorldY = _y, WorldZ = _z, ZoneId = Region.RegionId, }; spawn.BuildFromProto(glowProto); _glowObject = new GameObject(spawn); _glowObject.VfxState = (byte)GlowOwner; Region.AddObject(_glowObject, spawn.ZoneId); } } }
public Pendulum(GameObject_proto proto, byte vfxstart, int WX, int WY, int WZ) { GameObject_spawn sp = new GameObject_spawn(); sp.ZoneId = 179; sp.DisplayID = 7394; sp.WorldX = WX; sp.WorldY = WY; sp.WorldZ = WZ; sp.WorldO = 2048; sp.Proto = proto; VfxState = vfxstart; Spawn = sp; Name = proto.Name; Vfxstart = vfxstart; if (Vfxstart == 0) { lastswing = 5; } else { lastswing = 6; } }
/// <summary> /// Creates a game object spawn entity from given Campaign portal object. /// </summary> /// <param name="battleFrontObject">Portal object providing raw data</param> /// <returns>newly created spawn entity</returns> private GameObject_spawn CreateSpawn(BattleFrontObject battleFrontObject) { GameObject_proto proto = GameObjectService.GetGameObjectProto(PORTAL_PROTO_ENTRY); proto = (GameObject_proto)proto.Clone(); GameObject_spawn spawn = new GameObject_spawn(); spawn.BuildFromProto(proto); // boule blanche : 3457 // grosse boule blanche : 1675 proto.Scale = 25; // spawn.DisplayID = 1675; spawn.DisplayID = 1675; spawn.ZoneId = battleFrontObject.ZoneId; Point3D worldPos = GetWorldPosition(battleFrontObject); spawn.WorldX = worldPos.X; spawn.WorldY = worldPos.Y; spawn.WorldZ = worldPos.Z; spawn.WorldO = battleFrontObject.O; return(spawn); }
/// <summary> /// Creates a game object spawn entity from given Campaign portal object. /// </summary> /// <param name="battleFrontObject">Portal object providing raw data</param> /// <returns>newly created spawn entity</returns> private GameObject_spawn CreateSpawn(int zoneId, int x, int y, int z, int o) { GameObject_proto proto = GameObjectService.GetGameObjectProto(PORTAL_PROTO_ENTRY); proto = (GameObject_proto)proto.Clone(); GameObject_spawn spawn = new GameObject_spawn(); spawn.BuildFromProto(proto); // boule blanche : 3457 // grosse boule blanche : 1675 proto.Scale = 25; // spawn.DisplayID = 1675; spawn.DisplayID = 1675; spawn.ZoneId = (ushort)zoneId; spawn.WorldX = x; spawn.WorldY = y; spawn.WorldZ = z; spawn.WorldO = o; spawn.IsValid = true; spawn.IsDeleted = false; spawn.Guid = 132456; return(spawn); }
private void CreateSalvage(int x, int y, int z, int o) { if (_salvage != null) { _salvage.RemoveFromWorld(); } GameObject_proto glowProto = GameObjectService.GetGameObjectProto(100598); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = 0, WorldX = x, WorldY = y, WorldZ = (ushort)z, ZoneId = Region.RegionId, }; spawn.BuildFromProto(glowProto); _salvage = new Part(spawn, FLAG_EFFECTS.Mball1, 2000, 2000) { PickedUp = new Part.PartDelegate(SalvagePickedUp), DroppedOff = new Part.PartDelegate(SalvageDroppedOff), Lost = new Part.PartDelegate(SalvageLost) }; Region.AddObject(_salvage, spawn.ZoneId); }
private void CreateGlow(ClickFlag flag) { if (_glowObject != null) { _glowObject.RemoveFromWorld(); } // Spawn objective glow (Big Poofy Glowy Nuet) GameObject_proto glowProto = GameObjectService.GetGameObjectProto(99858); if (glowProto != null) { GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = flag.Heading, WorldX = flag.WorldPosition.X, WorldY = flag.WorldPosition.Y, WorldZ = (ushort)flag.WorldPosition.Z, ZoneId = Region.RegionId, }; spawn.BuildFromProto(glowProto); _glowObject = new GameObject(spawn); _glowObject.VfxState = (byte)flag.Owner; Region.AddObject(_glowObject, spawn.ZoneId); } }
private void AddGlow(Realms assaultingRealm) { GameObject_proto glowProto = GameObjectService.GetGameObjectProto(99858); //99858 if (glowProto != null) { GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = Heading, WorldX = WorldPosition.X, WorldY = WorldPosition.Y, WorldZ = WorldPosition.Z, ZoneId = ZoneId, }; spawn.BuildFromProto(glowProto); var siegeRangeFlag = new GameObject(spawn); if (assaultingRealm == Realms.REALMS_REALM_DESTRUCTION) { siegeRangeFlag.VfxState = 2; //1 blue, 2 red, 3 white, 4 - white; } else { siegeRangeFlag.VfxState = 1; //1 blue, 2 red, 3 white, 4 - white; } Region.AddObject(siegeRangeFlag, ZoneId); } }
public void SpawnGO(object list) { var Params = (List <object>)list; int Entry = (int)Params[0]; int X = (int)Params[1]; int Y = (int)Params[2]; int Z = (int)Params[3]; int O = (int)Params[4]; uint AllowVfxUpdate = (uint)Params[5]; GameObject_proto Proto = GameObjectService.GetGameObjectProto((uint)Entry); GameObject_spawn Spawn = new GameObject_spawn(); Spawn.Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(); Spawn.BuildFromProto(Proto); Spawn.WorldO = O; Spawn.WorldX = X; Spawn.WorldY = Y; Spawn.WorldZ = Z; Spawn.ZoneId = (ushort)Obj.ZoneId; Spawn.AllowVfxUpdate = AllowVfxUpdate; GameObject go = Obj.Region.CreateGameObject(Spawn); go.Respawn = 0; go.EvtInterface.AddEventNotify(EventName.OnDie, RemoveGOs); // We are removing spawns from server when adds die goList.Add(go); // Adding adds to the list for easy removal }
/// <summary> /// Reload game objects in your region /// </summary> /// <param name="plr">Player that initiated the command</param> /// <param name="values">List of command arguments (after command name)</param> /// <returns>True if command was correctly handled, false if operation was canceled</returns> public static bool ReloadGameObjects(Player plr, ref List <string> values) { GameObjectService.LoadGameObjectProtos(); plr.SendClientMessage("RELOADGAMEOBJECTS: Game objects loaded : " + GameObjectService.GameObjectProtos.Count); List <Object> allCells = new List <Object>(); allCells.AddRange(plr._Cell.Objects); foreach (Object obj in allCells) { GameObject gameObject = obj as GameObject; if (gameObject != null) { try { GameObject_proto proto = GameObjectService.GameObjectProtos[gameObject.Entry]; gameObject.Spawn.Proto = proto; } catch { plr.SendClientMessage("RELOADGAMEOBJECTS: GameObject with Entry " + gameObject.Entry + " not found in GameObjects, removing GameObject"); gameObject.Spawn.Proto = null; } gameObject.Region.CreateGameObject(gameObject.Spawn); gameObject.Dispose(); } } plr.SendClientMessage("RELOADGAMEOBJECTS: GameObject spawns loaded : " + GameObjectService.GameObjectSpawns.Count); return(true); }
public CapturePoint(uint id, string name, int x, int y, int z, int o, GameObject_proto proto, Func <Player, bool> captureCheck, Action <CapturePoint> onCapture) { ObjectiveID = id; ObjectiveName = name; _x = x; _y = y; _z = z; _o = o; _proto = proto; _captureCheck = captureCheck; _onCapture = onCapture; CaptureDuration = 3; }
public void EnergyFlux() { Brain.SpeakYourMind(" using EnergyFlux"); // Remove any old electron fluxes (max of 4) var fluxes = Owner.GetInRange <GameObject>(150); if (fluxes.Count > 4) { foreach (var flux in fluxes) { if (flux.Entry == 3100414) { flux.EvtInterface.AddEvent(flux.Destroy, 2 * 1000, 1); break; } } } GameObject_proto proto = GameObjectService.GetGameObjectProto(3100414); var newTarget = Brain.SetRandomTarget(); if (newTarget != null) { GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = 2093, WorldX = newTarget.WorldPosition.X + StaticRandom.Instance.Next(50), WorldY = newTarget.WorldPosition.Y + StaticRandom.Instance.Next(50), WorldZ = newTarget.WorldPosition.Z, ZoneId = (ushort)Owner.ZoneId }; spawn.BuildFromProto(proto); proto.IsAttackable = 1; var go = Owner.Region.CreateGameObject(spawn); // When the gameobject dies, remove it. go.EvtInterface.AddEventNotify(EventName.OnDie, RemoveGOs); // When the boss dies, remove all child "fluxes" Owner.EvtInterface.AddEventNotify(EventName.OnDie, RemoveAllFluxes); // Buff the flux with the lightning rod buff. go.BuffInterface.QueueBuff(new BuffQueueInfo(go, 48, AbilityMgr.GetBuffInfo((ushort)1543), BuffAssigned)); } }
public static void Point(Player plr) { if (plr.Zone == null) { SendCsr(plr, "CAMPAIGN POINT: Must be in a zone to use this command."); return; } IBattlefrontFlag closestFlag = plr.Region.Bttlfront.GetClosestFlag(plr.WorldPosition); if (closestFlag == null) { SendCsr(plr, "CAMPAIGN POINT: Must be in an open-world RvR zone."); return; } else if (!(closestFlag is BattlefrontFlag)) { SendCsr(plr, "CAMPAIGN POINT: This command is supported in legacy RvR."); return; } plr.SendClientMessage("Flag: " + closestFlag.ObjectiveName); GameObject_proto proto = GameObjectService.GetGameObjectProto(429); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldX = plr.WorldPosition.X, WorldY = plr.WorldPosition.Y, WorldZ = plr.WorldPosition.Z, WorldO = plr.Heading, ZoneId = plr.Zone.ZoneId }; spawn.BuildFromProto(proto); plr.Region.CreateGameObject(spawn); BattlefrontResourceSpawn res = new BattlefrontResourceSpawn { Entry = ((BattlefrontFlag)closestFlag).ID, X = plr.X, Y = plr.Y, Z = plr.Z, O = plr.Heading }; WorldMgr.Database.AddObject(res); }
public GroundTarget(Point3D spawnLoc, GameObject_proto proto) { IsInvulnerable = true; WorldPosition.X = spawnLoc.X; WorldPosition.Y = spawnLoc.Y; WorldPosition.Z = spawnLoc.Z; Realm = GameData.Realms.REALMS_REALM_NEUTRAL; Faction = Realm == GameData.Realms.REALMS_REALM_ORDER ? (byte)0x41 : (byte)0x81; Health = 1; MaxHealth = 1; IsInvulnerable = true; _spawn.BuildFromProto(proto); }
public DartTrap(GameObject_proto proto, byte vfxstart, int WX, int WY, int WZ) { GameObject_spawn sp = new GameObject_spawn(); sp.ZoneId = 179; sp.DisplayID = 7471; sp.WorldX = WX; sp.WorldY = WY; sp.WorldZ = WZ; sp.WorldO = 1012; sp.Proto = proto; VfxState = vfxstart; Spawn = sp; Name = proto.Name; Vfxstart = vfxstart; }
public GameObject CreateGameObject(uint Entry, ushort ZoneId, ushort Px, ushort Py, ushort Pz) { GameObject_proto Proto = WorldMgr.GetGameObjectProto(Entry); if (Proto == null) { return(null); } GameObject_spawn Spawn = new GameObject_spawn(); Spawn.Entry = Entry; Spawn.Guid = (uint)WorldMgr.GenerateGameObjectSpawnGUID(); Spawn.BuildFromProto(Proto); Spawn.ZoneId = ZoneId; ZoneMgr.CalculWorldPosition(ZoneId, Px, Py, Pz, ref Spawn.WorldX, ref Spawn.WorldY, ref Spawn.WorldZ); return(CreateGameObject(Spawn)); }
/// <summary> /// /// </summary> /// <param name="plr">Player that initiated the command</param> /// <param name="values">List of command arguments (after command name)</param> /// <returns>True if command was correctly handled, false if operation was canceled</returns> public static bool RespawnAdd(Player plr, ref List <string> values) { byte realm = (byte)GetInt(ref values); Zone_Respawn respawn = new Zone_Respawn { PinX = (ushort)plr.X, PinY = (ushort)plr.Y, PinZ = (ushort)plr.Z, WorldO = plr.Heading, ZoneID = plr.Zone.ZoneId, Realm = realm }; WorldMgr.Database.AddObject(respawn); ZoneService.LoadZone_Respawn(); GameObject_proto proto = GameObjectService.GetGameObjectProto(563); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldX = plr.WorldPosition.X, WorldY = plr.WorldPosition.Y, WorldZ = plr.WorldPosition.Z, WorldO = plr.Heading, ZoneId = plr.Zone.ZoneId }; spawn.BuildFromProto(proto); plr.Region.CreateGameObject(spawn); GMCommandLog log = new GMCommandLog { PlayerName = plr.Name, AccountId = (uint)plr.Client._Account.AccountId, Command = "ADD RESPAWN TO " + plr.Zone.ZoneId + " " + (ushort)plr.X + " " + (ushort)plr.Y, Date = DateTime.Now }; CharMgr.Database.AddObject(log); return(true); }
public static LootChest Create(RegionMgr region, Point3D location, ushort zoneId, bool convertPin = true) { if (region == null) { Log.Error("LootChest", "Attempt to create for NULL region"); return(null); } GameObject_proto proto = GameObjectService.GetGameObjectProto(188); GameObject_spawn spawn = new GameObject_spawn(); if (convertPin) // Non-fort zone location points are PIN position system, forts are worldposition. { var targetPosition = ZoneService.GetWorldPosition(ZoneService.GetZone_Info(zoneId), (ushort)location.X, (ushort)location.Y, (ushort)location.Z); spawn.Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(); spawn.WorldO = 0; spawn.WorldY = targetPosition.Y + StaticRandom.Instance.Next(50, 100); spawn.WorldZ = targetPosition.Z; spawn.WorldX = targetPosition.X + StaticRandom.Instance.Next(50, 100); spawn.ZoneId = zoneId; } else { spawn.Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(); spawn.WorldO = 0; spawn.WorldY = location.Y + StaticRandom.Instance.Next(50, 100); spawn.WorldZ = location.Z; spawn.WorldX = location.X + StaticRandom.Instance.Next(50, 100); spawn.ZoneId = zoneId; } spawn.BuildFromProto(proto); var chest = region.CreateLootChest(spawn); chest.LootBags = new Dictionary <uint, KeyValuePair <Item_Info, List <Talisman> > >(); return(chest); }
// Make RoR Great Again - adding wall public void AddWall() { GameObject_proto proto = GameObjectService.GetGameObjectProto(2000441); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldX = 137348, WorldY = 524446, WorldZ = 11128, WorldO = 2008, ZoneId = 169 }; spawn.BuildFromProto(proto); GameObject GO = Obj.Region.CreateGameObject(spawn); GO.Say("**Wall of magical force is now blocking the exit**", SystemData.ChatLogFilters.CHATLOGFILTERS_MONSTER_SAY); magicWalls.Add(GO); }
public CapturePoint(Scenario_Object scenarioObject, Func <Player, bool> captureCheck, Action <CapturePoint> onCapture) { ObjectiveID = scenarioObject.Identifier; ObjectiveName = scenarioObject.ObjectiveName; _x = scenarioObject.WorldPosX; _y = scenarioObject.WorldPosY; _z = scenarioObject.PosZ; _o = scenarioObject.Heading; _proto = GameObjectService.GetGameObjectProto(scenarioObject.ProtoEntry); _captureCheck = captureCheck; _onCapture = onCapture; _captureText = scenarioObject.CaptureObjectiveText.Replace("%n", ObjectiveName); _captureDesc = scenarioObject.CaptureObjectiveDescription.Replace("%n", ObjectiveName); _holdText = scenarioObject.HoldObjectiveText.Replace("%n", ObjectiveName); _holdDesc = scenarioObject.HoldObjectiveDescription.Replace("%n", ObjectiveName); _captureAnnouncement = scenarioObject.CaptureAnnouncement; CaptureDuration = 3; }
public void CreateExitPortal(int X, int Y, int Z, int O) { GameObject_proto Proto = GameObjectService.GetGameObjectProto(98878); // This is portal GameObject_spawn Spawn = new GameObject_spawn(); Spawn.Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(); Spawn.BuildFromProto(Proto); Spawn.WorldO = O; Spawn.WorldX = X; Spawn.WorldY = Y; Spawn.WorldZ = Z; Spawn.ZoneId = (ushort)Obj.ZoneId; GameObject go = Obj.Region.CreateGameObject(Spawn); go.Respawn = 0; go.EvtInterface.AddEvent(go.Destroy, 30 * 10 * 1000, 1); //goList.Add(go); // Adding adds to the list for easy removal }
public Firetrap(GameObject_proto proto, int WX, int WY, int WZ) { GameObject_spawn sp = new GameObject_spawn(); sp.ZoneId = 179; sp.DisplayID = proto.DisplayID; sp.WorldX = WX; sp.WorldY = WY; sp.WorldZ = WZ; sp.WorldO = 2048; sp.Proto = proto; VfxState = 1; sp.Unks[0] = 0; sp.Unks[1] = 1; sp.Unks[2] = 15266; sp.Unks[3] = 769; sp.Unks[4] = 5; sp.Unks[5] = 47790; Spawn = sp; Name = proto.Name; }
public override void OnLoad() { X = Zone.CalculPin((uint)HomePosition.X, true); Y = Zone.CalculPin((uint)HomePosition.Y, false); Z = HomePosition.Z; base.OnLoad(); WorldPosition.SetCoordsFrom(HomePosition); HomePosition = new Point3D(WorldPosition); SetOffset((ushort)(HomePosition.X >> 12), (ushort)(HomePosition.Y >> 12)); // Spawn objective glow (Big Poofy Glowy Nuet) GameObject_proto glowProto = GameObjectService.GetGameObjectProto(99858); if (glowProto == null) { return; } GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = Heading, WorldY = WorldPosition.Y + 2, WorldZ = WorldPosition.Z, WorldX = WorldPosition.X + 6, ZoneId = Zone.ZoneId, }; spawn.BuildFromProto(glowProto); _glowObject = new GameObject(spawn); SetGlowColorFor(RealmCapturableFor); Region.AddObject(_glowObject, spawn.ZoneId); }
private void CreateBomb(int x, int y, int z, int o) { _carrier = null; if (_bomb != null) { _bomb.RemoveFromWorld(); _bomb = null; } if (_carrier != null) { _carrier.OSInterface.RemoveEffect((byte)0xB); _carrier = null; } GameObject_proto glowProto = GameObjectService.GetGameObjectProto(100112); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = 0, WorldX = x, WorldY = y, WorldZ = (ushort)z, ZoneId = Region.RegionId, }; spawn.BuildFromProto(glowProto); _bomb = new Part(spawn, FLAG_EFFECTS.Bomb, 2000, 2000) { PickedUp = new Part.PartDelegate(BombPickedUp), DroppedOff = new Part.PartDelegate(BombDroppedOff), Lost = new Part.PartDelegate(BombLost) }; Region.AddObject(_bomb, spawn.ZoneId); if (_centerGlow != null) { _centerGlow.VfxState = 0; } }
private GameObject AddObject(int x, int y, int z, int o, uint entry) { GameObject_proto glowProto = GameObjectService.GetGameObjectProto(entry); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = o, WorldX = x, WorldY = y, WorldZ = (ushort)z, ZoneId = Region.RegionId, }; spawn.BuildFromProto(glowProto); var obj = new GameObject(spawn); Region.AddObject(obj, spawn.ZoneId); return(obj); }
public MurderballScenario(Scenario_Info info, int tier) : base(info, tier) { foreach (Scenario_Object obj in info.ScenObjects) { HoldObject ball; if (obj.ProtoEntry != 0) { GameObject_proto proto = GameObjectService.GetGameObjectProto(obj.ProtoEntry); ball = new HoldObject(obj.Identifier, obj.ObjectiveName, new Point3D(obj.WorldPosX, obj.WorldPosY, obj.PosZ), 14031, 30000, BallPickedUp, BallDropped, ObjectReset, BallBuffAssigned, proto.DisplayID, proto.DisplayID); } else { ball = new HoldObject(obj.Identifier, obj.ObjectiveName, new Point3D(obj.WorldPosX, obj.WorldPosY, obj.PosZ), 14031, 30000, BallPickedUp, BallDropped, ObjectReset, BallBuffAssigned, 235, 233); } _murderballTicks.Add(ball, 0); Region.AddObject(ball, info.MapId); } }
public override void OnLoad() { Z = _z; X = Zone.CalculPin((uint)_x, true); Y = Zone.CalculPin((uint)_y, false); base.OnLoad(); Heading = (ushort)_o; WorldPosition.X = _x; WorldPosition.Y = _y; WorldPosition.Z = _z; SetOffset((ushort)(_x >> 12), (ushort)(_y >> 12)); IsActive = true; // Spawn objective glow (Big Poofy Glowy Nuet) GameObject_proto glowProto = GameObjectService.GetGameObjectProto(99858); if (glowProto == null) { return; } GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldO = Heading, WorldY = WorldPosition.Y, WorldZ = WorldPosition.Z - 256, WorldX = WorldPosition.X, ZoneId = Zone.ZoneId, }; spawn.BuildFromProto(glowProto); _glowObject = new GameObject(spawn); Region.AddObject(_glowObject, spawn.ZoneId); }
/// <summary> /// Aslong as the Banner of Bloodlust i s up,Borzhar will charge a t a new target /// and should s tay locked on the target for a medium duration before charging /// at a new target. Players can destroy the banner which will prevent him f rom /// using this charge anymore. /// </summary> public void DeployBannerOfBloodlust() { Brain.SpeakYourMind(" using DeployBannerOfBloodlust"); GameObject_proto proto = GameObjectService.GetGameObjectProto(3100412); GameObject_spawn spawn = new GameObject_spawn { Guid = (uint)GameObjectService.GenerateGameObjectSpawnGUID(), WorldX = Owner.WorldPosition.X + StaticRandom.Instance.Next(50), WorldY = Owner.WorldPosition.Y + StaticRandom.Instance.Next(50), WorldZ = Owner.WorldPosition.Z, WorldO = Owner.Heading, ZoneId = Owner.Zone.ZoneId }; spawn.BuildFromProto(proto); proto.IsAttackable = 1; var go = Owner.Region.CreateGameObject(spawn); go.EvtInterface.AddEventNotify(EventName.OnDie, RemoveGOs); }