private void HandleErrorCodeSkill(ErrorCodeSkill errorCodeSkill) { string s = ""; switch (errorCodeSkill) { case ErrorCodeSkill.Mana: s = GameManager.localization.GetText("ErrorCodeSkill_NoManaForSkill"); break; case ErrorCodeSkill.HP: s = GameManager.localization.GetText("ErrorCodeSkill_NoHealthForSkill"); break; case ErrorCodeSkill.Silent: s = GameManager.localization.GetText("ErrorCodeSkill_Silent"); break; case ErrorCodeSkill.coldown: s = GameManager.localization.GetText("ErrorCodeSkill_Coldown"); break; case ErrorCodeSkill.Aura: s = GameManager.localization.GetText("ErrorCodeSkill_Aura"); break; } if (s != "") { UIEffectInfoManager.Instance.Add(s); } }
public void OnButtonSkill2_Click() { Controller controller = TouchController.instance.controllerGetSkill; if (!controller.isControl()) { return; } OnSkilClick(); if (controller.actionStat != Controller.ActionStat.Skill && controller.actionStat != Controller.ActionStat.Dead) { if (controller.isConnectedServer()) { ErrorCodeSkill errorSkill = controller.LockedSkill(2); if (errorSkill != ErrorCodeSkill.Success) { HandleErrorCodeSkill(errorSkill); return; } controller.SendSkillCast(controller.role.RoleSkills[2]); } else { controller.SkillHandle = controller.Skill_2_Cast; controller.actionStat = Controller.ActionStat.Skill; controller.curSkillIndexSelect = 2; } } }