actionplaceonground.c 863 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. class ActionPlaceOnGroundCB : ActionContinuousBaseCB
  2. {
  3. override void CreateActionComponent()
  4. {
  5. m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.DEFAULT_PLACE);
  6. }
  7. };
  8. //!DEPRECATED
  9. class ActionPlaceOnGround: ActionContinuousBase
  10. {
  11. void ActionPlaceOnGround()
  12. {
  13. m_CallbackClass = ActionPlaceOnGroundCB;
  14. m_Text = "#place_object";
  15. }
  16. override void CreateConditionComponents()
  17. {
  18. m_ConditionTarget = new CCTNone;
  19. m_ConditionItem = new CCIDummy;
  20. }
  21. override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
  22. {
  23. if ( player && player.IsAlive() && !item.IsDamageDestroyed() ) //&& IsConscious && IsNotCaptured
  24. {
  25. return true;
  26. }
  27. else
  28. {
  29. return false;
  30. }
  31. }
  32. override void OnFinishProgressServer( ActionData action_data )
  33. {
  34. action_data.m_Player.DropItem(action_data.m_MainItem);
  35. }
  36. };