protected void HandleItemTry(BaseUsableData data) { ItemData idata = (ItemData)data; if (!System.Object.ReferenceEquals(null, idata)) { if (idata.TargetType == ItemTargetType.TargetBody) { CurItemID = idata.ID; } else if (idata.TargetType == ItemTargetType.PlayerSelf) { EntityManager.Instance.PlayerEntity.UseItem(data.ID, EntityManager.Instance.PlayerEntity); } } }
protected void HandleSkillTry(BaseUsableData data) { SkillData sd = (SkillData)data; if (!System.Object.ReferenceEquals(null, sd)) { if (sd.TargetType == SkillTargetType.PlayerSelf) { CurSkillID = -1; EntityManager.Instance.PlayerEntity.UseSkill(sd.ID, EntityManager.Instance.PlayerEntity); } else { CurSkillID = sd.ID; } } }
public UISkillItem(int index, BaseUsableData data) { Index = index; Data = data; }
public BagItem(int index, BaseUsableData data) { Index = index; Data = data; }