mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
[Commands] Cleanup #reloadzps Command. (#2129)
* [Commands] Cleanup #reloadzps Command. - Cleanup messages and logic. - Make reloading of zone points global instead of zone specific. * Further cleanup. - Add zone->GetZoneDescription(). - Add mob->GetTargetDescription(mob). * Final cleanup. * Typo.
This commit is contained in:
+16
-28
@@ -7,39 +7,27 @@ void command_bind(Client *c, const Seperator *sep)
|
||||
target = c->GetTarget()->CastToClient();
|
||||
}
|
||||
|
||||
target->SetBindPoint();
|
||||
|
||||
bool in_persistent_instance = (
|
||||
zone->GetInstanceID() != 0 &&
|
||||
zone->IsInstancePersistent()
|
||||
);
|
||||
|
||||
auto target_string = (
|
||||
c == target ?
|
||||
"Yourself" :
|
||||
fmt::format(
|
||||
"{} ({})",
|
||||
target->GetCleanName(),
|
||||
target->GetID()
|
||||
bool bind_allowed = (
|
||||
!zone->GetInstanceID() ||
|
||||
(
|
||||
zone->GetInstanceID() != 0 &&
|
||||
zone->IsInstancePersistent()
|
||||
)
|
||||
);
|
||||
|
||||
if (!bind_allowed) {
|
||||
c->Message(Chat::White, "Yu cannot bind here.");
|
||||
return;
|
||||
}
|
||||
|
||||
target->SetBindPoint();
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Set Bind Point for {} | Zone: {} ({}) ID: {} {}",
|
||||
target_string,
|
||||
zone->GetLongName(),
|
||||
zone->GetShortName(),
|
||||
zone->GetZoneID(),
|
||||
(
|
||||
in_persistent_instance ?
|
||||
fmt::format(
|
||||
" Instance ID: {}",
|
||||
zone->GetInstanceID()
|
||||
) :
|
||||
""
|
||||
)
|
||||
"Set Bind Point for {} | Zone: {}",
|
||||
c->GetTargetDescription(target),
|
||||
zone->GetZoneDescription()
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -47,7 +35,7 @@ void command_bind(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Set Bind Point for {} | XYZ: {:.2f}, {:.2f}, {:.2f}",
|
||||
target_string,
|
||||
c->GetTargetDescription(target),
|
||||
target->GetX(),
|
||||
target->GetY(),
|
||||
target->GetZ()
|
||||
|
||||
Reference in New Issue
Block a user