actionburnsewtarget.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. class ActionBurnSewTargetCB : ActionContinuousBaseCB
  2. {
  3. override void CreateActionComponent()
  4. {
  5. m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.SEW_WOUNDS);
  6. }
  7. };
  8. //!DEPRECATED
  9. class ActionBurnSewTarget: ActionContinuousBase
  10. {
  11. void ActionBurnSewTarget()
  12. {
  13. m_CallbackClass = ActionBurnSewTargetCB;
  14. m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_MEDIUM;
  15. m_Text = "#treat_persons_wound";
  16. }
  17. override void CreateConditionComponents()
  18. {
  19. m_ConditionItem = new CCINonRuined;
  20. m_ConditionTarget = new CCTMan(UAMaxDistances.DEFAULT);
  21. }
  22. override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
  23. {
  24. if ( item.GetTemperature() > 80 )
  25. {
  26. return true;
  27. }
  28. else
  29. {
  30. return false;
  31. }
  32. }
  33. override void OnFinishProgressServer( ActionData action_data )
  34. {
  35. PlayerBase ntarget = PlayerBase.Cast(action_data.m_Target.GetObject());
  36. if (CanReceiveAction(action_data.m_Target))
  37. {
  38. if (ntarget.GetBleedingManagerServer() )
  39. {
  40. ntarget.GetBleedingManagerServer().RemoveMostSignificantBleedingSourceEx(action_data.m_MainItem);
  41. }
  42. //OlD_SHOCK//ntarget.GetStatShock().Add(1000);
  43. action_data.m_MainItem.DecreaseHealth ( "", "", 5 );
  44. }
  45. }
  46. };