mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-08 10:02:26 +00:00
[Cleanup] Utilize GetPlayerState() in mob methods (#3066)
# Notes - This method was unused, make use of it.
This commit is contained in:
parent
cc6bcf3295
commit
7961d7afa8
@ -2989,7 +2989,7 @@ void Bot::AI_Process()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(m_PlayerState & static_cast<uint32>(PlayerState::Aggressive))) {
|
if (!(GetPlayerState() & static_cast<uint32>(PlayerState::Aggressive))) {
|
||||||
SendAddPlayerState(PlayerState::Aggressive);
|
SendAddPlayerState(PlayerState::Aggressive);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3595,7 +3595,7 @@ void Bot::AI_Process()
|
|||||||
GetPet()->SetTarget(nullptr);
|
GetPet()->SetTarget(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_PlayerState & static_cast<uint32>(PlayerState::Aggressive)) {
|
if (GetPlayerState() & static_cast<uint32>(PlayerState::Aggressive)) {
|
||||||
SendRemovePlayerState(PlayerState::Aggressive);
|
SendRemovePlayerState(PlayerState::Aggressive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1473,7 +1473,7 @@ void Merc::AI_Process() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(m_PlayerState & static_cast<uint32>(PlayerState::Aggressive)))
|
if (!(GetPlayerState() & static_cast<uint32>(PlayerState::Aggressive)))
|
||||||
SendAddPlayerState(PlayerState::Aggressive);
|
SendAddPlayerState(PlayerState::Aggressive);
|
||||||
|
|
||||||
bool atCombatRange = false;
|
bool atCombatRange = false;
|
||||||
@ -1716,7 +1716,7 @@ void Merc::AI_Process() {
|
|||||||
confidence_timer.Disable();
|
confidence_timer.Disable();
|
||||||
_check_confidence = false;
|
_check_confidence = false;
|
||||||
|
|
||||||
if (m_PlayerState & static_cast<uint32>(PlayerState::Aggressive))
|
if (GetPlayerState() & static_cast<uint32>(PlayerState::Aggressive))
|
||||||
SendRemovePlayerState(PlayerState::Aggressive);
|
SendRemovePlayerState(PlayerState::Aggressive);
|
||||||
|
|
||||||
if(!check_target_timer.Enabled())
|
if(!check_target_timer.Enabled())
|
||||||
|
|||||||
@ -1211,7 +1211,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
|||||||
ns->spawn.class_ = class_;
|
ns->spawn.class_ = class_;
|
||||||
ns->spawn.gender = gender;
|
ns->spawn.gender = gender;
|
||||||
ns->spawn.level = level;
|
ns->spawn.level = level;
|
||||||
ns->spawn.PlayerState = m_PlayerState;
|
ns->spawn.PlayerState = GetPlayerState();
|
||||||
ns->spawn.deity = deity;
|
ns->spawn.deity = deity;
|
||||||
ns->spawn.animation = 0;
|
ns->spawn.animation = 0;
|
||||||
ns->spawn.findable = findable?1:0;
|
ns->spawn.findable = findable?1:0;
|
||||||
|
|||||||
@ -1085,7 +1085,7 @@ void Mob::AI_Process() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(m_PlayerState & static_cast<uint32>(PlayerState::Aggressive)))
|
if (!(GetPlayerState() & static_cast<uint32>(PlayerState::Aggressive)))
|
||||||
SendAddPlayerState(PlayerState::Aggressive);
|
SendAddPlayerState(PlayerState::Aggressive);
|
||||||
|
|
||||||
// NPCs will forget people after 10 mins of not interacting with them or out of range
|
// NPCs will forget people after 10 mins of not interacting with them or out of range
|
||||||
@ -1381,7 +1381,7 @@ void Mob::AI_Process() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (m_PlayerState & static_cast<uint32>(PlayerState::Aggressive))
|
if (GetPlayerState() & static_cast<uint32>(PlayerState::Aggressive))
|
||||||
SendRemovePlayerState(PlayerState::Aggressive);
|
SendRemovePlayerState(PlayerState::Aggressive);
|
||||||
|
|
||||||
if (IsPetStop()) // pet stop won't be engaged, so we will always get here and we want the above branch to execute
|
if (IsPetStop()) // pet stop won't be engaged, so we will always get here and we want the above branch to execute
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user