Core/Units: Partial implementation of SMSG_MOVE_SET_COLLISION_HGT - send proper character collision height on dismount.

Fixes #2642

NOTE: Still have to properly implement collision height calculation for mounting up.
This commit is contained in:
Machiavelli
2011-11-21 22:54:25 +01:00
parent 7c8f4358ea
commit a14cbcaa3e
6 changed files with 51 additions and 2 deletions
+14
View File
@@ -2493,6 +2493,20 @@ class Player : public Unit, public GridObject<Player>
void AddWhisperWhiteList(uint64 guid) { WhisperList.push_back(guid); }
bool IsInWhisperWhiteList(uint64 guid);
//! Return collision height sent to client
//! we currently only send this on dismount
float GetCollisionHeight()
{
CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId());
ASSERT(displayInfo);
CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(displayInfo->ModelId);
ASSERT(modelData);
return modelData->CollisionHeight;
//! TODO: Need a proper calculation for collision height when mounted
}
protected:
// Gamemaster whisper whitelist
WhisperListContainer WhisperList;