Core: use UNIT_DYNFLAG_NONE instead of 0-value. Also fixed typo in reset UNIT_DYNAMIC_FLAGS at player death
Signed-off-by: click <[email protected]>
This commit is contained in:
@@ -465,7 +465,7 @@ void Pet::setDeathState(DeathState s) // overwrite virtual
|
|||||||
if (getPetType() == HUNTER_PET)
|
if (getPetType() == HUNTER_PET)
|
||||||
{
|
{
|
||||||
// pet corpse non lootable and non skinnable
|
// pet corpse non lootable and non skinnable
|
||||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0x00);
|
SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||||
|
|
||||||
//lose happiness when died and not in BG/Arena
|
//lose happiness when died and not in BG/Arena
|
||||||
|
|||||||
@@ -5159,7 +5159,7 @@ void Player::KillPlayer()
|
|||||||
setDeathState(CORPSE);
|
setDeathState(CORPSE);
|
||||||
//SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_IN_PVP);
|
//SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_IN_PVP);
|
||||||
|
|
||||||
SetFlag(UNIT_DYNAMIC_FLAGS, 0x00);
|
SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||||
ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_RELEASE_TIMER, !sMapStore.LookupEntry(GetMapId())->Instanceable());
|
ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_RELEASE_TIMER, !sMapStore.LookupEntry(GetMapId())->Instanceable());
|
||||||
|
|
||||||
// 6 minutes until repop at graveyard
|
// 6 minutes until repop at graveyard
|
||||||
|
|||||||
@@ -6187,7 +6187,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
|
|||||||
_player->GetPosition(x, y, z);
|
_player->GetPosition(x, y, z);
|
||||||
_player->GetMap()->CreatureRelocation(pet, x, y, z, _player->GetOrientation());
|
_player->GetMap()->CreatureRelocation(pet, x, y, z, _player->GetOrientation());
|
||||||
|
|
||||||
pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
|
pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||||
pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||||
pet->setDeathState(ALIVE);
|
pet->setDeathState(ALIVE);
|
||||||
pet->ClearUnitState(uint32(UNIT_STAT_ALL_STATE));
|
pet->ClearUnitState(uint32(UNIT_STAT_ALL_STATE));
|
||||||
|
|||||||
Reference in New Issue
Block a user