Esempio n. 1
0
        private static void ProcessDrop(ActiveChar character, int invSlot, ref bool moveMade)
        {
            if (!CanDrop(invSlot))
            {
                Display.Screen.AddResult(new Results.BattleMsg("Can't drop slot " + (invSlot + 1)));
                return;
            }
            Loc2D loc = character.CharLoc;

            if (!CanItemLand(loc))
            {
                Display.Screen.AddResult(new Results.BattleMsg("Can't drop here!"));
                return;
            }
            moveMade = true;
            int itemIndex = Inventory[invSlot];

            int mapSlot = CurrentMap.AddItem(new Item(itemIndex, 1, "", false, loc));

            Inventory[invSlot] = -1;

            Display.Screen.AddResult(new Results.SE("magic693"));
            Display.Screen.AddResult(new Results.AddItem(CurrentMap, mapSlot));

            Display.Screen.AddResult(new Results.BattleMsg(character.Name + " dropped a " + Data.GameData.ItemDex[itemIndex].Name + "."));
        }