public CharacterItemRecord CreateCertificate(Character character) { ItemRecord template = ItemRecord.GetItem(Template.ItemGId); var item = template.GetCharacterItem(CharacterId, 1); item.Effects.AddRange(ItemGenerationProvider.GetCertificateEffects(Name, character.Name, (ushort)DisplayedMountLevel, (int)UId, (ushort)ModelId)); return(item); }
/// <summary> /// Lorsqu'un objet est ajouté /// </summary> /// <param name="obj"></param> void Inventory_OnItemAdded(CharacterItemRecord obj) { obj.UId = ItemUIdPopper.PopUID(); if (ItemGenerationProvider.IsHandled(obj.Template.TypeEnum)) { ItemGenerationProvider.InitItem(obj, Character); } obj.AddElement(); Character.Client.Send(new ObjectAddedMessage(obj.GetObjectItem())); RefreshWeight(); }