Beispiel #1
0
        public bool RunPower(Actor user, PowerScript power, Actor target = null,
                             Vector3D targetPosition = null, TargetMessage targetMessage = null)
        {
            // replace power with existing channel instance if one exists
            if (power is ChanneledSkill)
            {
                var existingChannel = _FindChannelingSkill(user, power.PowerSNO);
                if (existingChannel != null)
                {
                    power = existingChannel;
                }
                else  // new channeled skill, add it to the list
                {
                    _channeledSkills.Add((ChanneledSkill)power);
                }
            }

            // copy in context params
            power.User = user;
            power.Target = target;
            power.World = user.World;
            power.TargetPosition = targetPosition;
            power.TargetMessage = targetMessage;

            _StartScript(power);
            return true;
        }
Beispiel #2
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
     //Logger.Trace("OnTargeted");
     if (LoreSNOId != -1)
     {
         if (!player.LearnedLore.m_snoLoreLearned.Contains(LoreSNOId))
         {
             // play lore to player
             player.InGameClient.SendMessage(new Mooege.Net.GS.Message.Definitions.Quest.LoreMessage { Id = 213, snoLore = LoreSNOId });
             // add lore to player's lores
             if (player.LearnedLore.Count < player.LearnedLore.m_snoLoreLearned.Length)
             {
                 player.LearnedLore.m_snoLoreLearned[player.LearnedLore.Count] = LoreSNOId;
                 player.LearnedLore.Count++; // Count
                 player.UpdateHeroState();
             }
         }
         if (player.GroundItems.ContainsKey(this.DynamicID))
             player.GroundItems.Remove(this.DynamicID);
         this.Destroy();
     }
     else
     {
         // monster lore, shouldn't occure
         player.Inventory.PickUp(this);
     }
 }
Beispiel #3
0
/*
  // Items are NOT constructed with tags!
        protected override void ReadTags()
        {
            base.ReadTags();
            if (this.Tags.ContainsKey((int)MarkerTagTypes.LoreSNOId))
            {
                LoreSNOId = Tags[(int)MarkerTagTypes.LoreSNOId].Int2;
            }
            else
            {
                LoreSNOId = -1;
            }
        }
*/
        public override void OnTargeted(Player player, TargetMessage message)
        {
            //Logger.Trace("OnTargeted");
            if (LoreSNOId != -1)
            {
                player.PlayLore(LoreSNOId, true);
            }
            if (player.GroundItems.ContainsKey(this.DynamicID))
                player.GroundItems.Remove(this.DynamicID);
            this.Destroy();
        }
Beispiel #4
0
        public override void OnTargeted(Player player, TargetMessage message)
        {
            player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.UseNephalemAltarMessage)
            {
                ActorID = this.DynamicID
            });

            player.Attributes[GameAttribute.Last_Altar_ANN] = (int)this.DynamicID;
            player.Attributes.BroadcastChangedIfRevealed();
            Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true;
            Attributes.BroadcastChangedIfRevealed();
        }
Beispiel #5
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
     //Logger.Trace("OnTargeted");
     int loreSNOId = LoreAssetHelper.GetLoreForItem(this.SNOId);
     if (loreSNOId != -1)
     {
         player.PlayLore(loreSNOId, true);
         if (player.GroundItems.ContainsKey(this.DynamicID))
             player.GroundItems.Remove(this.DynamicID);
         this.Destroy();
     }
 }
Beispiel #6
0
        public bool UsePower(Actor user, PowerScript power, Actor target = null,
                             Vector3D targetPosition = null, TargetMessage targetMessage = null)
        {
            // replace power with existing channel instance if one exists
            if (power is ChanneledPower)
            {
                var chanpow = _FindChannelingPower(user, power.PowerSNO);
                if (chanpow != null)
                    power = chanpow;
            }

            // copy in context params
            power.User = user;
            power.Target = target;
            power.World = user.World;
            power.TargetPosition = targetPosition;
            power.TargetMessage = targetMessage;

            // process channeled power events
            var channeledPower = power as ChanneledPower;
            if (channeledPower != null)
            {
                if (channeledPower.ChannelOpen)
                {
                    channeledPower.OnChannelUpdated();
                }
                else
                {
                    channeledPower.OnChannelOpen();
                    channeledPower.ChannelOpen = true;
                    _channeledPowers.Add(channeledPower);
                }
            }

            var powerEnum = power.Run().GetEnumerator();
            // actual power will first run here, if it yielded a timer process it in the waiting list
            if (powerEnum.MoveNext() && powerEnum.Current != PowerScript.StopExecution)
            {
                _waitingPowers.Add(new WaitingPower
                {
                    PowerEnumerator = powerEnum,
                    Implementation = power
                });
            }

            return true;
        }
