[FIX]AddItem (Fully work)

07/26/2010 15:23 Fish*#1
Go in character.cs and search for:
Code:
public void AddItem(uint ID, byte Plus)
Under add:
Code:
        public void AddItem(uint ID, byte Plus, byte Bless)
        {
            Item I = new Item();
            I.Plus = Plus;
            I.Bless = Bless;
            I.ID = ID;
            I.UID = (uint)Rnd.Next(10000000);
            I.MaxDur = I.DBInfo.Durability;
            I.CurDur = I.MaxDur;

            if (I.UID == 0)
            {
                I.UID = (uint)Rnd.Next(10000000);
            }

            Inventory.Add(I);
            MyClient.AddSend(Packets.AddItem(I, 0));
        }
        public void AddItem(uint ID, byte Plus, byte Bless, byte Enchant)
        {
            Item I = new Item();
            I.Plus = Plus;
            I.Bless = Bless;
            I.Enchant = Enchant;
            I.ID = ID;
            I.UID = (uint)Rnd.Next(10000000);
            I.MaxDur = I.DBInfo.Durability;
            I.CurDur = I.MaxDur;

            if (I.UID == 0)
            {
                I.UID = (uint)Rnd.Next(10000000);
            }

            Inventory.Add(I);
            MyClient.AddSend(Packets.AddItem(I, 0));
        }
        public void AddItem(uint ID, byte Plus, byte Bless, byte Enchant, byte Soc1)
        {
            Item I = new Item();
            I.Plus = Plus;
            I.Bless = Bless;
            I.Enchant = Enchant;
            I.Soc1 = (Game.Item.Gem)Soc1;
            I.ID = ID;
            I.UID = (uint)Rnd.Next(10000000);
            I.MaxDur = I.DBInfo.Durability;
            I.CurDur = I.MaxDur;

            if (I.UID == 0)
            {
                I.UID = (uint)Rnd.Next(10000000);
            }

            Inventory.Add(I);
            MyClient.AddSend(Packets.AddItem(I, 0));
        }
        public void AddItem(uint ID, byte Plus, byte Bless, byte Enchant, byte Soc1, byte Soc2)
        {
            Item I = new Item();
            I.Plus = Plus;
            I.Bless = Bless;
            I.Enchant = Enchant;
            I.Soc1 = (Game.Item.Gem)Soc1;
            I.Soc2 = (Game.Item.Gem)Soc2;
            I.ID = ID;
            I.UID = (uint)Rnd.Next(10000000);
            I.MaxDur = I.DBInfo.Durability;
            I.CurDur = I.MaxDur;

            if (I.UID == 0)
            {
                I.UID = (uint)Rnd.Next(10000000);
            }

            Inventory.Add(I);
            MyClient.AddSend(Packets.AddItem(I, 0));
        }
Thats it.
Pretty simple.
07/26/2010 17:51 ryuchetval#2
it's not really a fix..was it ever bugged? you just added something new
07/26/2010 17:54 _DreadNought_#3
Exactly what ^ said.
07/26/2010 18:23 killersub#4
I guess wat dis does is if u try and convert something from like lotf or coemu you dont have to make a WHOLE new void to fix da errors the coemu's AddItem(or w.e version) gives...well still I posted thanks as he made a contribution ^_0.
07/26/2010 18:44 _DreadNought_#5
You would give thanks.
Thanks given: 125
Received Thanks: 115
More thanks given then got.
07/26/2010 18:58 killersub#6
Quote:
Originally Posted by Eliminationn View Post
You would give thanks.
Thanks given: 125
Received Thanks: 115
More thanks given then got.
I'm more of a people person dats y TYVM :P.
07/27/2010 01:52 Fish*#7
The fix is that the original itemadd can:

GC.MyChar.AddItem(ID, +);

this one can:
GC.MyChar.AddItem(ID, +, -, hp, soc1, soc2);

see the different?
so who said it aint a fix, failed.

+thanks to killersub
07/27/2010 01:54 Arcо#8
Yeah, this isn't really a fix, more of just an addon. That's just my opinion though, nonetheless its helpful^^
07/27/2010 01:56 Fish*#9
is still a fix somehow XD