mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
feat(Core/Unit): New helpers for DynamicFlags (#11230)
* feat(Core/Unit): New helpers for DynamicFlags
* cherry-pick commit (d611925dc7)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
* oopsie
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -4361,7 +4361,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
RemoveAurasDueToSpell(8326); // SPELL_AURA_GHOST
|
||||
|
||||
if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0))
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_REFER_A_FRIEND);
|
||||
SetDynamicFlag(UNIT_DYNFLAG_REFER_A_FRIEND);
|
||||
|
||||
setDeathState(ALIVE);
|
||||
SetMovement(MOVE_LAND_WALK);
|
||||
@@ -4433,7 +4433,7 @@ void Player::KillPlayer()
|
||||
setDeathState(CORPSE);
|
||||
//SetUnitFlag(UNIT_FLAG_NOT_IN_PVP);
|
||||
|
||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||
ReplaceAllDynamicFlags(UNIT_DYNFLAG_NONE);
|
||||
ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_RELEASE_TIMER, !sMapStore.LookupEntry(GetMapId())->Instanceable() && !HasAuraType(SPELL_AURA_PREVENT_RESURRECTION));
|
||||
|
||||
// 6 minutes until repop at graveyard
|
||||
@@ -7866,7 +7866,7 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
||||
else
|
||||
{
|
||||
// Xinef: Exploit fix
|
||||
if (!creature->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE))
|
||||
if (!creature->HasDynamicFlag(UNIT_DYNFLAG_LOOTABLE))
|
||||
{
|
||||
SendLootError(guid, LOOT_ERROR_DIDNT_KILL);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user