Beispiel #7
0
        public override void OnTargeted(Player player, TargetMessage message)
        {
            player.SelectedNPC = this;

            var count = Interactions.Count + Conversations.Count;
            if (count == 0)
                return;

            NPCInteraction[] npcInters = new NPCInteraction[count];

            var it = 0;
            foreach(var conv in Conversations)
            {
                npcInters[it] = conv.AsNPCInteraction(this, player);
                it++;
            }

            foreach(var inter in Interactions)
            {
                npcInters[it] = inter.AsNPCInteraction(this, player);
                it++;
            }

            player.InGameClient.SendMessage(new NPCInteractOptionsMessage()
            {
                ActorID = this.DynamicID,
                tNPCInteraction = npcInters,
                Type = NPCInteractOptionsType.Normal             
            });

            // TODO: this has no effect, why is it sent?
            player.InGameClient.SendMessage(new Mooege.Net.GS.Message.Definitions.Effect.PlayEffectMessage()
            {
                ActorId = this.DynamicID,
                Effect = Net.GS.Message.Definitions.Effect.Effect.Unknown36
            }); 
        }
Beispiel #8
0
        public bool RunPower(Actor user, int powerSNO, uint targetId = uint.MaxValue, Vector3D targetPosition = null,
                               TargetMessage targetMessage = null)
        {
            Actor target;

            if (targetId == uint.MaxValue)
            {
                target = null;
            }
            else
            {
                target = user.World.GetActorByDynamicId(targetId);
                if (target == null)
                    return false;

                targetPosition = target.Position;
            }

            // find and run a power implementation
            var implementation = PowerLoader.CreateImplementationForPowerSNO(powerSNO);
            if (implementation != null)
            {
                return RunPower(user, implementation, target, targetPosition, targetMessage);
            }
            else
            {
                return false;
            }
        }
Beispiel #9
0
 public static void ProcessSkill(Mooege.Core.GS.Actors.Actor actor, TargetMessage message)
 {
     switch (actor.ActorType)
     {
         case ActorType.Player:
             ProcessSkillPlayer((actor as Player), message);
             break;
         case ActorType.Monster:
             break;
     }
 }
Beispiel #10
0
 public override void OnTargeted(Mooege.Core.GS.Player.Player player, TargetMessage message)
 {
     this.Die(player);
 }
Beispiel #11
0
 private static void ProcessSkillPlayer(Player player, TargetMessage message) {
     /* // testing resource management
     GameAttributeMap map = AttributeMath.ModifyResource(player, player.ResourceID, -10f);
     if (player.Properties.Class == Common.Toons.ToonClass.DemonHunter)
     {
             map.CombineMap(AttributeMath.ModifyResource(player, player.ResourceID + 1, 0f));
     }
     player.UpdateMap.CombineMap(map);
     */
     // message.Field6.Field1 - tick, when client sent this request (start of animation)
     // animations are based on attack_per_second (_current_hand) !!!
     switch (player.Properties.Class)
     {
         case ToonClass.Barbarian:
             ProcessSkillTEST(player, player.World, message);
             break;
         case ToonClass.DemonHunter:
             ProcessSkillTEST(player, player.World, message);
             break;
         case ToonClass.Monk:
             ProcessSkillMonk(player, player.World, message);
             break;
         case ToonClass.WitchDoctor:
             ProcessSkillTEST(player, player.World, message);
             break;
         case ToonClass.Wizard:
             ProcessSkillTEST(player, player.World, message);
             break;
     }
 }
Beispiel #12
0
 public override void OnTargeted(Mooege.Core.GS.Player.Player player, TargetMessage message)
 {
     throw new NotImplementedException();
 }
