Skip to content

Commit

Permalink
Fix confusing naming of unit states.
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb committed Jan 17, 2025
1 parent 3fe5e23 commit 7ce75e8
Show file tree
Hide file tree
Showing 87 changed files with 475 additions and 475 deletions.
6 changes: 3 additions & 3 deletions src/game/AI/CreatureAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ void CreatureAI::SetMeleeAttack(bool enabled)
{
if (enabled)
{
m_creature->AddUnitState(UNIT_STAT_MELEE_ATTACKING);
m_creature->AddUnitState(UNIT_STATE_MELEE_ATTACKING);
m_creature->SendMeleeAttackStart(pVictim);
}
else
{
m_creature->ClearUnitState(UNIT_STAT_MELEE_ATTACKING);
m_creature->ClearUnitState(UNIT_STATE_MELEE_ATTACKING);
m_creature->SendMeleeAttackStop(pVictim);
}
}
Expand Down Expand Up @@ -347,7 +347,7 @@ void CreatureAI::OnMoveInStealth(Unit* who)
bool CreatureAI::CanTriggerAlert(Unit const* who)
{
// If this unit isn't an NPC, is already distracted, is in combat, is confused, stunned or fleeing, do nothing
if (m_creature->GetTypeId() != TYPEID_UNIT || m_creature->IsInCombat() || m_creature->HasUnitState(UNIT_STAT_NO_FREE_MOVE))
if (m_creature->GetTypeId() != TYPEID_UNIT || m_creature->IsInCombat() || m_creature->HasUnitState(UNIT_STATE_NO_FREE_MOVE))
return false;

// Only alert for hostiles!
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/CreatureEventAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, SpellCaster*
}
case EVENT_T_VICTIM_ROOTED:
{
if (!m_creature->GetVictim() || !m_creature->GetVictim()->HasUnitState(UNIT_STAT_ROOT))
if (!m_creature->GetVictim() || !m_creature->GetVictim()->HasUnitState(UNIT_STATE_ROOT))
return false;

pHolder.UpdateRepeatTimer(m_creature, event.victim_rooted.repeatMin, event.victim_rooted.repeatMax);
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/NullCreatureAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NullCreatureAI::NullCreatureAI(Creature* c) : CreatureAI(c)
{
c->AddUnitState(UNIT_STAT_NO_SEARCH_FOR_OTHERS);
c->AddUnitState(UNIT_STATE_NO_SEARCH_FOR_OTHERS);
m_bMeleeAttack = false;
m_bCombatMovement = false;
}
Expand Down
10 changes: 5 additions & 5 deletions src/game/AI/PetAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void PetAI::MoveInLineOfSight(Unit* pWho)

void PetAI::UpdateAI(uint32 const diff)
{
if (!m_creature->IsAlive() || !m_creature->GetCharmInfo() || m_creature->HasUnitState(UNIT_STAT_CAN_NOT_REACT))
if (!m_creature->IsAlive() || !m_creature->GetCharmInfo() || m_creature->HasUnitState(UNIT_STATE_CAN_NOT_REACT))
return;

// part of it must run during eyes of the Beast to update melee hits
Expand Down Expand Up @@ -184,7 +184,7 @@ void PetAI::UpdateAI(uint32 const diff)
return;

// Creature could have died upon attacking (thorns aura for example), and lost charm aura. Abort.
if (!m_creature->IsAlive() || !m_creature->GetCharmInfo() || m_creature->HasUnitState(UNIT_STAT_CAN_NOT_REACT))
if (!m_creature->IsAlive() || !m_creature->GetCharmInfo() || m_creature->HasUnitState(UNIT_STATE_CAN_NOT_REACT))
return;

// Autocast (casted only in combat or persistent spells in any state)
Expand Down Expand Up @@ -459,7 +459,7 @@ void PetAI::OwnerAttackedBy(Unit* attacker)
return;

// In crowd control
if (m_creature->HasUnitState(UNIT_STAT_CAN_NOT_REACT))
if (m_creature->HasUnitState(UNIT_STATE_CAN_NOT_REACT))
return;

// Prevent pet from disengaging from current target
Expand Down Expand Up @@ -493,7 +493,7 @@ void PetAI::OwnerAttacked(Unit* target)
return;

// In crowd control
if (m_creature->HasUnitState(UNIT_STAT_CAN_NOT_REACT))
if (m_creature->HasUnitState(UNIT_STATE_CAN_NOT_REACT))
return;

// Prevent pet from disengaging from current target
Expand Down Expand Up @@ -649,7 +649,7 @@ void PetAI::DoAttack(Unit* target, bool chase)
// Make sure creature owner enters combat too
if (Creature* pOwner = ToCreature(m_creature->GetCharmerOrOwner()))
{
if (pOwner->IsAlive() && !pOwner->HasUnitState(UNIT_STAT_CAN_NOT_REACT) &&
if (pOwner->IsAlive() && !pOwner->HasUnitState(UNIT_STATE_CAN_NOT_REACT) &&
pOwner->IsValidAttackTarget(target, false))
pOwner->EnterCombatWithTarget(target);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/PetEventAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void PetEventAI::UpdateAI(uint32 const uiDiff)
if (m_creature->IsInCombat() && !(hasAliveOwner && pOwner->IsInCombat()))
m_creature->OnLeaveCombat();

if (hasAliveOwner && m_creature->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW) && !m_creature->HasUnitState(UNIT_STAT_FOLLOW))
if (hasAliveOwner && m_creature->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW) && !m_creature->HasUnitState(UNIT_STATE_FOLLOW))
{
m_creature->GetMotionMaster()->MoveFollow(m_creature->GetCharmerOrOwner(), PET_FOLLOW_DIST,
m_creature->IsPet() ? static_cast<Pet*>(m_creature)->GetFollowAngle() : PET_FOLLOW_ANGLE);
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/PlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bool PlayerAI::CanCastSpell(Unit* pTarget, SpellEntry const* pSpell, bool isTrig
if (!isTriggered)
{
// State does not allow
if (me->HasUnitState(checkControlled ? UNIT_STAT_CAN_NOT_REACT_OR_LOST_CONTROL : UNIT_STAT_CAN_NOT_REACT))
if (me->HasUnitState(checkControlled ? UNIT_STATE_CAN_NOT_REACT_OR_LOST_CONTROL : UNIT_STATE_CAN_NOT_REACT))
return false;

if (pSpell->PreventionType == SPELL_PREVENTION_TYPE_SILENCE && me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/ScriptedEscortAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* pWho)
if (!m_creature->CanAssistPlayers())
return false;

if (m_creature->HasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FEIGN_DEATH))
if (m_creature->HasUnitState(UNIT_STATE_STUNNED | UNIT_STATE_FEIGN_DEATH))
return false;

//not a player
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/ScriptedFollowerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* pWho)
if (!m_creature->CanAssistPlayers())
return false;

if (m_creature->HasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FEIGN_DEATH))
if (m_creature->HasUnitState(UNIT_STATE_STUNNED | UNIT_STATE_FEIGN_DEATH))
return false;

//not a player
Expand Down
4 changes: 2 additions & 2 deletions src/game/AI/ScriptedPetAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ void ScriptedPetAI::UpdateAI(uint32 const uiDiff)
}
}
// If we are out of the FOR it means no valid targets, so follow master.
if (!m_creature->HasUnitState(UNIT_STAT_FOLLOW))
if (!m_creature->HasUnitState(UNIT_STATE_FOLLOW))
m_creature->GetMotionMaster()->MoveFollow(pOwner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
}
}
}
else if (m_creature->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
{
// not following, so start follow
if (!m_creature->HasUnitState(UNIT_STAT_FOLLOW))
if (!m_creature->HasUnitState(UNIT_STATE_FOLLOW))
m_creature->GetMotionMaster()->MoveFollow(pOwner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);

// update when not in combat
Expand Down
6 changes: 3 additions & 3 deletions src/game/AI/TotemAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int TotemAI::Permissible(Creature const* creature)

TotemAI::TotemAI(Creature* pCreature) : CreatureAI(pCreature)
{
pCreature->AddUnitState(UNIT_STAT_NO_SEARCH_FOR_OTHERS);
pCreature->AddUnitState(UNIT_STATE_NO_SEARCH_FOR_OTHERS);

if (Totem const* pTotem = pCreature->ToTotem())
{
Expand All @@ -65,8 +65,8 @@ TotemAI::TotemAI(Creature* pCreature) : CreatureAI(pCreature)

void TotemAI::UpdateAI(uint32 const /*diff*/)
{
if (!m_creature->HasUnitState(UNIT_STAT_ROOT))
m_creature->AddUnitState(UNIT_STAT_ROOT);
if (!m_creature->HasUnitState(UNIT_STATE_ROOT))
m_creature->AddUnitState(UNIT_STATE_ROOT);

if (m_totemType != TOTEM_ACTIVE)
return;
Expand Down
2 changes: 1 addition & 1 deletion src/game/Anticheat/MovementAnticheat/MovementAnticheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ uint32 MovementAnticheat::HandleFlagTests(Player* pPlayer, MovementInfo& movemen
if ((currentMoveFlags & MOVEFLAG_ROOT) &&
!(GetLastMovementInfo().moveFlags & MOVEFLAG_ROOT) &&
!me->HasPendingMovementChange(ROOT) &&
!me->HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_PENDING_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_PENDING_STUNNED | UNIT_STAT_ROOT_ON_LANDING) &&
!me->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_PENDING_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_PENDING_STUNNED | UNIT_STATE_ROOT_ON_LANDING) &&
(opcode != CMSG_FORCE_MOVE_ROOT_ACK))
{
APPEND_CHEAT(CHEAT_TYPE_SELF_ROOT);
Expand Down
4 changes: 2 additions & 2 deletions src/game/Commands/DebugCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2339,13 +2339,13 @@ bool ChatHandler::HandleUnitStatCommand(char *args)
if (!pTarget)
return false;
uint32 unitStat = 0x0;
for (int i = 1; i < UNIT_STAT_IGNORE_PATHFINDING; i *= 2)
for (int i = 1; i < UNIT_STATE_IGNORE_PATHFINDING; i *= 2)
if (pTarget->HasUnitState(i))
unitStat |= i;
PSendSysMessage("UnitState = 0x%x (%u)", unitStat, unitStat);
if (ExtractUInt32(&args, unitStat))
{
pTarget->ClearUnitState(UNIT_STAT_ALL_STATE);
pTarget->ClearUnitState(UNIT_STATE_ALL_STATE);
pTarget->AddUnitState(unitStat);
PSendSysMessage("UnitState changed to 0x%x (%u)", unitStat, unitStat);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/Formulas.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace MaNGOS
(pCreature->GetCreatureInfo()->health_multiplier <= 0.1f)))
return 0;

if (pCreature->HasUnitState(UNIT_STAT_NO_KILL_REWARD))
if (pCreature->HasUnitState(UNIT_STATE_NO_KILL_REWARD))
return 0;

if (pCreature->HasStaticFlag(CREATURE_STATIC_FLAG_NO_XP))
Expand Down
14 changes: 7 additions & 7 deletions src/game/Handlers/AuctionHouseHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket& recv_data)
}

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

SendAuctionHello(unit);
Expand Down Expand Up @@ -318,7 +318,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recv_data)
}

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

