[7905] Implement ACTION_T_SET_SHEATH for creature event ai make possibility set ranged fire state.

Also related cleanup code in field cases and player Player::SetSheath.
This commit is contained in:
VladimirMangos 2009-05-29 01:00:29 +04:00
parent 2fc277fdb6
commit b83f32fc19
10 changed files with 38 additions and 10 deletions

View file

@ -641,6 +641,13 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
if (!sCreatureStorage.LookupEntry<CreatureInfo>(action.update_template.creatureId))
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.update_template.creatureId);
break;
case ACTION_T_SET_SHEATH:
if (action.set_sheath.sheath >= MAX_SHEATH_STATE)
{
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses wrong sheath state %u.", i, j+1, action.set_sheath.sheath);
action.set_sheath.sheath = SHEATH_STATE_UNARMED;
}
break;
case ACTION_T_EVADE: //No Params
case ACTION_T_FLEE_FOR_ASSIST: //No Params
case ACTION_T_DIE: //No Params