mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 12:36:36 +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:
@@ -65,7 +65,9 @@ void command_npcloot(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
c->GetTarget()->CastToNPC()->AddItem(
|
||||
auto target = c->GetTarget();
|
||||
|
||||
target->CastToNPC()->AddItem(
|
||||
item_id,
|
||||
item_charges,
|
||||
equip_item,
|
||||
@@ -97,11 +99,10 @@ void command_npcloot(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Added {} ({}) to {} ({}).",
|
||||
"Added {} ({}) to {}.",
|
||||
item_link,
|
||||
item_id,
|
||||
c->GetTarget()->GetCleanName(),
|
||||
c->GetTarget()->GetID()
|
||||
c->GetTargetDescription(target)
|
||||
).c_str()
|
||||
);
|
||||
} else if (is_money) {
|
||||
@@ -143,9 +144,8 @@ void command_npcloot(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} ({}) now has {}.",
|
||||
target->GetCleanName(),
|
||||
target->GetID(),
|
||||
"{} now has {}.",
|
||||
c->GetTargetDescription(target),
|
||||
money_string
|
||||
).c_str()
|
||||
);
|
||||
@@ -172,12 +172,11 @@ void command_npcloot(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Removed {} {} ({}) from {} ({}).",
|
||||
"Removed {} {} ({}) from {}.",
|
||||
item_count,
|
||||
database.CreateItemLink(item_id),
|
||||
item_id,
|
||||
target->GetCleanName(),
|
||||
target->GetID()
|
||||
c->GetTargetDescription(target)
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -188,20 +187,18 @@ void command_npcloot(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} ({}) has no items to remove.",
|
||||
target->GetCleanName(),
|
||||
target->GetID()
|
||||
"{} has no items to remove.",
|
||||
c->GetTargetDescription(target)
|
||||
).c_str()
|
||||
);
|
||||
} else {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} Item{} removed from {} ({}).",
|
||||
"{} Item{} removed from {}.",
|
||||
total_item_count,
|
||||
total_item_count != 1 ? "s" : "",
|
||||
target->GetCleanName(),
|
||||
target->GetID()
|
||||
c->GetTargetDescription(target)
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
@@ -214,21 +211,19 @@ void command_npcloot(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Removed {} {} ({}) from {} ({}).",
|
||||
"Removed {} {} ({}) from {}.",
|
||||
item_count,
|
||||
database.CreateItemLink(item_id),
|
||||
item_id,
|
||||
target->GetCleanName(),
|
||||
target->GetID()
|
||||
c->GetTargetDescription(target)
|
||||
).c_str()
|
||||
);
|
||||
} else {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} ({}) does not have any {} ({}).",
|
||||
target->GetCleanName(),
|
||||
target->GetID(),
|
||||
"{} does not have any {} ({}).",
|
||||
c->GetTargetDescription(target),
|
||||
database.CreateItemLink(item_id),
|
||||
item_id
|
||||
).c_str()
|
||||
|
||||
Reference in New Issue
Block a user