if (!itemGuid)
Expand Down Expand Up @@ -468,7 +468,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recv_data)
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(auctionHouseEntry);

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
Expand Down Expand Up @@ -610,7 +610,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recv_data)
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(auctionHouseEntry);

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
Expand Down Expand Up @@ -764,7 +764,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket& recv_data)
return;

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

AuctionHouseClientQueryTask task(AUCTION_QUERY_LIST_BIDDER);
Expand Down Expand Up @@ -800,7 +800,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recv_data)
return;

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

AuctionHouseClientQueryTask task(AUCTION_QUERY_LIST_OWNER);
Expand Down Expand Up @@ -837,7 +837,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recv_data)
task.auctionHouse = sAuctionMgr.GetAuctionsMap(auctionHouseEntry);

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

//sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "Auctionhouse search %s list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
Expand Down
2 changes: 1 addition & 1 deletion src/game/Handlers/CharacterHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)

sLog.Player(this, LOG_CHAR, "Login", LOG_LVL_DETAIL, alreadyOnline ? "Player was already online" : "");

if (!alreadyOnline && !pCurrChar->IsStandingUp() && !pCurrChar->HasUnitState(UNIT_STAT_STUNNED))
if (!alreadyOnline && !pCurrChar->IsStandingUp() && !pCurrChar->HasUnitState(UNIT_STATE_STUNNED))
pCurrChar->SetStandState(UNIT_STAND_STATE_STAND);

