mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[8233] Implement new EventAI action ACTION_T_SET_INVINCEABILITY_HP_LEVEL.
Action set min. health value that can be set for creature in result damage apply. It can be used in duel like events with creatures to prevent killing creature and other cases when creature must avoid damage at some health level while it used.
This commit is contained in:
parent
6c395cf79c
commit
dce0941511
5 changed files with 54 additions and 6 deletions
|
|
@ -661,6 +661,16 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
|||
action.set_sheath.sheath = SHEATH_STATE_UNARMED;
|
||||
}
|
||||
break;
|
||||
case ACTION_T_SET_INVINCEABILITY_HP_LEVEL:
|
||||
if(action.invinceability_hp_level.is_percent)
|
||||
{
|
||||
if(action.invinceability_hp_level.hp_level > 100)
|
||||
{
|
||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses wrong percent value %u.", i, j+1, action.invinceability_hp_level.hp_level);
|
||||
action.invinceability_hp_level.hp_level = 100;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ACTION_T_EVADE: //No Params
|
||||
case ACTION_T_FLEE_FOR_ASSIST: //No Params
|
||||
case ACTION_T_DIE: //No Params
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue