|
|
|
|
# /*
|
|
|
|
|
# * BJ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż<EFBFBD> -- Pro.WidgetLift
|
|
|
|
|
# *
|
|
|
|
|
# * By actboy168
|
|
|
|
|
# *
|
|
|
|
|
# */
|
|
|
|
|
#
|
|
|
|
|
#ifndef INCLUDE_BJ_OPTIMIZATION_PRO_WIDGET_LIFT_H
|
|
|
|
|
#define INCLUDE_BJ_OPTIMIZATION_PRO_WIDGET_LIFT_H
|
|
|
|
|
#
|
|
|
|
|
# /*
|
|
|
|
|
# * 1.GetUnitState(unit, UNIT_STATE_LIFE) <EFBFBD>滻Ϊ GetWidgetLife(unit)
|
|
|
|
|
# * 2.<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϸ<EFBFBD><EFBFBD>ø<EFBFBD>Ϊ<EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
# */
|
|
|
|
|
#
|
|
|
|
|
# undef GetUnitStateSwap
|
|
|
|
|
# define GetUnitStateSwap(state, unit) \
|
|
|
|
|
YDTRIGGER_COMMON_SWITCH(GET_UNIT_STATE_SWAP_## state, ( \
|
|
|
|
|
GetWidgetLife(unit), \
|
|
|
|
|
GetUnitState(unit, UNIT_STATE_MAX_LIFE), \
|
|
|
|
|
GetUnitState(unit, UNIT_STATE_MANA), \
|
|
|
|
|
GetUnitState(unit, UNIT_STATE_MAX_MANA), \
|
|
|
|
|
))
|
|
|
|
|
#
|
|
|
|
|
# define GET_UNIT_STATE_SWAP_UNIT_STATE_LIFE 0
|
|
|
|
|
# define GET_UNIT_STATE_SWAP_UNIT_STATE_MAX_LIFE 1
|
|
|
|
|
# define GET_UNIT_STATE_SWAP_UNIT_STATE_MANA 2
|
|
|
|
|
# define GET_UNIT_STATE_SWAP_UNIT_STATE_MAX_MANA 3
|
|
|
|
|
#
|
|
|
|
|
# undef SetUnitLifeBJ
|
|
|
|
|
# define SetUnitLifeBJ(unit, value) SetWidgetLife(unit, RMaxBJ(0, value))
|
|
|
|
|
#
|
|
|
|
|
# undef IsUnitDeadBJ
|
|
|
|
|
# define IsUnitDeadBJ(unit) (GetWidgetLife(unit) <= 0.405)
|
|
|
|
|
#
|
|
|
|
|
# undef IsUnitAliveBJ
|
|
|
|
|
# define IsUnitAliveBJ(unit) (GetWidgetLife(unit) > 0.405)
|
|
|
|
|
#
|
|
|
|
|
# undef IsDestructableDeadBJ
|
|
|
|
|
# define IsDestructableDeadBJ(d) (GetDestructableLife(d) <= 0.405)
|
|
|
|
|
#
|
|
|
|
|
# undef IsDestructableAliveBJ
|
|
|
|
|
# define IsDestructableAliveBJ(d) (GetDestructableLife(d) > 0.405)
|
|
|
|
|
#
|
|
|
|
|
#endif
|