aboutsummaryrefslogtreecommitdiff
path: root/src/game/CombatHandler.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/CombatHandler.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/CombatHandler.cpp')
-rw-r--r--src/game/CombatHandler.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/CombatHandler.cpp b/src/game/CombatHandler.cpp
index f732f128fd0..b49f573a5e4 100644
--- a/src/game/CombatHandler.cpp
+++ b/src/game/CombatHandler.cpp
@@ -75,7 +75,13 @@ void WorldSession::HandleSetSheathedOpcode( WorldPacket & recv_data )
//sLog.outDebug( "WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed );
- GetPlayer()->SetSheath(sheathed);
+ if(sheathed >= MAX_SHEATH_STATE)
+ {
+ sLog.outError("Unknown sheath state %u ??",sheathed);
+ return;
+ }
+
+ GetPlayer()->SetSheath(SheathState(sheathed));
}
void WorldSession::SendAttackStop(Unit const* enemy)