Ejemplo n.º 1
0
        public static void HandleMimicryObjectErase(MimicryObjectEraseRequestMessage message, WorldClient client)
        {
            CharacterItemRecord item = client.Character.Inventory.GetItem(message.hostUID);

            if (message.hostPos != 63)
            {
                client.Character.Inventory.UnequipItem(item, 63, item.GetTemplate(), item.Quantity);
                client.Character.RefreshOnMapInstance();
                client.Character.RefreshStats();
            }

            item.RemoveAllEffect(EffectsEnum.Eff_Mimicry);
            var newItem = item.CloneAndGetNewUID();

            client.Character.Inventory.RemoveItem(item.UID, item.Quantity, false);
            client.Character.Inventory.Add(newItem);
        }
Ejemplo n.º 2
0
        public static void HandleMimicryObjectEraseRequest(MimicryObjectEraseRequestMessage message, WorldClient client)
        {
            CharacterItemRecord item = client.Character.Inventory.GetItem(message.hostUID);

            if (message.hostPos != 63)
            {
                client.Character.RefreshActorOnMap();
                client.Character.RefreshStats();
            }
            if (client.Character.Inventory.GetEquipedItems().Contains(item))
            {
                client.Character.Inventory.SetItemPosition(item.UId, CharacterInventoryPositionEnum.INVENTORY_POSITION_NOT_EQUIPED, 1);
            }
            item.RemoveAllEffects(EffectsEnum.Effect_ChangeAppearence1151);
            CharacterItemRecord newItem = (CharacterItemRecord)item.CloneWithoutUID();

            newItem.AppearanceId = ItemRecord.GetItem(newItem.GId).AppearanceId;
            client.Character.Inventory.RemoveItem(item, item.Quantity);
            client.Character.Inventory.AddItem(newItem, 1);
            client.Character.RefreshActorOnMap();
            client.Character.RefreshStats();
        }
Ejemplo n.º 3
0
        public static void HandleMimicryObjectEraseRequestMessage(WorldClient client, MimicryObjectEraseRequestMessage message)
        {
            if (client.Character.IsInFight())
            {
                return;
            }

            var host = client.Character.Inventory.TryGetItem(message.hostUID);

            if (host == null)
            {
                return;
            }

            host.Effects.RemoveAll(x => x.EffectId == EffectsEnum.Effect_Appearance);
            host.Invalidate();

            client.Character.Inventory.RefreshItem(host);
            client.Character.UpdateLook();

            SendInventoryWeightMessage(client);
        }