Beispiel #13
0
        public override void OnTargeted(Player player, TargetMessage message)
        {
            player.SelectedNPC = this;

            var count = Interactions.Count + Conversations.Count;
            if (count == 0)
                return;

            // If there is only one conversation option, immediatly select it without showing menu
            if (Interactions.Count == 0 && Conversations.Count == 1)
            {
                player.Conversations.StartConversation(Conversations[0].ConversationSNO);
                Conversations[0].MarkAsRead();
                UpdateConversationList();
                return;
            }

            NPCInteraction[] npcInters = new NPCInteraction[count];

            var it = 0;
            foreach(var conv in Conversations)
            {
                npcInters[it] = conv.AsNPCInteraction(this, player);
                it++;
            }

            foreach(var inter in Interactions)
            {
                npcInters[it] = inter.AsNPCInteraction(this, player);
                it++;
            }


            player.InGameClient.SendMessage(new NPCInteractOptionsMessage()
            {
                ActorID = this.DynamicID,
                tNPCInteraction = npcInters,
                Type = NPCInteractOptionsType.Normal             
            });

            // TODO: this has no effect, why is it sent?
            player.InGameClient.SendMessage(new Mooege.Net.GS.Message.Definitions.Effect.PlayEffectMessage()
            {
                ActorId = this.DynamicID,
                Effect = Net.GS.Message.Definitions.Effect.Effect.Unknown36
            }); 
        }
Beispiel #14
0
 private static void ProcessSkillTEST(Player player, Mooege.Core.GS.Map.World world, TargetMessage message)
 {
     Vector3D targetPosition = message.Field2.Position;
     Mooege.Core.GS.Actors.Actor target = null;
     if (message.TargetID != 0xFFFFFFFF)
     {
         target = world.GetActorByDynamicId(message.TargetID);
         if (target != null)
         {
             targetPosition = target.Position;
             if (target is Mooege.Core.GS.Actors.Monster)
             {
                 (target as Mooege.Core.GS.Actors.Monster).Die();
             }
         }
     } switch (message.PowerSNO)
     {
         case Skills.Skills.Wizard.Offensive.Hydra:
             world.AddEffect(new FXEffect { Actor = player, EffectID = 81103, DurationInTicks = (60 * 9), Position = targetPosition, NeedsActor = true }); // needs to lower to groud
             world.AddEffect(new HydraFXEffect { Actor = player, EffectID = 80745, DurationInTicks = (60 * 9), Position = targetPosition, AttackOffset = 0 });
             world.AddEffect(new HydraFXEffect { Actor = player, EffectID = 80757, DurationInTicks = (60 * 9), Position = targetPosition, AttackOffset = (6 * 4) });
             world.AddEffect(new HydraFXEffect { Actor = player, EffectID = 80758, DurationInTicks = (60 * 9), Position = targetPosition, AttackOffset = (6 * 8) });
             break;
     }
 }
Beispiel #15
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
 }
Beispiel #16
0
        public virtual void OnTargeted(Player player, TargetMessage message)
        {

        }
Beispiel #17
0
 public virtual void OnTargeted(Mooege.Core.GS.Player.Player player, TargetMessage message)
 {
 }
