Core/Spells: Fixed players getting stuck in shapeshift forms after too quick shifting

This commit is contained in:
Shauren
2011-04-21 21:13:47 +02:00
parent 03852e14e5
commit cb3e6dbce3

View File

@@ -1769,7 +1769,15 @@ class Unit : public WorldObject
uint64 m_ObjectSlot[4];
ShapeshiftForm GetShapeshiftForm() const { return ShapeshiftForm(GetByteValue(UNIT_FIELD_BYTES_2, 3)); }
void SetShapeshiftForm(ShapeshiftForm form) { SetByteValue(UNIT_FIELD_BYTES_2, 3, form); }
void SetShapeshiftForm(ShapeshiftForm form)
{
SetByteValue(UNIT_FIELD_BYTES_2, 3, form);
// force update as too quick shapeshifting and back
// causes the value to stay the same serverside
// causes issues clientside (player gets stuck)
ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2);
}
inline bool IsInFeralForm() const
{