public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { World.BroadcastIfRevealed(new PlayAnimationMessage { ActorID = this.DynamicID, Field1 = 5, Field2 = 0, tAnim = new Net.GS.Message.Fields.PlayAnimationMessageSpec[] { new Net.GS.Message.Fields.PlayAnimationMessageSpec() { Duration = 50, AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening], PermutationIndex = 0, Speed = 1 } } }, this); World.BroadcastIfRevealed(new SetIdleAnimationMessage { ActorID = this.DynamicID, AnimationSNO = AnimationSetKeys.Open.ID }, this); this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked ((int)player.DynamicID); this.Attributes[GameAttribute.Gizmo_State] = 1; Attributes.BroadcastChangedIfRevealed(); base.OnTargeted(player, message); }
public override void OnTargeted(Player player, Net.GS.Message.Definitions.World.TargetMessage message) { var world = player.World; //194401 world.BroadcastIfRevealed(new PlayAnimationMessage() { ActorID = this.DynamicID, Field1 = 5, Field2 = 0f, tAnim = new[] { new PlayAnimationMessageSpec() { Duration = 4, AnimationSNO = 0x2f761, PermutationIndex = 0, Speed = 1f, } } }, this); this.PlayActionAnimation(194401); player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenWaypointSelectionWindowMessage) { ActorID = this.DynamicID }); this.Attributes[Net.GS.Message.GameAttribute.Gizmo_Has_Been_Operated] = true; }
public override void OnTargeted(Player player, Net.GS.Message.Definitions.World.TargetMessage message) { var world = player.World; world.BroadcastIfRevealed(new PlayAnimationMessage() { ActorID = this.DynamicID, Field1 = 5, Field2 = 0f, tAnim = new[] { new PlayAnimationMessageSpec() { Field0 = 4, Field1 = 0x2f761, Field2 = 0, Field3 = 1f, } } }, this); player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.OpenWaypointSelectionWindowMessage) { ActorID = this.DynamicID }); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { NullD.Common.MPQ.FileFormats.TreasureClass Treasure = null; if (ActorData.TagMap.ContainsKey(ActorKeys.LootTreasureClass)) { Treasure = (NullD.Common.MPQ.FileFormats.TreasureClass)ActorData.TagMap[ActorKeys.LootTreasureClass].Target; } if (Treasure != null) { System.Collections.Generic.List <int> GBids = new System.Collections.Generic.List <int> { }; int LoreSNOId = 0; string RawLores = player.Toon.LoreCollected; System.Collections.Generic.List <int> Lores = new System.Collections.Generic.List <int> { }; foreach (var Loot in Treasure.LootDropModifiers) { if (Loot.ItemSpecifier.ItemGBId != 0) { var ItemDef = Items.ItemGenerator.GetItemDefinition(Loot.ItemSpecifier.ItemGBId); var item = Items.ItemGenerator.CookFromDefinition(player, ItemDef); LoreSNOId = item.ActorData.TagMap[ActorKeys.Lore].Id; item.Destroy(); this.Attributes[GameAttribute.Gizmo_State] = 1; this.Attributes[GameAttribute.Untargetable] = true; this.Attributes.BroadcastChangedIfRevealed(); if (!player.HasLore(LoreSNOId)) { player.PlayLore(LoreSNOId, true); player.UpdateExp(300); Logger.Info("Book Implementaion ver 1.0, Получено опыта - 500, Book ID - {0}, Player - {1}", LoreSNOId, player.Toon.Name); break; } } } //this.Destroy(); } else if (this.ActorSNO.Id == 230232) { if (!player.HasLore(211567)) { player.PlayLore(211567, true); player.UpdateExp(500); Logger.Info("Book Implementaion ver 1.0, Получено опыта - 500, Book ID - 211567, Player - {0}", player.Toon.Name); } this.Attributes[GameAttribute.Gizmo_State] = 1; this.Attributes[GameAttribute.Untargetable] = true; this.Attributes.BroadcastChangedIfRevealed(); } }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(player.Toon.PersistentID); if (ActorSNO.Id == 104545 && dbQuestProgress.ActiveQuest == 72546 && dbQuestProgress.StepOfQuest == 4) { //118037 - Конец квеста World.Game.Quests.Advance(72546); Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked ((int)player.DynamicID); Attributes[GameAttribute.Gizmo_State] = 1; Attributes[GameAttribute.Untargetable] = true; Attributes.BroadcastChangedIfRevealed(); } else { var OpenDoor = new Door(this.World, this.ActorSNO.Id, this.Tags); OpenDoor.Field2 = 16; OpenDoor.RotationAxis = this.RotationAxis; OpenDoor.RotationW = this.RotationW; OpenDoor.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; OpenDoor.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked ((int)player.DynamicID); OpenDoor.Attributes[GameAttribute.Gizmo_State] = 1; OpenDoor.Attributes[GameAttribute.Untargetable] = true; Attributes.BroadcastChangedIfRevealed(); OpenDoor.EnterWorld(this.Position); World.BroadcastIfRevealed(new PlayAnimationMessage { ActorID = OpenDoor.DynamicID, Field1 = 5, Field2 = 0, tAnim = new Net.GS.Message.Fields.PlayAnimationMessageSpec[] { new Net.GS.Message.Fields.PlayAnimationMessageSpec() { Duration = 50, AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening], PermutationIndex = 0, Speed = 1 } } }, OpenDoor); World.BroadcastIfRevealed(new SetIdleAnimationMessage { ActorID = OpenDoor.DynamicID, AnimationSNO = AnimationSetKeys.Open.ID }, OpenDoor); Destroy(); } DBSessions.AccountSession.SaveOrUpdate(dbQuestProgress); DBSessions.AccountSession.Flush(); base.OnTargeted(player, message); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { Logger.Warn("Healthwell has no function, Powers not implemented"); this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked ((int)player.DynamicID); this.Attributes[GameAttribute.Gizmo_State] = 1; Attributes.BroadcastChangedIfRevealed(); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { Logger.Debug("(OnTargeted) Portal has been activated "); var world = this.World.Game.GetWorld(this.Destination.WorldSNO); var now_world = player.World; if (world == null) { Logger.Warn("Portal's destination world does not exist (WorldSNO = {0})", this.Destination.WorldSNO); return; } var startingPoint = world.GetStartingPointById(this.Destination.StartingPointActorTag); if (startingPoint != null) { player.ChangeWorld(world, startingPoint); } else if (this.Destination.StartingPointActorTag == -606) { player.ChangeWorld(world, new Common.Types.Math.Vector3D(2233.019f, 1801.747f, 5.950454f)); } else if (this.Destination.StartingPointActorTag == -636) { player.ChangeWorld(world, new Common.Types.Math.Vector3D(2037.89f, 1775.57f, 0f)); } else if (this.Destination.StartingPointActorTag == -637) { player.ChangeWorld(world, new Common.Types.Math.Vector3D(2177f, 1946f, -4.968689f)); } else if (this.Destination.StartingPointActorTag == -471) { player.ChangeWorld(world, new Common.Types.Math.Vector3D(2201.044f, 2531.148f, -27.36831f)); } else { Logger.Warn("Portal's tagged starting point does not exist (Tag = {0})", this.Destination.StartingPointActorTag); } #region Тестовая функция: переход наёмника if (player.ActiveHireling != null) { player.ActiveHireling.ChangeWorld(world, startingPoint); player.InGameClient.SendMessage(new PetMessage() { Field0 = 0, Field1 = 0, PetId = player.ActiveHireling.DynamicID, Field3 = 0, }); } #endregion //base.OnTargeted(player, message); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { foreach (var plr in World.Game.Players.Values) { if (plr.PlayerIndex == 0 & plr.Toon.ActiveQuest == 72095) { plr.Toon.ActiveQuest = 72095; if (plr.Toon.StepOfQuest == 6) { plr.Toon.StepIDofQuest = 43; StartConversation(World, 167115); World.Game.Quests.Advance(72095); } } } #region Отклик и анимация. World.BroadcastIfRevealed(new PlayAnimationMessage { ActorID = this.DynamicID, Field1 = 5, Field2 = 0, tAnim = new Net.GS.Message.Fields.PlayAnimationMessageSpec[] { new Net.GS.Message.Fields.PlayAnimationMessageSpec() { Duration = 50, AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening], PermutationIndex = 0, Speed = 1 } } }, this); World.BroadcastIfRevealed(new SetIdleAnimationMessage { ActorID = this.DynamicID, AnimationSNO = AnimationSetKeys.Open.ID }, this); this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked ((int)player.DynamicID); this.Attributes[GameAttribute.Chest_Open, 0xFFFFFF] = true; Attributes.BroadcastChangedIfRevealed(); base.OnTargeted(player, message); #endregion }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { // TODO Are chests dropping loot for everyone or only for the one opening it foreach (var p in this.GetPlayersInRange(30)) { World.DropItem(this, null, _treasureClass.CreateDrop(player)); } World.BroadcastIfRevealed(new PlayAnimationMessage { ActorID = this.DynamicID, Field1 = 5, Field2 = 0, tAnim = new Net.GS.Message.Fields.PlayAnimationMessageSpec[] { new Net.GS.Message.Fields.PlayAnimationMessageSpec() { Duration = 50, AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening], PermutationIndex = 0, Speed = 1 } } }, this); World.BroadcastIfRevealed(new SetIdleAnimationMessage { ActorID = this.DynamicID, AnimationSNO = AnimationSetKeys.Open.ID }, this); this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked ((int)player.DynamicID); this.Attributes[GameAttribute.Chest_Open, 0xFFFFFF] = true; Attributes.BroadcastChangedIfRevealed(); base.OnTargeted(player, message); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { Logger.Warn("Healthwell Implementaion ver 1.1, Range 26f, refill 5 second"); var playersAffected = player.GetPlayersInRange(26f); foreach (Players.Player playerN in playersAffected) { foreach (Players.Player targetAffected in playersAffected) { player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Effect.PlayEffectMessage() { ActorId = targetAffected.DynamicID, Effect = Net.GS.Message.Definitions.Effect.Effect.HealthOrbPickup }); } player.AddPercentageHP(100); } this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked ((int)player.DynamicID); this.Attributes[GameAttribute.Gizmo_State] = 1; Attributes.BroadcastChangedIfRevealed(); Ticker.TickTimer Timeout = new Ticker.SecondsTickTimer(player.World.Game, 5f); var ListenerWaiting = System.Threading.Tasks.Task <bool> .Factory.StartNew(() => WaitToSpawn(Timeout)); ListenerWaiting.ContinueWith(delegate { this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = false; //this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked((int)player.DynamicID); this.Attributes[GameAttribute.Gizmo_State] = 0; Attributes.BroadcastChangedIfRevealed(); }); player.Attributes[GameAttribute.Skill, 0x0002EC66] = 1; player.Attributes[GameAttribute.Skill_Total, 0x0002EC66] = 1; player.Attributes.SendChangedMessage(player.InGameClient); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { Logger.Warn("Healthwell Implementaion ver 1.0, Range 26f"); var playersAffected = player.GetPlayersInRange(26f); foreach (Players.Player playerN in playersAffected) { foreach (Players.Player targetAffected in playersAffected) { player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Effect.PlayEffectMessage() { ActorId = targetAffected.DynamicID, Effect = Net.GS.Message.Definitions.Effect.Effect.HealthOrbPickup }); } //every summon and mercenary owned by you must broadcast their green text to you /H_DANILO player.AddPercentageHP(100); } this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; this.Attributes[GameAttribute.Gizmo_Operator_ACDID] = unchecked ((int)player.DynamicID); this.Attributes[GameAttribute.Gizmo_State] = 1; Attributes.BroadcastChangedIfRevealed(); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { ReceiveDamage(player, 100); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { World.BroadcastIfRevealed(new ShrineActivatedMessage { ActorID = this.DynamicID }, this); #region Анимация использования World.BroadcastIfRevealed(new Net.GS.Message.Definitions.Animation.PlayAnimationMessage { ActorID = this.DynamicID, Field1 = 11, Field2 = 0, tAnim = new Net.GS.Message.Fields.PlayAnimationMessageSpec[] { new Net.GS.Message.Fields.PlayAnimationMessageSpec() { Duration = 10, AnimationSNO = AnimationSet.TagMapAnimDefault[AnimationSetKeys.DeathDefault], PermutationIndex = 0, Speed = 1 } } }, this); #endregion #region Исцеление var playersAffected = player.GetPlayersInRange(26f); foreach (Players.Player playerN in playersAffected) { foreach (Players.Player targetAffected in playersAffected) { player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Effect.PlayEffectMessage() { ActorId = targetAffected.DynamicID, Effect = Net.GS.Message.Definitions.Effect.Effect.HealthOrbPickup }); } player.AddPercentageHP(100); } #endregion switch (this.ActorSNO.Id) { case 225269: World.PowerManager.RunPower(player, 30476); //Shrine_Desecrated_Blessed - Благославение, противники наносят на 25% меньше урона Logger.Warn("Shrine Heal, and activate Blessed Buff. (No Work)"); break; case 225270: World.PowerManager.RunPower(player, 30477); //Shrine_Desecrated_Enlightened - Просветление, +25% к урону. Logger.Warn("Shrine Heal, and activate Enlightened Buff. (Complete Work)"); break; case 225271: World.PowerManager.RunPower(player, 30478); //Shrine_Desecrated_Fortune - Вероятность лучшего дропа +25% Logger.Warn("Shrine Heal, and activate Fortune Buff. (Complete Work)"); break; case 225272: World.PowerManager.RunPower(player, 30479); // Shrine_Desecrated_Frenzied Logger.Warn("Shrine Heal, and activate Frenzied Buff. (Complete Work"); break; } this.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; this.Attributes[GameAttribute.Gizmo_State] = 1; Attributes.BroadcastChangedIfRevealed(); player.PlayEffectGroup(18364); //player.Attributes[GameAttribute.Skill, 226820] = 1; //player.Attributes[GameAttribute.Skill_Total, 226820] = 1; player.Attributes.SendChangedMessage(player.InGameClient); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { Logger.Warn("Baner System ver 0.2"); #region Активация баннера игрока для телепортации if (this.ActorSNO.Name == "Banner_Player_1") { foreach (var targetplayer in this.World.Game.Players.Values) { if (targetplayer.PlayerIndex == 0) { if (targetplayer.Position != player.Position) { player.Teleport(targetplayer.Position); Logger.Warn("Перенос пользователя с помощью флага к игроку № {0}", player.PlayerIndex); } } } } else if (this.ActorSNO.Name == "Banner_Player_2") { foreach (var targetplayer in this.World.Game.Players.Values) { if (targetplayer.PlayerIndex == 1) { if (targetplayer.Position != player.Position) { player.Teleport(targetplayer.Position); Logger.Warn("Перенос пользователя с помощью флага к игроку № {0}", player.PlayerIndex); } } } } else if (this.ActorSNO.Name == "Banner_Player_3") { foreach (var targetplayer in this.World.Game.Players.Values) { if (targetplayer.PlayerIndex == 2) { if (targetplayer.Position != player.Position) { player.Teleport(targetplayer.Position); Logger.Warn("Перенос пользователя с помощью флага к игроку № {0}", player.PlayerIndex); } } } } else if (this.ActorSNO.Name == "Banner_Player_4") { foreach (var targetplayer in this.World.Game.Players.Values) { if (targetplayer.PlayerIndex == 3) { if (targetplayer.Position != player.Position) { player.Teleport(targetplayer.Position); Logger.Warn("Перенос пользователя с помощью флага к игроку № {0}", player.PlayerIndex); } } } } #endregion }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { player.EnableStoneOfRecall(); this.Destroy(); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { player.EnableCubeOfNephalem(); this.Destroy(); }
public override void OnTargeted(Players.Player player, Net.GS.Message.Definitions.World.TargetMessage message) { player.EnableCauldronOfJordan(); this.Destroy(); }