예제 #1
0
    public override Game.GameObject save()
    {
        Game.GameObject gameObject = new Game.GameObject();
        gameObject.Components.Add(new Game.CircleCollider(true));

        Game.Item itemComp = new Game.Item();
        itemComp.itemType = itemType;

        gameObject.Components.Add(itemComp);

        return(gameObject);
    }
예제 #2
0
    public static EquipmentTag Classify(Game.Item item)
    {
        var name = item.name.ToLowerInvariant();

        if (name.Contains("potion"))
        {
            return(EquipmentTag.Potion);
        }

        if (name.Contains("sword"))
        {
            return(EquipmentTag.Weapon);
        }
        if (name.Contains("dagger"))
        {
            return(EquipmentTag.Weapon);
        }
        if (name.Contains("axe"))
        {
            return(EquipmentTag.Weapon);
        }
        if (name.Contains("spear"))
        {
            return(EquipmentTag.Weapon);
        }
        if (name.Contains("kingslayer"))
        {
            return(EquipmentTag.Weapon);
        }
        if (name.Contains("bloodcursed slicer"))
        {
            return(EquipmentTag.Weapon);
        }

        if (name.Contains("it isn't"))
        {
            return(EquipmentTag.Weapon);
        }

        if (name.Contains("breastplate"))
        {
            return(EquipmentTag.Breastplate);
        }
        if (name.Contains("helmet"))
        {
            return(EquipmentTag.Helmet);
        }
        if (name.Contains("legplates"))
        {
            return(EquipmentTag.Legplates);
        }
        return(EquipmentTag.Unknown);
    }
예제 #3
0
        public static void ActiveCool(Player MyClient)
        {
            byte counter = 0;

            for (byte i = 1; i < 9; i++)
            {
                if (i == 7)
                {
                    i++;
                }
                ItemInformationPacket I = MyClient.Equipment.GetEnumerator(i);
                if (I.ID != 0)
                {
                    Game.ItemIDManipulation Q = new NewestCOServer.Game.ItemIDManipulation(I.ID);
                    if (Q.Quality == Game.Item.ItemQuality.Super)
                    {
                        counter += 1;
                    }
                }
            }

            if (MyClient.MyChar.Job >= 100)
            {
                if (counter == 6)
                {
                    counter = 7;
                }
            }
            if (MyClient.MyChar.Job >= 40 && MyClient.MyChar.Job <= 45)
            {
                if (counter == 6)
                {
                    Game.Item I = MyClient.MyChar.Equips.Get(5);
                    I.ID = MyClient.MyChar.Equips.LeftHand.ID;
                    if (I.ID == 0)
                    {
                        counter = 7;
                    }
                }
            }
            if (counter == 7)
            {
                if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
                {
                    MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "warrior"));
                }
                else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
                {
                    MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "fighter"));
                }
                else if (MyClient.MyChar.Job >= 100)
                {
                    MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "taoist"));
                }
                else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
                {
                    MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "archer"));
                }
            }
            else
            {
                if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
                {
                    MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "warrior-s"));
                }
                else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
                {
                    MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "fighter-s"));
                }
                else if (MyClient.MyChar.Job >= 100)
                {
                    MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "taoist-s"));
                }
                else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
                {
                    MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "archer-s"));
                }
            }
            MyClient.MyChar.Action = 100;
        }