feat: 스킬별 행동 제한 정책 추가
- SkillData에 시전 중 이동, 점프, 추가 스킬 사용 제한 옵션을 추가 - PlayerActionState가 현재 스킬 정책을 읽어 행동 가능 여부를 계산하도록 변경 - 스킬 입력이 공통 행동 판정 규칙을 따르도록 정리
This commit is contained in:
@@ -123,6 +123,8 @@ namespace Colosseum.Player
|
||||
if (slotIndex < 0 || slotIndex >= skillSlots.Length)
|
||||
return;
|
||||
|
||||
bool isEvadeSlot = slotIndex == skillSlots.Length - 1;
|
||||
|
||||
SkillData skill = skillSlots[slotIndex];
|
||||
if (skill == null)
|
||||
{
|
||||
@@ -131,8 +133,14 @@ namespace Colosseum.Player
|
||||
}
|
||||
|
||||
// 사망 상태 체크
|
||||
if (actionState != null && !actionState.CanUseSkills)
|
||||
return;
|
||||
if (actionState != null)
|
||||
{
|
||||
if (isEvadeSlot && !actionState.CanEvade)
|
||||
return;
|
||||
|
||||
if (!isEvadeSlot && !actionState.CanUseSkills)
|
||||
return;
|
||||
}
|
||||
|
||||
// 로컬 체크 (빠른 피드백용)
|
||||
if (skillController.IsExecutingSkill)
|
||||
@@ -168,13 +176,21 @@ namespace Colosseum.Player
|
||||
if (slotIndex < 0 || slotIndex >= skillSlots.Length)
|
||||
return;
|
||||
|
||||
bool isEvadeSlot = slotIndex == skillSlots.Length - 1;
|
||||
|
||||
SkillData skill = skillSlots[slotIndex];
|
||||
if (skill == null) return;
|
||||
|
||||
// 서버에서 다시 검증
|
||||
// 사망 상태 체크
|
||||
if (actionState != null && !actionState.CanUseSkills)
|
||||
return;
|
||||
if (actionState != null)
|
||||
{
|
||||
if (isEvadeSlot && !actionState.CanEvade)
|
||||
return;
|
||||
|
||||
if (!isEvadeSlot && !actionState.CanUseSkills)
|
||||
return;
|
||||
}
|
||||
|
||||
if (skillController.IsExecutingSkill || skillController.IsOnCooldown(skill))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user