diff options
Diffstat (limited to 'src/game/CombatHandler.cpp')
-rw-r--r-- | src/game/CombatHandler.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/game/CombatHandler.cpp b/src/game/CombatHandler.cpp index f9fb4fd7ee0..b49f573a5e4 100644 --- a/src/game/CombatHandler.cpp +++ b/src/game/CombatHandler.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,6 @@ #include "Log.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "World.h" #include "ObjectAccessor.h" #include "CreatureAI.h" #include "ObjectDefines.h" @@ -76,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) |