Quote:
Originally Posted by .Summer
Code:
Item I = GC.MyChar.Equips.Get(9);
//Item I = new Item();
I.ID = 181625;//some garment
[COLOR="Red"]I.UID = (uint)Rnd.Next(10000000);[/COLOR]
I.MaxDur = I.DBInfo.Durability;
I.CurDur = I.MaxDur;
[COLOR="Red"]if (I.UID == 0)
{
I.UID = (uint)Rnd.Next(10000000);
} [/COLOR]
GC.MyChar.MyClient.AddSend(Packets.AddItem(I, 9));
really so hard.
|
What if that UID that your generating is already in use? Gotta put a check to make sure its not in use.