Beispiel #18
0
        public bool UsePower(Actor user, int powerSNO, uint targetId = uint.MaxValue, Vector3D targetPosition = null,
                             TargetMessage targetMessage = null)
        {
            Actor target;

            if (targetId == uint.MaxValue)
            {
                target = null;
            }
            else
            {
                target = user.World.GetActorByDynamicId(targetId);
                if (target == null)
                    return false;

                targetPosition = target.Position;
            }
                        
            #region Items and Monster spawn HACK
            // HACK: intercept hotbar skill 1 to always spawn test mobs.
            if (user is Player && powerSNO == (user as Player).SkillSet.HotBarSkills[4].SNOSkill)
            {
                // number of monsters to spawn
                int spawn_count = 10;

                // list of actorSNO values to pick from when spawning
                int[] actorSNO_values = { 4282, 3893, 6652, 5428, 5346, 6024, 5393, 5467 };
                int actorSNO = actorSNO_values[RandomHelper.Next(actorSNO_values.Length - 1)];
                Logger.Debug("10 monsters spawning with actor sno {0}", actorSNO);

                for (int n = 0; n < spawn_count; ++n)
                {
                    Vector3D position;

                    if (targetPosition.X == 0f)
                    {
                        position = new Vector3D(user.Position);
                        if ((n % 2) == 0)
                        {
                            position.X += (float)(RandomHelper.NextDouble() * 20);
                            position.Y += (float)(RandomHelper.NextDouble() * 20);
                        }
                        else
                        {
                            position.X -= (float)(RandomHelper.NextDouble() * 20);
                            position.Y -= (float)(RandomHelper.NextDouble() * 20);
                        }
                    }
                    else
                    {
                        position = new Vector3D(targetPosition);
                        position.X += (float)(RandomHelper.NextDouble() - 0.5) * 20;
                        position.Y += (float)(RandomHelper.NextDouble() - 0.5) * 20;
                        position.Z = user.Position.Z;
                    }

                    Monster mon = new Monster(user.World, actorSNO, null);
                    mon.Position = position;
                    mon.Scale = 1.35f;
                    mon.Attributes[GameAttribute.Hitpoints_Max_Total] = 5f;
                    mon.Attributes[GameAttribute.Hitpoints_Max] = 5f;
                    mon.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
                    mon.Attributes[GameAttribute.Hitpoints_Cur] = 5f;
                    user.World.Enter(mon);
                }

                // spawn some useful items for testing at the ground of the player
                if (!_spawnedHelperItems)
                {
                    _spawnedHelperItems = true;
                    Items.ItemGenerator.Cook((Players.Player)user, "Sword_2H_205").EnterWorld(user.Position);
                    Items.ItemGenerator.Cook((Players.Player)user, "Crossbow_102").EnterWorld(user.Position);
                    for (int n = 0; n < 30; ++n)
                        Items.ItemGenerator.Cook((Players.Player)user, "Runestone_Unattuned_07").EnterWorld(user.Position);
                }
                
                return true;
            }
            #endregion

            // find and run a power implementation
            var implementation = PowerLoader.CreateImplementationForPowerSNO(powerSNO);
            if (implementation != null)
            {
                implementation.PowerSNO = powerSNO;
                return UsePower(user, implementation, target, targetPosition, targetMessage);
            }
            else
            {
                return false;
            }
        }
