mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
[Crash] Fix crash in #movechar (#3612)
This commit is contained in:
parent
d8926cd5f3
commit
cea3ad6a42
@ -46,7 +46,12 @@ void command_movechar(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto zone_id = ZoneID(zone_short_name);
|
auto zone_id = ZoneID(zone_short_name);
|
||||||
std::string zone_long_name = ZoneLongName(zone_id);
|
auto z = GetZone(zone_id);
|
||||||
|
|
||||||
|
if (!z) {
|
||||||
|
c->Message(Chat::Red, "Invalid zone.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool is_special_zone = (
|
bool is_special_zone = (
|
||||||
zone_short_name.find("cshome") != std::string::npos ||
|
zone_short_name.find("cshome") != std::string::npos ||
|
||||||
@ -59,7 +64,7 @@ void command_movechar(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is a special zone and you cannot move someone there.",
|
"{} ({}) is a special zone and you cannot move someone there.",
|
||||||
zone_long_name,
|
z->long_name,
|
||||||
zone_short_name
|
zone_short_name
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -91,7 +96,7 @@ void command_movechar(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"Character Move {} | Zone: {} ({}) ID: {}",
|
"Character Move {} | Zone: {} ({}) ID: {}",
|
||||||
moved_string,
|
moved_string,
|
||||||
zone_long_name,
|
z->long_name,
|
||||||
zone_short_name,
|
zone_short_name,
|
||||||
zone_id
|
zone_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user