meleeattack.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. class MeleeAttackSoundEvents extends PlayerSoundEventBase
  2. {
  3. void MeleeAttackSoundEvents()
  4. {
  5. m_Type = EPlayerSoundEventType.MELEE;
  6. m_HasPriorityOverTypes = -1;
  7. }
  8. override bool CanPlay(PlayerBase player)
  9. {
  10. return true;
  11. }
  12. override bool HasPriorityOverCurrent(PlayerBase player, EPlayerSoundEventID other_state_id, EPlayerSoundEventType type_other)
  13. {
  14. if( type_other == EPlayerSoundEventType.DAMAGE )
  15. {
  16. return false;
  17. }
  18. return true;
  19. }
  20. override void OnEnd()
  21. {
  22. super.OnEnd();
  23. if(m_Player)
  24. StaminaSoundHandlerClient.Cast(m_Player.m_PlayerSoundManagerClient.GetHandler(eSoundHandlers.STAMINA)).PostponeStamina(800);
  25. }
  26. }
  27. class MeleeAttackLightEvent extends MeleeAttackSoundEvents
  28. {
  29. void MeleeAttackLightEvent()
  30. {
  31. m_ID = EPlayerSoundEventID.MELEE_ATTACK_LIGHT;
  32. m_SoundVoiceAnimEventClassID = 16;
  33. }
  34. }
  35. class MeleeAttackHeavyEvent extends MeleeAttackSoundEvents
  36. {
  37. void MeleeAttackHeavyEvent()
  38. {
  39. m_ID = EPlayerSoundEventID.MELEE_ATTACK_HEAVY;
  40. m_SoundVoiceAnimEventClassID = 17;
  41. }
  42. }