public IEnumerator <YieldInstruction> ProcessTakeItem(GroundChar character, int teamSlot) { ExplorerTeam memberTeam = DataManager.Instance.Save.ActiveTeam; Character itemChar = memberTeam.Players[teamSlot]; //no curse check in ground mode InvItem item = itemChar.EquippedItem; memberTeam.AddToInv(item); itemChar.DequipItem(); GameManager.Instance.SE(GraphicsManager.EquipSE); yield return(CoroutineManager.Instance.StartCoroutine(MenuManager.Instance.SetDialogue(false, Text.FormatKey("MSG_ITEM_DEQUIP", itemChar.GetDisplayName(false), item.GetDisplayName())))); }
private IEnumerator <YieldInstruction> ProcessTrashItem(GroundChar character, int invSlot, bool held) { InvItem invItem = null; if (held) { Character activeChar = DataManager.Instance.Save.ActiveTeam.Players[invSlot]; //no curse check in ground mode invItem = activeChar.EquippedItem; activeChar.EquippedItem = new InvItem(); } else { ExplorerTeam memberTeam = DataManager.Instance.Save.ActiveTeam; invItem = memberTeam.GetInv(invSlot); memberTeam.RemoveFromInv(invSlot); } yield return(CoroutineManager.Instance.StartCoroutine(MenuManager.Instance.SetDialogue(false, String.Format("Threw away the {0}.", invItem.GetDisplayName())))); }
public IEnumerator <YieldInstruction> ProcessGiveItem(GroundChar character, int invSlot, int teamSlot) { ExplorerTeam memberTeam = DataManager.Instance.Save.ActiveTeam; Character itemChar = memberTeam.Leader; if (teamSlot > -1) { itemChar = memberTeam.Players[teamSlot]; } //no curse check in ground mode InvItem item = memberTeam.GetInv(invSlot); memberTeam.RemoveFromInv(invSlot); GameManager.Instance.SE(GraphicsManager.EquipSE); if (itemChar.EquippedItem.ID > -1) { yield return(CoroutineManager.Instance.StartCoroutine(MenuManager.Instance.SetDialogue(false, Text.FormatKey("MSG_ITEM_SWAP", itemChar.GetDisplayName(false), item.GetDisplayName(), itemChar.EquippedItem.GetDisplayName())))); //put item in inv memberTeam.AddToInv(new InvItem(itemChar.EquippedItem)); } else { yield return(CoroutineManager.Instance.StartCoroutine(MenuManager.Instance.SetDialogue(false, Text.FormatKey("MSG_ITEM_GIVE", itemChar.GetDisplayName(false), item.GetDisplayName())))); } itemChar.EquipItem(item); }