Beispiel #19
0
        public bool RunPower(Actor user, int powerSNO, uint targetId = uint.MaxValue, Vector3D targetPosition = null,
                               TargetMessage targetMessage = null)
        {
            Actor target;

            if (targetId == uint.MaxValue)
            {
                target = null;
            }
            else
            {
                target = user.World.GetActorByDynamicId(targetId);
                if (target == null)
                    return false;

                targetPosition = target.Position;
            }

            #region Items and Monster spawn HACK
            /*
            // HACK: intercept hotbar skill 1 to always spawn test mobs.
            if (user is Player && powerSNO == (user as Player).SkillSet.HotBarSkills[4].SNOSkill)
            {
                // number of monsters to spawn
                int spawn_count = 3;

                // list of actorSNO values to pick from when spawning
                //int[] actorSNO_values = { 5387, 6652, 5346 };
                //int[] actorSNO_values = { 187664, 128781, 4982 }; - Quilldemons.
                int actorSNO = 4982;//actorSNO_values[RandomHelper.Next(actorSNO_values.Length)];
                Logger.Debug("3 monsters spawning with actor sno {0}", actorSNO);

                for (int n = 0; n < spawn_count; ++n)
                {
                    Vector3D position;

                    if (targetPosition.X == 0f)
                    {
                        position = new Vector3D(user.Position);
                        if ((n % 2) == 0)
                        {
                            position.X += (float)(RandomHelper.NextDouble() * 20);
                            position.Y += (float)(RandomHelper.NextDouble() * 20);
                        }
                        else
                        {
                            position.X -= (float)(RandomHelper.NextDouble() * 20);
                            position.Y -= (float)(RandomHelper.NextDouble() * 20);
                        }
                    }
                    else
                    {
                        position = new Vector3D(targetPosition);
                        position.X += (float)(RandomHelper.NextDouble() - 0.5) * 20;
                        position.Y += (float)(RandomHelper.NextDouble() - 0.5) * 20;
                        position.Z = user.Position.Z;
                    }
                    
                    //Monster mon = new Monster(user.World, actorSNO, null);
                    //mon.SetBrain(new Mooege.Core.GS.AI.Brains.MonsterBrain(mon));
                    //mon.Position = position;
                    //mon.Scale = 1.35f;
                    //mon.Attributes[GameAttribute.Hitpoints_Max_Total] = 5f;
                    //mon.Attributes[GameAttribute.Hitpoints_Max] = 5f;
                    //mon.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
                    //mon.Attributes[GameAttribute.Hitpoints_Cur] = 5f;
                    //mon.Attributes[GameAttribute.Attacks_Per_Second_Total] = 1.0f;
                    //mon.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0] = 5f;
                    //mon.Attributes[GameAttribute.Damage_Weapon_Delta_Total, 0] = 7f;
                    //mon.Attributes[GameAttribute.Casting_Speed_Total] = 1.0f;
                    //user.World.Enter(mon);

                    Monster mon = new QuillDemon(user.World, actorSNO, null);
                    mon.Position = position;
                    mon.Scale = 1f;
                    user.World.Enter(mon);
                }

                // spawn some useful items for testing at the ground of the player
                if (!_spawnedHelperItems)
                {
                    _spawnedHelperItems = true;
                    Items.ItemGenerator.Cook((Players.Player)user, "Sword_2H_205").EnterWorld(user.Position);
                    Items.ItemGenerator.Cook((Players.Player)user, "Crossbow_102").EnterWorld(user.Position);
                    for (int n = 0; n < 30; ++n)
                        Items.ItemGenerator.Cook((Players.Player)user, "Runestone_Unattuned_07").EnterWorld(user.Position);
                }

                return true;
            }*/
            #endregion
            
            // find and run a power implementation
            var implementation = PowerLoader.CreateImplementationForPowerSNO(powerSNO);
            if (implementation != null)
            {
                return RunPower(user, implementation, target, targetPosition, targetMessage);
            }
            else
            {
                // no power script is available, but try to play the cast effects
                var efgTag = Mooege.Core.GS.Common.Types.TagMap.PowerKeys.CastingEffectGroup_Male;
                var tagmap = PowerTagHelper.FindTagMapWithKey(powerSNO, efgTag);
                if (tagmap != null)
                    user.PlayEffectGroup(tagmap[efgTag].Id);

                return false;
            }
        }
Beispiel #20
0
 public override void OnTargeted(Mooege.Core.GS.Player.Player player, TargetMessage message)
 {
     World.SpawnRandomDrop(player, player.Position);
 }
Beispiel #21
0
        public override void OnTargeted(Player player, TargetMessage message)
        {
            World world = this.World.Game.GetWorld(this.Destination.WorldSNO);
            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.TransferTo(world,startingPoint);
            else
                Logger.Warn("Portal's tagged starting point does not exist (Tag = {0})", this.Destination.StartingPointActorTag);
        }
