[10797] Check for valid sheath state in creature addon at startup.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-11-30 09:41:59 +01:00
parent a2909f2674
commit afe50cd549
4 changed files with 7 additions and 4 deletions

View file

@ -1857,8 +1857,8 @@ bool Creature::LoadCreatureAddon(bool reload)
// 1 UnitPVPStateFlags Set at Creature::UpdateEntry (SetPvp())
// 2 UnitRename Pet only, so always 0 for default creature
// 3 ShapeshiftForm Must be determined/set by shapeshift spell/aura
if (cainfo->stash != 0)
SetByteValue(UNIT_FIELD_BYTES_2, 0, cainfo->stash);
if (cainfo->sheath_state != 0)
SetByteValue(UNIT_FIELD_BYTES_2, 0, cainfo->sheath_state);
if (cainfo->pvp_state != 0)
SetByteValue(UNIT_FIELD_BYTES_2, 1, cainfo->pvp_state);