*Update to Mangos 7206.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-31 14:41:36 -06:00
parent d20eaef1d6
commit 4074b481f0
24 changed files with 105 additions and 111 deletions
@@ -351,7 +351,7 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI
//no regen health
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
//to make them lay with face down
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_DEAD);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
uint32 mobId = m_creature->GetEntry();
@@ -392,7 +392,7 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI
//regen health
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
//stand up
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
DoSay(SAY_DOC1,LANG_UNIVERSAL,NULL);
uint32 mobId = m_creature->GetEntry();
@@ -1957,7 +1957,7 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
{
Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true);
Maiev->setDeathState(JUST_DIED);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD);
}
break;
case 21: // Kill ourself.
@@ -118,7 +118,7 @@ bool GossipHello_npc_tirion_fordring(Player *player, Creature *_Creature)
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && player->getStandState() == PLAYER_STATE_SIT )
if (player->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && player->getStandState() == UNIT_STAND_STATE_SIT )
player->ADD_GOSSIP_ITEM( 0, "I am ready to hear your tale, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -229,7 +229,7 @@ struct TRINITY_DLL_DECL npc_secondTrialAI : public ScriptedAI
questPhase = 0;
summonerGuid = 0;
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_KNEEL);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_KNEEL);
m_creature->setFaction(FACTION_FRIENDLY);
spellFlashLight = false;
@@ -268,7 +268,7 @@ struct TRINITY_DLL_DECL npc_secondTrialAI : public ScriptedAI
if ( questPhase == 1 ) {
if ( timer < diff ) {
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
m_creature->setFaction(FACTION_HOSTILE);
questPhase = 0;
@@ -905,7 +905,7 @@ void PretendToDie(Creature* _Creature)
_Creature->SetUInt64Value(UNIT_FIELD_TARGET,0);
_Creature->GetMotionMaster()->Clear();
_Creature->GetMotionMaster()->MoveIdle();
_Creature->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD);
_Creature->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD);
};
void Resurrect(Creature* target)
@@ -125,7 +125,7 @@ struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI
m_creature->DeleteThreatList();
m_creature->CombatStop();
m_creature->setFaction(1080); //friendly
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_SIT);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_SIT);
DoScriptText(LUMP_DEFEAT, m_creature);
bReset = true;
@@ -139,7 +139,7 @@ struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI
m_creature->RemoveAura(SPELL_VISUAL_SLEEP,0);
if (!m_creature->IsStandState())
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
switch(rand()%2)
{
@@ -441,8 +441,8 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI
ardonis->SendUpdateToPlayer(player);
//Set them to kneel
m_creature->SetStandState(PLAYER_STATE_KNEEL);
ardonis->SetStandState(PLAYER_STATE_KNEEL);
m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
ardonis->SetStandState(UNIT_STAND_STATE_KNEEL);
}
//Set them back to each other
@@ -466,8 +466,8 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI
ardonis->SendUpdateToPlayer(player);
//Set state
m_creature->SetStandState(PLAYER_STATE_NONE);
ardonis->SetStandState(PLAYER_STATE_NONE);
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
ardonis->SetStandState(UNIT_STAND_STATE_STAND);
}
}
@@ -133,7 +133,7 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
m_creature->SetVisibility(VISIBILITY_ON);
m_creature->SetStandState(PLAYER_STATE_SLEEP);
m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);
ArcaneBuffetTimer = 8000;
FrostBreathTimer = 15000;
@@ -158,7 +158,7 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
void Aggro(Unit* who)
{
m_creature->SetStandState(PLAYER_STATE_NONE);
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
DoScriptText(SAY_EVIL_AGGRO, m_creature);
GameObject *Door = GameObject::GetGameObject(*m_creature, DoorGUID);
if(Door) Door->SetLootState(GO_ACTIVATED);
@@ -228,12 +228,12 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI
WaitEvent = WE_DUMMY;
return;
case WE_DIE:
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_DEAD);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
WaitTimer = 5000;
WaitEvent = WE_REVIVE;
return;
case WE_REVIVE:
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
m_creature->SetHealth(m_creature->GetMaxHealth());
m_creature->SetSpeed(MOVE_RUN, DefaultMoveSpeedRate);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -238,7 +238,7 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI
m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0);
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MoveIdle();
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD);
if (pInstance->GetData(DATA_KAELTHASEVENT) == 3)
JustDied(pKiller);
@@ -575,7 +575,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//Subphase 2 - Start
case 2:
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[0]));
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == PLAYER_STATE_DEAD))
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
{
DoScriptText(SAY_INTRO_SANGUINAR, m_creature);
@@ -609,7 +609,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//Subphase 3 - Start
case 4:
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[1]));
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == PLAYER_STATE_DEAD))
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
{
DoScriptText(SAY_INTRO_CAPERNIAN, m_creature);
@@ -643,7 +643,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//Subphase 4 - Start
case 6:
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[2]));
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == PLAYER_STATE_DEAD))
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
{
DoScriptText(SAY_INTRO_TELONICUS, m_creature);
@@ -679,7 +679,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//End of phase 1
case 8:
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[3]));
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == PLAYER_STATE_DEAD))
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
{
Phase = 2;
pInstance->SetData(DATA_KAELTHASEVENT, 2);
@@ -1467,7 +1467,7 @@ struct TRINITY_DLL_DECL mob_phoenix_tkAI : public ScriptedAI
if(SummonEgg == 1){ //hack die animation
m_creature->RemoveAllAuras();
DoStartNoMovement(m_creature->getVictim());
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_DEAD);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
SummonEgg = 2;
Cycle_Timer = 1000;
}
@@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI
CanDoQuest = false;
UnkorUnfriendly_Timer = 0;
Pulverize_Timer = 3000;
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
m_creature->setFaction(FACTION_HOSTILE);
}
@@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI
{
DoScriptText(SAY_SUBMIT, m_creature);
m_creature->setFaction(FACTION_FRIENDLY);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_SIT);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_SIT);
m_creature->RemoveAllAuras();
m_creature->DeleteThreatList();
m_creature->CombatStop();
@@ -253,7 +253,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
Summons.DespawnEntry(CREATURE_COLUMN_OF_FIRE);
if(Unit *Temp = Unit::GetUnit(*m_creature, SpiritGUID[3]))
Temp->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD);
Temp->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD);
}
void AttackStart(Unit *who)
@@ -349,7 +349,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
if(Phase > 0)
{
if(Unit *Temp = Unit::GetUnit(*m_creature, SpiritGUID[Phase - 1]))
Temp->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD);
Temp->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD);
}
if(Unit *Temp = Unit::GetUnit(*m_creature, SpiritGUID[NextPhase - 1]))
Temp->CastSpell(m_creature, SPELL_SIPHON_SOUL, false); // should m cast on temp
+2 -2
View File
@@ -969,7 +969,7 @@ void GameObject::Use(Unit* user)
// fallback, will always work
player->TeleportTo(GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation(),TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET);
}
player->SetStandState(PLAYER_STATE_SIT_LOW_CHAIR+info->chair.height);
player->SetStandState(UNIT_STAND_STATE_SIT_LOW_CHAIR+info->chair.height);
return;
}
//big gun, its a spell/aura
@@ -1280,7 +1280,7 @@ void GameObject::Use(Unit* user)
WorldPacket data(SMSG_ENABLE_BARBER_SHOP, 0);
player->GetSession()->SendPacket(&data);
player->SetStandState(PLAYER_STATE_SIT_LOW_CHAIR+info->barberChair.chairheight);
player->SetStandState(UNIT_STAND_STATE_SIT_LOW_CHAIR+info->barberChair.chairheight);
return;
}
default:
+2 -2
View File
@@ -306,7 +306,7 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ )
// not set flags if player can't free move to prevent lost state at logout cancel
if(GetPlayer()->CanFreeMove())
{
GetPlayer()->SetStandState(PLAYER_STATE_SIT);
GetPlayer()->SetStandState(UNIT_STAND_STATE_SIT);
WorldPacket data( SMSG_FORCE_MOVE_ROOT, (8+4) ); // guess size
data.append(GetPlayer()->GetPackGUID());
@@ -346,7 +346,7 @@ void WorldSession::HandleLogoutCancelOpcode( WorldPacket & /*recv_data*/ )
SendPacket( &data );
//! Stand Up
GetPlayer()->SetStandState(PLAYER_STATE_NONE);
GetPlayer()->SetStandState(UNIT_STAND_STATE_STAND);
//! DISABLE_ROTATE
GetPlayer()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
+13 -3
View File
@@ -5859,10 +5859,10 @@ void ObjectMgr::LoadGameobjectInfo()
break;
}
case GAMEOBJECT_TYPE_CHAIR: //7
if(goInfo->chair.height > 2)
if(goInfo->chair.height > (UNIT_STAND_STATE_SIT_HIGH_CHAIR-UNIT_STAND_STATE_SIT_LOW_CHAIR) )
{
sLog.outErrorDb("Gameobject (Entry: %u GoType: %u) have data1=%u but correct chair height in range 0..2.",
id,goInfo->type,goInfo->chair.height);
sLog.outErrorDb("Gameobject (Entry: %u GoType: %u) have data1=%u but correct chair height in range 0..%i.",
id,goInfo->type,goInfo->chair.height,UNIT_STAND_STATE_SIT_HIGH_CHAIR-UNIT_STAND_STATE_SIT_LOW_CHAIR);
// prevent client and server unexpected work
const_cast<GameObjectInfo*>(goInfo)->chair.height = 0;
@@ -5957,6 +5957,16 @@ void ObjectMgr::LoadGameobjectInfo()
}
break;
}
case GAMEOBJECT_TYPE_BARBER_CHAIR: //32
if(goInfo->barberChair.chairheight > (UNIT_STAND_STATE_SIT_HIGH_CHAIR-UNIT_STAND_STATE_SIT_LOW_CHAIR) )
{
sLog.outErrorDb("Gameobject (Entry: %u GoType: %u) have data1=%u but correct chair height in range 0..%i.",
id,goInfo->type,goInfo->barberChair.chairheight,UNIT_STAND_STATE_SIT_HIGH_CHAIR-UNIT_STAND_STATE_SIT_LOW_CHAIR);
// prevent client and server unexpected work
const_cast<GameObjectInfo*>(goInfo)->barberChair.chairheight = 0;
}
break;
}
}
+5 -4
View File
@@ -2487,7 +2487,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
// cleanup player flags (will be re-applied if need at aura load), to avoid have ghost flag without ghost aura, for example.
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK | PLAYER_FLAGS_DND | PLAYER_FLAGS_GM | PLAYER_FLAGS_GHOST);
SetByteValue(UNIT_FIELD_BYTES_1, 2, 0x00); // one form stealth modified bytes
RemoveStandFlags(UNIT_STAND_FLAGS_ALL); // one form stealth modified bytes
RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP | UNIT_BYTE2_FLAG_SANCTUARY);
// restore if need some important flags
@@ -3938,7 +3938,8 @@ void Player::BuildPlayerRepop()
SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, (float)1.0); //see radius of death player?
SetByteValue(UNIT_FIELD_BYTES_1, 3, PLAYER_STATE_FLAG_ALWAYS_STAND);
// set and clear other
SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
}
void Player::SendDelayResponse(const uint32 ml_seconds)
@@ -15888,9 +15889,9 @@ void Player::SaveToDB()
uint32 tmp_displayid = GetDisplayId();
// Set player sit state to standing on save, also stealth and shifted form
SetByteValue(UNIT_FIELD_BYTES_1, 0, 0); // stand state
SetStandState(UNIT_STAND_STATE_STAND); // stand state
RemoveStandFlags(UNIT_STAND_FLAGS_ALL); // stand flags?
SetByteValue(UNIT_FIELD_BYTES_2, 3, 0); // shapeshift
SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); // stand flags?
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
SetDisplayId(GetNativeDisplayId());
-46
View File
@@ -376,52 +376,6 @@ enum DrunkenState
DRUNKEN_SMASHED = 3
};
enum PlayerStateType
{
/*
PLAYER_STATE_DANCE
PLAYER_STATE_SLEEP
PLAYER_STATE_SIT
PLAYER_STATE_STAND
PLAYER_STATE_READYUNARMED
PLAYER_STATE_WORK
PLAYER_STATE_POINT(DNR)
PLAYER_STATE_NONE // not used or just no state, just standing there?
PLAYER_STATE_STUN
PLAYER_STATE_DEAD
PLAYER_STATE_KNEEL
PLAYER_STATE_USESTANDING
PLAYER_STATE_STUN_NOSHEATHE
PLAYER_STATE_USESTANDING_NOSHEATHE
PLAYER_STATE_WORK_NOSHEATHE
PLAYER_STATE_SPELLPRECAST
PLAYER_STATE_READYRIFLE
PLAYER_STATE_WORK_NOSHEATHE_MINING
PLAYER_STATE_WORK_NOSHEATHE_CHOPWOOD
PLAYER_STATE_AT_EASE
PLAYER_STATE_READY1H
PLAYER_STATE_SPELLKNEELSTART
PLAYER_STATE_SUBMERGED
*/
PLAYER_STATE_NONE = 0,
PLAYER_STATE_SIT = 1,
PLAYER_STATE_SIT_CHAIR = 2,
PLAYER_STATE_SLEEP = 3,
PLAYER_STATE_SIT_LOW_CHAIR = 4,
PLAYER_STATE_SIT_MEDIUM_CHAIR = 5,
PLAYER_STATE_SIT_HIGH_CHAIR = 6,
PLAYER_STATE_DEAD = 7,
PLAYER_STATE_KNEEL = 8,
PLAYER_STATE_FORM_ALL = 0x00FF0000,
PLAYER_STATE_FLAG_ALWAYS_STAND = 0x01, // byte 4
PLAYER_STATE_FLAG_CREEP = 0x02000000,
PLAYER_STATE_FLAG_UNTRACKABLE = 0x04000000,
PLAYER_STATE_FLAG_ALL = 0xFF000000,
};
enum PlayerFlags
{
PLAYER_FLAGS_GROUP_LEADER = 0x00000001,
+1
View File
@@ -1993,6 +1993,7 @@ enum CorpseDynFlags
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_5s 6119
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_0s 6123
#define SPELL_ID_AUTOSHOT 75 // used for checks in other spells interruption
#define SPELL_ID_SHADOWMELD 58984 // used for check ignore stealth stance state
enum WeatherType
{
+1 -1
View File
@@ -1033,7 +1033,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
else if(m_customAttr & SPELL_ATTR_CU_AURA_CC)
{
if(!unit->IsStandState())
unit->SetStandState(PLAYER_STATE_NONE);
unit->SetStandState(UNIT_STAND_STATE_STAND);
}
}
}
+8 -6
View File
@@ -831,7 +831,7 @@ void Aura::_AddAura()
{
// Sitdown on apply aura req seated
if (m_spellProto->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED && !m_target->IsSitState())
m_target->SetStandState(PLAYER_STATE_SIT);
m_target->SetStandState(UNIT_STAND_STATE_SIT);
// register aura diminishing on apply
if (getDiminishGroup() != DIMINISHING_NONE )
@@ -3317,7 +3317,8 @@ void Aura::HandleModStealth(bool apply, bool Real)
// only at real aura add
if(Real)
{
m_target->SetByteValue(UNIT_FIELD_BYTES_1, 2, 0x02);
if(GetId()!=SPELL_ID_SHADOWMELD)
m_target->SetStandFlags(UNIT_STAND_FLAGS_CREEP);
if(m_target->GetTypeId()==TYPEID_PLAYER)
m_target->SetFlag(PLAYER_FIELD_BYTES2, 0x2000);
@@ -3338,7 +3339,8 @@ void Aura::HandleModStealth(bool apply, bool Real)
// if last SPELL_AURA_MOD_STEALTH and no GM invisibility
if(!m_target->HasAuraType(SPELL_AURA_MOD_STEALTH) && m_target->GetVisibility()!=VISIBILITY_OFF)
{
m_target->SetByteValue(UNIT_FIELD_BYTES_1, 2, 0x00);
if(GetId()!=SPELL_ID_SHADOWMELD)
m_target->RemoveStandFlags(UNIT_STAND_FLAGS_CREEP);
if(m_target->GetTypeId()==TYPEID_PLAYER)
m_target->RemoveFlag(PLAYER_FIELD_BYTES2, 0x2000);
@@ -5148,9 +5150,9 @@ void Aura::HandleAuraEmpathy(bool apply, bool Real)
void Aura::HandleAuraUntrackable(bool apply, bool Real)
{
if(apply)
m_target->SetFlag(UNIT_FIELD_BYTES_1, PLAYER_STATE_FLAG_UNTRACKABLE);
m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE);
else
m_target->RemoveFlag(UNIT_FIELD_BYTES_1, PLAYER_STATE_FLAG_UNTRACKABLE);
m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE);
}
void Aura::HandleAuraModPacify(bool apply, bool Real)
@@ -5320,7 +5322,7 @@ void Aura::HandleSpiritOfRedemption( bool apply, bool Real )
// set stand state (expected in this form)
if(!m_target->IsStandState())
m_target->SetStandState(PLAYER_STATE_NONE);
m_target->SetStandState(UNIT_STAND_STATE_STAND);
}
m_target->SetHealth(1);
+6 -5
View File
@@ -9064,7 +9064,7 @@ void Unit::SetInCombatWith(Unit* enemy)
void Unit::CombatStart(Unit* target)
{
if(!target->IsStandState()/* && !target->hasUnitState(UNIT_STAT_STUNNED)*/)
target->SetStandState(PLAYER_STATE_NONE);
target->SetStandState(UNIT_STAND_STATE_STAND);
if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER
&& !((Creature*)target)->HasReactState(REACT_PASSIVE) && ((Creature*)target)->AI())
@@ -11214,15 +11214,16 @@ void Unit::SetConfused(bool apply, uint64 casterGUID, uint32 spellID)
bool Unit::IsSitState() const
{
uint8 s = getStandState();
return s == PLAYER_STATE_SIT_CHAIR || s == PLAYER_STATE_SIT_LOW_CHAIR ||
s == PLAYER_STATE_SIT_MEDIUM_CHAIR || s == PLAYER_STATE_SIT_HIGH_CHAIR ||
s == PLAYER_STATE_SIT;
return
s == UNIT_STAND_STATE_SIT_CHAIR || s == UNIT_STAND_STATE_SIT_LOW_CHAIR ||
s == UNIT_STAND_STATE_SIT_MEDIUM_CHAIR || s == UNIT_STAND_STATE_SIT_HIGH_CHAIR ||
s == UNIT_STAND_STATE_SIT;
}
bool Unit::IsStandState() const
{
uint8 s = getStandState();
return !IsSitState() && s != PLAYER_STATE_SLEEP && s != PLAYER_STATE_KNEEL;
return !IsSitState() && s != UNIT_STAND_STATE_SLEEP && s != UNIT_STAND_STATE_KNEEL;
}
void Unit::SetStandState(uint8 state)
+32
View File
@@ -130,6 +130,35 @@ enum SpellFacingFlags
#define BASE_MAXDAMAGE 2.0f
#define BASE_ATTACK_TIME 2000
// byte value (UNIT_FIELD_BYTES_1,0)
enum UnitStandStateType
{
UNIT_STAND_STATE_STAND = 0,
UNIT_STAND_STATE_SIT = 1,
UNIT_STAND_STATE_SIT_CHAIR = 2,
UNIT_STAND_STATE_SLEEP = 3,
UNIT_STAND_STATE_SIT_LOW_CHAIR = 4,
UNIT_STAND_STATE_SIT_MEDIUM_CHAIR = 5,
UNIT_STAND_STATE_SIT_HIGH_CHAIR = 6,
UNIT_STAND_STATE_DEAD = 7,
UNIT_STAND_STATE_KNEEL = 8
};
// byte flag value (UNIT_FIELD_BYTES_1,2)
enum UnitStandFlags
{
UNIT_STAND_FLAGS_CREEP = 0x02,
UNIT_STAND_FLAGS_ALL = 0xFF
};
// byte flags value (UNIT_FIELD_BYTES_1,3)
enum UnitBytes1_Flags
{
UNIT_BYTE1_FLAG_ALWAYS_STAND = 0x01,
UNIT_BYTE1_FLAG_UNTRACKABLE = 0x04,
UNIT_BYTE1_FLAG_ALL = 0xFF
};
// high byte (3 from 0..3) of UNIT_FIELD_BYTES_2
enum ShapeshiftForm
{
@@ -937,6 +966,9 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
bool IsStandState() const;
void SetStandState(uint8 state);
void SetStandFlags(uint8 flags) { SetByteFlag(UNIT_FIELD_BYTES_1, 2,flags); }
void RemoveStandFlags(uint8 flags) { RemoveByteFlag(UNIT_FIELD_BYTES_1, 2,flags); }
bool IsMounted() const { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT ); }
uint32 GetMountID() const { return GetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID); }
void Mount(uint32 mount);
-7
View File
@@ -1,7 +0,0 @@
#ifndef __REVISION_H__
#define __REVISION_H__
#define _REVISION "1132"
#define _HASH "6db5380ccaad"
#define _REVISION_DATE "*"
#define _REVISION_TIME "*"
#endif // __REVISION_H__
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7205"
#define REVISION_NR "7206"
#endif // __REVISION_NR_H__