aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureEventAIMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-28 18:43:57 -0500
committermegamage <none@none>2009-05-28 18:43:57 -0500
commit1288761fb704be6d3c24e8480a809f66200ddf04 (patch)
tree22c38f099195d31b39989a5e86e180cf233961bf /src/game/CreatureEventAIMgr.cpp
parent451471d438e234698a91f15d63b17df3ec3327f4 (diff)
[7905] Implement ACTION_T_SET_SHEATH for creature event ai make possibility set ranged fire state. Author: VladimirMangos
Also related cleanup code in field cases and player Player::SetSheath. --HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureEventAIMgr.cpp')
-rw-r--r--src/game/CreatureEventAIMgr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp
index 1905fa72d41..af79ae5189c 100644
--- a/src/game/CreatureEventAIMgr.cpp
+++ b/src/game/CreatureEventAIMgr.cpp
@@ -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