m_playerLoading = false;
Expand Down
2 changes: 1 addition & 1 deletion src/game/Handlers/GuildHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
}

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId());
Expand Down
6 changes: 3 additions & 3 deletions src/game/Handlers/ItemHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recv_data)
}

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

Item *pItem = _player->GetItemByGuid(itemGuid);
Expand Down Expand Up @@ -665,7 +665,7 @@ void WorldSession::HandleBuybackItem(WorldPacket& recv_data)
}

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

Item *pItem = _player->GetItemFromBuyBackSlot(slot);
Expand Down Expand Up @@ -765,7 +765,7 @@ void WorldSession::SendListInventory(ObjectGuid vendorguid, uint8 menu_type)
}

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

// Stop the npc if moving
Expand Down
2 changes: 1 addition & 1 deletion src/game/Handlers/LootHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void WorldSession::HandleLootOpcode(WorldPacket& recv_data)
return;
}

if (_player->HasUnitState(UNIT_STAT_STUNNED))
if (_player->HasUnitState(UNIT_STATE_STUNNED))
{
_player->SendLootError(guid, LOOT_ERROR_STUNNED);
return;
Expand Down
12 changes: 6 additions & 6 deletions src/game/Handlers/MovementHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,15 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
// this is here to accommodate 1.14 client behavior
// it does not interrupt falling when rooted
// verify that root is applied after having landed
if (pMover->HasUnitState(UNIT_STAT_ROOT_ON_LANDING))
if (pMover->HasUnitState(UNIT_STATE_ROOT_ON_LANDING))
{
if (movementInfo.HasMovementFlag(MOVEFLAG_ROOT) || !pMover->ShouldBeRooted())
pMover->ClearUnitState(UNIT_STAT_ROOT_ON_LANDING);
pMover->ClearUnitState(UNIT_STATE_ROOT_ON_LANDING);
else if (!movementInfo.HasMovementFlag(MOVEFLAG_JUMPING | MOVEFLAG_FALLINGFAR))
{
sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "WorldSession::HandleMovementOpcodes: Player %s from account id %u has pending root on landing, but sent movement packet with opcode %u not containing root or falling flags!",
_player->GetName(), _player->GetSession()->GetAccountId(), opcode);
pMover->ClearUnitState(UNIT_STAT_ROOT_ON_LANDING);
pMover->ClearUnitState(UNIT_STATE_ROOT_ON_LANDING);
pMover->SetRootedReal(true);
KickPlayer();
return;
Expand Down Expand Up @@ -746,14 +746,14 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData)
{
sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "WorldSession::HandleMoveRootAck: Player %s from account id %u sent root apply ack, but continues falling. Using 1.14 client?",
_player->GetName(), _player->GetSession()->GetAccountId());
pMover->AddUnitState(UNIT_STAT_ROOT_ON_LANDING);
pMover->AddUnitState(UNIT_STATE_ROOT_ON_LANDING);
return;
}
}


