mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +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:
@@ -4854,7 +4854,7 @@ void Spell::EffectSkinning(SpellEffIndex /*effIndex*/)
|
||||
uint32 skill = creature->GetCreatureTemplate()->GetRequiredLootSkill();
|
||||
|
||||
creature->RemoveUnitFlag(UNIT_FLAG_SKINNABLE);
|
||||
creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
creature->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
m_caster->ToPlayer()->SendLoot(creature->GetGUID(), LOOT_SKINNING);
|
||||
|
||||
int32 reqValue = targetLevel < 10 ? 0 : targetLevel < 20 ? (targetLevel - 10) * 10 : targetLevel * 5;
|
||||
@@ -5204,7 +5204,7 @@ void Spell::EffectResurrectPet(SpellEffIndex /*effIndex*/)
|
||||
player->GetClosePoint(x, y, z, pet->GetCombatReach(), PET_FOLLOW_DIST, pet->GetFollowAngle());
|
||||
pet->NearTeleportTo(x, y, z, player->GetOrientation());
|
||||
pet->Relocate(x, y, z, player->GetOrientation()); // This is needed so SaveStayPosition() will get the proper coords.
|
||||
pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||
pet->ReplaceAllDynamicFlags(UNIT_DYNFLAG_NONE);
|
||||
pet->RemoveUnitFlag(UNIT_FLAG_SKINNABLE);
|
||||
pet->setDeathState(ALIVE);
|
||||
pet->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_POSSESSED))); // xinef: just in case
|
||||
|
||||
Reference in New Issue
Block a user