Beispiel #22
0
        private static void ProcessSkillMonk(Player player, Mooege.Core.GS.Map.World world, TargetMessage message) {
            Vector3D targetPosition = message.Field2.Position;
            Mooege.Core.GS.Actors.Actor target = null;
            if (message.TargetID != 0xFFFFFFFF)
            {
                target = world.GetActorByDynamicId(message.TargetID);
                if (target != null)
                {
                    targetPosition = target.Position;
                }
            }
            int startingTick = world.Game.TickCounter;
            int effectID = 0;
            int masterEffectID = 0;
            /* // broken ticking
            if (message.Field6 != null)
            {
                startingTick =  message.Field6.Field1;
            }
             */
            switch (message.PowerSNO)
            {
                case Skills.Skills.Monk.SpiritGenerator.FistsOfThunder:
                    effectID  = 143570; // cast
                    masterEffectID = 96176; // projectile
                    switch (message.Field5)
                    {
                        case 0:
                            startingTick += (int)(6 * 3 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 1:
                            effectID = 143561;//143569; // cast
                            masterEffectID = 96176;//96177;
                            startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 2:
                            effectID = 143566; // cast
                            masterEffectID = 96178;
                            startingTick += (int)(6 * 5 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                    }
                    world.AddEffect(new FXEffect { Actor = player, EffectID = effectID, StartingTick = (message.Field5 == 2) ? startingTick - (int)(6 * 5 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]) : startingTick });
                    world.AddEffect(new AttackEffect
                    {
                        Actor = player,
                        EffectID = masterEffectID,
                        StartingTick = startingTick,
                        DamageTypeOverride = 2
                    });
                    break;
                case Skills.Skills.Monk.SpiritGenerator.ExplodingPalm:
                    effectID = 142471;
                    masterEffectID = 143841;
                    switch (message.Field5)
                    {
                        case 0:
                            startingTick += (int)(6 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 1:
                            startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 2:
                            effectID = 142473;
                            masterEffectID = 143473;
                            startingTick += (int)(6 * 4 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                    }
                    world.AddEffect(new FXEffect { Actor = player, EffectID = effectID, StartingTick = startingTick });
                    world.AddEffect(new AttackEffect { Actor = player, EffectID = masterEffectID, StartingTick = startingTick });
                    break;
                case Skills.Skills.Monk.SpiritGenerator.DeadlyReach:
                    masterEffectID = 140870;
                    switch (message.Field5)
                    {
                        case 0:
                            startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 1:
                            masterEffectID = 140871;
                            startingTick += (int)(6 * 2/ player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 2:
                            masterEffectID = 140872;
                            startingTick += (int)(6 * 5 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                    }
                    world.AddEffect(new AttackEffect { Actor = player, EffectID = masterEffectID, StartingTick = startingTick });
                    break;
                case Skills.Skills.Monk.SpiritGenerator.CripplingWave:
                    effectID = 152353;
                    startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                    switch (message.Field5)
                    {
                        case 0:
                            break;
                        case 1:
                            effectID = 147912;
                            break;
                        case 2:
                            effectID = 147929;
                            break;
                    }
                    world.AddEffect(new AttackEffect { Actor = player, EffectID = effectID, StartingTick = startingTick });
                    break;
                case Skills.Skills.Monk.SpiritGenerator.SweepingWind:
                    effectID = 196981;
                    startingTick += (int)(6 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                    switch (message.Field5)
                    {
                        case 0:
                            break;
                        case 1:
                            effectID = 196983;
                            break;
                        case 2:
                            effectID = 196984;
                            break;
                    }
                    world.AddEffect(new AttackEffect { Actor = player, EffectID = effectID, StartingTick = startingTick});
                    break;
                case Skills.Skills.Monk.SpiritGenerator.WayOfTheHundredFists:
                    effectID = 2612;//(player.Properties.Gender == 0) ? 2612 : ???;
                    masterEffectID = 137345;//(player.Properties.Gender == 0) ? 137345 ; ???;
                    switch (message.Field5)
                    {
                        case 0:
                            startingTick += (int)(6 * 3 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 1:
                            startingTick += (int)(6 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            effectID = 98412;//(player.Properties.Gender == 0) ? 98412 : ???;
                            masterEffectID = 137346;//(player.Properties.Gender == 0) ? 137346 : ???;
                            break;
                        case 2:
                            startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            masterEffectID = 137347;//(player.Properties.Gender == 0) ? 137347 : ???;
                            effectID = 98416;//(player.Properties.Gender == 0) ? 98416 : ???;
                            break;
                    }
                    world.AddEffect(new AttackEffect { Actor = player, EffectID = masterEffectID, StartingTick = startingTick });
                    world.AddEffect(new FXEffect { Actor = player, EffectID = effectID, StartingTick = startingTick });
                    break;
                case Skills.Skills.Monk.SpiritSpenders.DashingStrike:
                    world.AddEffect(new FXEffect
                    {
                        Actor = player,
                        EffectID = 192085,
                        DurationInTicks = 6,
                    });
                    world.AddEffect(new FXEffect
                    {
                        Actor = player,
                        EffectID = 111132,
                        DurationInTicks = 6,
                        Position = targetPosition,
                        Angle = ActorUtils.GetFacingAngle(player.Position, targetPosition)
                    });
                    break;
                case Skills.Skills.Monk.SpiritSpenders.LashingTailKick:
                    world.AddEffect(new FXEffect { Actor = player, EffectID = 143782 });
                    break;
                case Skills.Skills.Monk.SpiritSpenders.WaveOfLight:
                    world.AddEffect(new FXEffect { Actor = player, EffectID = 145011, });
                    world.AddEffect(new FXEffect { Actor = player, EffectID = 144079, StartingTick = startingTick + 6});
                    break;
                case Skills.Skills.Monk.SpiritSpenders.SevenSidedStrike:
                    // TODO: find targets for effects, now targetting self
                    // 98886 ?
                    effectID = 98826;
                    startingTick += 12;
                    world.AddEffect(new FXEffect { Actor = player, EffectID = effectID, StartingTick = startingTick });
                    effectID = 98831;
                    startingTick += 12;
                    world.AddEffect(new FXEffect { Actor = player, EffectID = effectID, StartingTick = startingTick });
                    effectID = 98842;
                    startingTick += 12;
                    world.AddEffect(new FXEffect { Actor = player, EffectID = effectID, StartingTick = startingTick });
                    break;
                case Skills.Skills.Monk.SpiritSpenders.TempestRush:

                    break;
            }
        }
Beispiel #23
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
     player.InGameClient.SendMessage(new OpenArtisanWindowMessage() { ArtisanID = this.DynamicID });
 }
Beispiel #24
0
 public override void OnTargeted(Mooege.Core.GS.Player.Player player, TargetMessage message)
 {
     player.InGameClient.SendMessage(new OpenArtisanWindowMessage(this.DynamicID));
 }
Beispiel #25
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
     player.InGameClient.SendMessage(new OpenTradeWindowMessage((int)this.DynamicID));
 }
Beispiel #26
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
     //Logger.Trace("OnTargeted");
     if (this.ItemType.Hash == 3646475) // hash for "Book"
     {
         // book with lore
         var y = MPQStorage.Data.Assets[SNOGroup.Actor].FirstOrDefault(x => x.Value.SNOId == this.SNOId);
         var e = (y.Value.Data as Mooege.Common.MPQ.FileFormats.Actor).TagMap.TagMapEntries.FirstOrDefault(z => z.TagID == (int)MarkerTagTypes.LoreSNOId);
         if (e != null)
         {
             int LoreSNOId = e.Int2;
             if ((LoreSNOId != -1) && !player.LearnedLore.m_snoLoreLearned.Contains(LoreSNOId))
             {
                 // play lore to player
                 player.InGameClient.SendMessage(new Mooege.Net.GS.Message.Definitions.Quest.LoreMessage { Id = 213, snoLore = LoreSNOId });
                 // add lore to player's lores
                 if (player.LearnedLore.Count < player.LearnedLore.m_snoLoreLearned.Length)
                 {
                     player.LearnedLore.m_snoLoreLearned[player.LearnedLore.Count] = LoreSNOId;
                     player.LearnedLore.Count++; // Count
                     player.UpdateHeroState();
                 }
             }
             if (player.GroundItems.ContainsKey(this.DynamicID))
                 player.GroundItems.Remove(this.DynamicID);
             this.Destroy();
         }
         else
         {
             // monster lore, shouldn't occure
             player.Inventory.PickUp(this);
         }
     }
     else
     {
         // other items
         player.Inventory.PickUp(this);
     }
 }
Beispiel #27
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
     //Logger.Trace("OnTargeted");
     player.Inventory.PickUp(this);
 }
Beispiel #28
0
 // Message handlers
 private void OnObjectTargeted(GameClient client, TargetMessage message)
 {
     Actor actor = this.World.GetActor(message.TargetID);
     if (actor != null)
     {
         actor.OnTargeted(this, message);
     }
     else
     {
         //Logger.Warn("Player targeted an invalid object (ID = {0})", message.TargetID);
     }
 }
Beispiel #29
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
     this.Die(player);
 }
Beispiel #30
0
 public override void OnTargeted(Player player, TargetMessage message)
 {
     World.SpawnRandomItemDrop(player, player.Position);
 }