actionburnsewself.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. class ActionBurnSewSelfCB : ActionContinuousBaseCB
  2. {
  3. override void CreateActionComponent()
  4. {
  5. m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.SEW_WOUNDS);
  6. }
  7. };
  8. //!DEPRECATED
  9. class ActionBurnSewSelf: ActionContinuousBase
  10. {
  11. void ActionBurnSewSelf()
  12. {
  13. m_CallbackClass = ActionBurnSewSelfCB;
  14. m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_MEDIUM;
  15. m_Text = "#treat_wound";
  16. }
  17. override void CreateConditionComponents()
  18. {
  19. m_ConditionItem = new CCINonRuined;
  20. m_ConditionTarget = new CCTSelf;
  21. }
  22. override bool HasTarget()
  23. {
  24. return false;
  25. }
  26. override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
  27. {
  28. if ( item.GetTemperature() > 80 )
  29. {
  30. return true;
  31. }
  32. else
  33. {
  34. return false;
  35. }
  36. }
  37. override void OnFinishProgressServer( ActionData action_data )
  38. {
  39. const float ITEM_DAMAGE = 5;
  40. const float SHOCK_AMOUNT = 1000;
  41. if (action_data.m_Player.GetBleedingManagerServer() )
  42. {
  43. action_data.m_Player.GetBleedingManagerServer().RemoveMostSignificantBleedingSourceEx(action_data.m_MainItem);
  44. }
  45. //OlD_SHOCK//action_data.m_Player.GetStatShock().Add( action_data.m_Player.GetSoftSkillsManager().SubtractSpecialtyBonus( SHOCK_AMOUNT, this.GetSpecialtyWeight() ) );
  46. action_data.m_MainItem.DecreaseHealth("", "", ITEM_DAMAGE);
  47. }
  48. };