mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Cleanup code for UNIT_FIELD_BYTES_1 parts.
Move defines to Unit (values can be used with creatures) Better gameobject barber chairs check at loading.
This commit is contained in:
parent
af888cda40
commit
a1b5c3cb02
10 changed files with 75 additions and 76 deletions
|
|
@ -412,7 +412,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
RemoveSpellsCausingAura(SPELL_AURA_MOD_INVISIBILITY);
|
||||
|
||||
if(pVictim->GetTypeId() == TYPEID_PLAYER && !pVictim->IsStandState() && !pVictim->hasUnitState(UNIT_STAT_STUNNED))
|
||||
pVictim->SetStandState(PLAYER_STATE_NONE);
|
||||
pVictim->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
|
||||
//Script Event damage Deal
|
||||
|
|
@ -10756,15 +10756,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue