From 514a66fd6707c02254f90e9722c4db5151361ab0 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Wed, 5 Jan 2011 00:13:00 +0100 Subject: [PATCH] [10963] Rename UNIT_STAND_STATE_SUBMERGED to more generic *_CUSTOM Visual appearance depend on model animation capability. In addition, change stand state for creature at enter combat when creature has custom stand state. Signed-off-by: NoFantasy --- src/game/Unit.cpp | 4 ++++ src/game/Unit.h | 2 +- src/shared/revision_nr.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index f88e72625..5fc674bf3 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7719,6 +7719,10 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) // should probably be removed for the attacked (+ it's party/group) only, not global RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + // client does not handle this state on it's own (reset to default at LoadCreatureAddon) + if (getStandState() == UNIT_STAND_STATE_CUSTOM) + SetStandState(UNIT_STAND_STATE_STAND); + if (((Creature*)this)->AI()) ((Creature*)this)->AI()->EnterCombat(enemy); diff --git a/src/game/Unit.h b/src/game/Unit.h index 370d7c1a0..8a0672f91 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -141,7 +141,7 @@ enum UnitStandStateType UNIT_STAND_STATE_SIT_HIGH_CHAIR = 6, UNIT_STAND_STATE_DEAD = 7, UNIT_STAND_STATE_KNEEL = 8, - UNIT_STAND_STATE_SUBMERGED = 9 + UNIT_STAND_STATE_CUSTOM = 9 // Depends on model animation. Submerge, freeze, hide, hibernate, rest }; // byte flags value (UNIT_FIELD_BYTES_1,2) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index df968baae..a74472f44 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10962" + #define REVISION_NR "10963" #endif // __REVISION_NR_H__