// we need to always clear this on root packet for 1.14
pMover->ClearUnitState(UNIT_STAT_ROOT_ON_LANDING);
pMover->ClearUnitState(UNIT_STATE_ROOT_ON_LANDING);
#endif

pMover->SetRootedReal(applyReceived);
Expand Down Expand Up @@ -912,7 +912,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket& recvData)
{
if (Pet* pet = _player->GetPet())
{
pet->ClearUnitState(UNIT_STAT_POSSESSED);
pet->ClearUnitState(UNIT_STATE_POSSESSED);
pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED);
// out of range pet dismissed
if (!pet->IsWithinDistInMap(_player, pet->GetMap()->GetGridActivationDistance()))
Expand Down
2 changes: 1 addition & 1 deletion src/game/Handlers/NPCHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket& recv_data)
return;

// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STAT_FEIGN_DEATH))
if (GetPlayer()->HasUnitState(UNIT_STATE_FEIGN_DEATH))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

SendShowBank(guid);
Expand Down
6 changes: 3 additions & 3 deletions src/game/Handlers/PetHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ void WorldSession::HandlePetAction(WorldPacket& recv_data)
pUnitTarget = nullptr;

// make sure pet is facing target
if (pUnitTarget && pUnitTarget != pCharmedUnit && !pCharmedUnit->HasUnitState(UNIT_STAT_CAN_NOT_REACT) &&
if (pUnitTarget && pUnitTarget != pCharmedUnit && !pCharmedUnit->HasUnitState(UNIT_STATE_CAN_NOT_REACT) &&
spellInfo->IsNeedFaceTarget() && !pCharmedUnit->IsFacingTarget(pUnitTarget))
{
float orientation = pCharmedUnit->GetAngle(pUnitTarget);
pCharmedUnit->SetFacingTo(orientation);
pCharmedUnit->SetOrientation(orientation);
}

pCharmedUnit->ClearUnitState(UNIT_STAT_MOVING);
pCharmedUnit->ClearUnitState(UNIT_STATE_MOVING);
SpellCastResult result = pCharmedUnit->CastSpell(pUnitTarget, spellInfo, false);

if (result == SPELL_CAST_OK)
Expand Down Expand Up @@ -553,7 +553,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)

recvPacket >> targets.ReadForCaster(pet);

pet->ClearUnitState(UNIT_STAT_MOVING);
pet->ClearUnitState(UNIT_STATE_MOVING);

Spell* spell = new Spell(pet, spellInfo, false);
spell->m_targets = targets;
Expand Down
Loading

0 comments on commit 7ce75e8

Please sign in to comment.