コード例 #1
0
        //---------------------------------------------------------------------------------------------

        public void CastSpell(string spellName, string target, bool useScrool, bool useSwitchHeadScrool, bool silence, bool forceScrool)
        {
            if (String.IsNullOrEmpty(spellName))
            {
                World.Player.PrintMessage("[Zvol kouzlo..]", MessageType.Error);
            }
            else
            {
                if (Necromancy.IsNecroSpell(spellName))
                {
                    Necromancy.Current.CastNecroSpell(spellName, target);
                }
                else
                {
                    StandardSpell sp;
                    if (Magery.ParseSpell(spellName, out sp))
                    {
                        this.CastSpell(sp, Targeting.ParseTargets((target == null ? "" : target).Split(',')), useScrool, useSwitchHeadScrool, silence, forceScrool);
                    }
                    else
                    {
                        Game.PrintMessage("Cast: " + spellName + " - Neexistuje!!!");
                    }
                }
            }
        }
コード例 #2
0
        //---------------------------------------------------------------------------------------------

        protected void OnInit()
        {
            if (Current == null)
            {
                Current = this;
            }
            this.SyncRoot = new object();
        }
コード例 #3
0
        //---------------------------------------------------------------------------------------------

        public void CastNecroSpell(string spellName, string target)
        {
            NecromancySpell sp;

            if (Necromancy.ParseSpell(spellName, out sp))
            {
                CastNecroSpell(sp, target);
            }
            else
            {
                World.Player.PrintMessage("[Neexistuje " + spellName + "]", MessageType.Warning);
            }
        }