mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
[Commands] Cleanup #summonburiedplayercorpse Command. (#2146)
* [Commands] Cleanup #summonburiedplayercorpse Command. - Cleanup messages and logic. * Update summonburiedplayercorpse.cpp
This commit is contained in:
parent
b03d47b9cd
commit
9fbab76d40
@ -3,26 +3,34 @@
|
|||||||
|
|
||||||
void command_summonburiedplayercorpse(Client *c, const Seperator *sep)
|
void command_summonburiedplayercorpse(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
Client *t = c;
|
auto target = c;
|
||||||
|
|
||||||
if (c->GetTarget() && c->GetTarget()->IsClient() && c->GetGM()) {
|
if (c->GetTarget() && c->GetTarget()->IsClient() && c->GetGM()) {
|
||||||
t = c->GetTarget()->CastToClient();
|
target = c->GetTarget()->CastToClient();
|
||||||
}
|
|
||||||
else {
|
|
||||||
c->Message(Chat::White, "You must first select a target!");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Corpse *PlayerCorpse = database.SummonBuriedCharacterCorpses(
|
auto *corpse = database.SummonBuriedCharacterCorpses(
|
||||||
t->CharacterID(),
|
target->CharacterID(),
|
||||||
t->GetZoneID(),
|
target->GetZoneID(),
|
||||||
zone->GetInstanceID(),
|
zone->GetInstanceID(),
|
||||||
t->GetPosition());
|
target->GetPosition()
|
||||||
|
);
|
||||||
|
|
||||||
if (!PlayerCorpse) {
|
if (!corpse) {
|
||||||
c->Message(Chat::White, "Your target doesn't have any buried corpses.");
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"{} not have any buried corpses.",
|
||||||
|
(
|
||||||
|
c == target ?
|
||||||
|
"You do" :
|
||||||
|
fmt::format(
|
||||||
|
"{} ({}) does",
|
||||||
|
target->GetCleanName(),
|
||||||
|
target->GetID()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user