mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 22:56:37 +00:00
Refactor message functions
This commit is contained in:
+7
-7
@@ -171,7 +171,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
if (RuleI(Adventure, ItemIDToEnablePorts) != 0) {
|
||||
if (!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) {
|
||||
if (sender->GetInv().HasItem(RuleI(Adventure, ItemIDToEnablePorts)) == INVALID_INDEX) {
|
||||
sender->Message_StringID(Chat::Red, DUNGEON_SEALED);
|
||||
sender->MessageString(Chat::Red, DUNGEON_SEALED);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
} else {
|
||||
@@ -281,7 +281,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
* GM can always open locks
|
||||
*/
|
||||
if (sender->GetGM()) {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_GM);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_GM);
|
||||
|
||||
if (!IsDoorOpen() || (open_type == 58)) {
|
||||
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
|
||||
@@ -333,19 +333,19 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
} else {
|
||||
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
|
||||
}
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
|
||||
} else {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_NO_PICK);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_NO_PICK);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_CANT_PICK);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_CANT_PICK);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
|
||||
}
|
||||
} else {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_LOCKED);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user