mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Cleanup] Cleanup Body Type Code (#4366)
* [Cleanup] Cleanup Body Type-based Code * Update bodytypes.cpp * Final * Update body_type.cpp * Cleanup * Cleanup * Formatting --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
@@ -11882,8 +11882,8 @@ void Client::Handle_OP_PickPocket(const EQApplicationPacket *app)
|
||||
}
|
||||
else if (victim->IsNPC()) {
|
||||
auto body = victim->GetBodyType();
|
||||
if (body == BT_Humanoid || body == BT_Monster || body == BT_Giant ||
|
||||
body == BT_Lycanthrope) {
|
||||
if (body == BodyType::Humanoid || body == BodyType::Monster || body == BodyType::Giant ||
|
||||
body == BodyType::Lycanthrope) {
|
||||
victim->CastToNPC()->PickPocket(this);
|
||||
return;
|
||||
}
|
||||
@@ -14999,9 +14999,9 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
|
||||
if (nt) {
|
||||
if (GetGM() || (!nt->IsInvisible(this) && (DistanceSquared(m_Position, nt->GetPosition()) <= TARGETING_RANGE*TARGETING_RANGE))) {
|
||||
if (nt->GetBodyType() == BT_NoTarget2 ||
|
||||
nt->GetBodyType() == BT_Special ||
|
||||
nt->GetBodyType() == BT_NoTarget) {
|
||||
if (nt->GetBodyType() == BodyType::NoTarget2 ||
|
||||
nt->GetBodyType() == BodyType::Special ||
|
||||
nt->GetBodyType() == BodyType::NoTarget) {
|
||||
can_target = false;
|
||||
}
|
||||
else {
|
||||
@@ -15144,8 +15144,8 @@ void Client::Handle_OP_TargetMouse(const EQApplicationPacket *app)
|
||||
GetTarget()->IsTargeted(1);
|
||||
return;
|
||||
}
|
||||
else if (GetTarget()->GetBodyType() == BT_NoTarget2 || GetTarget()->GetBodyType() == BT_Special
|
||||
|| GetTarget()->GetBodyType() == BT_NoTarget)
|
||||
else if (GetTarget()->GetBodyType() == BodyType::NoTarget2 || GetTarget()->GetBodyType() == BodyType::Special
|
||||
|| GetTarget()->GetBodyType() == BodyType::NoTarget)
|
||||
{
|
||||
auto message = fmt::format(
|
||||
"[{}] attempting to target something untargetable [{}] bodytype [{}]",
|
||||
|
||||
Reference in New Issue
Block a user