mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Door Manipulation] Resolve some typos and add a GM check. (#1550)
* [Door Manipulation] Resolve some typos and add a status check. * Remove Status check and use GetGM() inside devtools check instead.
This commit is contained in:
parent
ca77d22035
commit
7b969173f4
@ -9191,7 +9191,7 @@ void Client::SetDisplayMobInfoWindow(bool display_mob_info_window)
|
||||
|
||||
bool Client::IsDevToolsEnabled() const
|
||||
{
|
||||
return dev_tools_enabled && RuleB(World, EnableDevTools);
|
||||
return dev_tools_enabled && GetGM() && RuleB(World, EnableDevTools);
|
||||
}
|
||||
|
||||
void Client::SetDevToolsEnabled(bool in_dev_tools_enabled)
|
||||
|
||||
@ -165,7 +165,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
fmt::format("#door edit {} -.25", move_option),
|
||||
false,
|
||||
"-.25"
|
||||
".25"
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -190,7 +190,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
for (int move_index = -15; move_index <= 0; move_index += 5) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
int value = (move_index == 0 ? -1 : move_index);
|
||||
move_y_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
@ -204,7 +204,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
fmt::format("#door edit {} -.25", move_option),
|
||||
false,
|
||||
"-.25"
|
||||
".25"
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -229,7 +229,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
for (int move_index = -15; move_index <= 0; move_index += 5) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
int value = (move_index == 0 ? -1 : move_index);
|
||||
move_z_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
@ -243,7 +243,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
fmt::format("#door edit {} -.25", move_option),
|
||||
false,
|
||||
"-.25"
|
||||
".25"
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -260,7 +260,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
for (int move_index = -50; move_index <= 0; move_index += 5) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
int value = (move_index == 0 ? -1 : move_index);
|
||||
move_h_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
@ -283,7 +283,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
for (int move_index = -100; move_index <= 0; move_index += 10) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
int value = (move_index == 0 ? -1 : move_index);
|
||||
set_size_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
@ -297,26 +297,30 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
|
||||
// we're passing a move action here
|
||||
if (!arg3.empty() && StringIsNumber(arg3)) {
|
||||
int x_move = 0;
|
||||
int y_move = 0;
|
||||
int z_move = 0;
|
||||
int h_move = 0;
|
||||
int set_size = 0;
|
||||
float x_move = 0.0f;
|
||||
float y_move = 0.0f;
|
||||
float z_move = 0.0f;
|
||||
float h_move = 0.0f;
|
||||
float set_size = 0.0f;
|
||||
|
||||
if (arg2 == move_x_action) {
|
||||
x_move = std::atoi(arg3.c_str());
|
||||
x_move = std::atof(arg3.c_str());
|
||||
}
|
||||
|
||||
if (arg2 == move_y_action) {
|
||||
y_move = std::atoi(arg3.c_str());
|
||||
y_move = std::atof(arg3.c_str());
|
||||
}
|
||||
|
||||
if (arg2 == move_z_action) {
|
||||
z_move = std::atoi(arg3.c_str());
|
||||
z_move = std::atof(arg3.c_str());
|
||||
}
|
||||
|
||||
if (arg2 == move_h_action) {
|
||||
h_move = std::atoi(arg3.c_str());
|
||||
h_move = std::atof(arg3.c_str());
|
||||
}
|
||||
|
||||
if (arg2 == set_size_action) {
|
||||
set_size = std::atoi(arg3.c_str());
|
||||
set_size = std::atof(arg3.c_str());
|
||||
}
|
||||
|
||||
door->SetLocation(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user