mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +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:
parent
0b3065d7a9
commit
7df9b2974b
@ -416,6 +416,15 @@ enum ConsiderLevel : uint8 {
|
|||||||
Scowls
|
Scowls
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum TargetDescriptionType : uint8 {
|
||||||
|
LCSelf,
|
||||||
|
UCSelf,
|
||||||
|
LCYou,
|
||||||
|
UCYou,
|
||||||
|
LCYour,
|
||||||
|
UCYour
|
||||||
|
};
|
||||||
|
|
||||||
enum ReloadWorld : uint8 {
|
enum ReloadWorld : uint8 {
|
||||||
NoRepop = 0,
|
NoRepop = 0,
|
||||||
Repop,
|
Repop,
|
||||||
|
|||||||
@ -232,6 +232,7 @@
|
|||||||
#define ServerOP_ReloadMerchants 0x4016
|
#define ServerOP_ReloadMerchants 0x4016
|
||||||
#define ServerOP_ReloadAAData 0x4017
|
#define ServerOP_ReloadAAData 0x4017
|
||||||
#define ServerOP_ReloadTraps 0x4018
|
#define ServerOP_ReloadTraps 0x4018
|
||||||
|
#define ServerOP_ReloadZonePoints 0x4019
|
||||||
#define ServerOP_ReloadStaticZoneData 0x4020
|
#define ServerOP_ReloadStaticZoneData 0x4020
|
||||||
|
|
||||||
#define ServerOP_CZDialogueWindow 0x4500
|
#define ServerOP_CZDialogueWindow 0x4500
|
||||||
|
|||||||
2491
world/zoneserver.cpp
2491
world/zoneserver.cpp
File diff suppressed because it is too large
Load Diff
@ -40,13 +40,13 @@ public:
|
|||||||
void SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message, ...);
|
void SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message, ...);
|
||||||
void SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message);
|
void SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message);
|
||||||
void SendKeepAlive();
|
void SendKeepAlive();
|
||||||
bool SetZone(uint32 iZoneID, uint32 iInstanceID = 0, bool iStaticZone = false);
|
bool SetZone(uint32 zone_id, uint32 instance_id = 0, bool is_static_zone = false);
|
||||||
void TriggerBootup(uint32 iZoneID = 0, uint32 iInstanceID = 0, const char* iAdminName = 0, bool iMakeStatic = false);
|
void TriggerBootup(uint32 zone_id = 0, uint32 instance_id = 0, const char* admin_name = 0, bool is_static_zone = false);
|
||||||
void Disconnect() { auto handle = tcpc->Handle(); if (handle) { handle->Disconnect(); } }
|
void Disconnect() { auto handle = tcpc->Handle(); if (handle) { handle->Disconnect(); } }
|
||||||
void IncomingClient(Client* client);
|
void IncomingClient(Client* client);
|
||||||
void LSBootUpdate(uint32 zoneid, uint32 iInstanceID = 0, bool startup = false);
|
void LSBootUpdate(uint32 zone_id, uint32 instance_id = 0, bool startup = false);
|
||||||
void LSSleepUpdate(uint32 zoneid);
|
void LSSleepUpdate(uint32 zone_id);
|
||||||
void LSShutDownUpdate(uint32 zoneid);
|
void LSShutDownUpdate(uint32 zone_id);
|
||||||
uint32 GetPrevZoneID() { return zone_server_previous_zone_id; }
|
uint32 GetPrevZoneID() { return zone_server_previous_zone_id; }
|
||||||
void ChangeWID(uint32 iCharID, uint32 iWID);
|
void ChangeWID(uint32 iCharID, uint32 iWID);
|
||||||
void SendGroupIDs();
|
void SendGroupIDs();
|
||||||
|
|||||||
142
zone/aggro.cpp
142
zone/aggro.cpp
@ -37,15 +37,14 @@
|
|||||||
extern Zone* zone;
|
extern Zone* zone;
|
||||||
//#define LOSDEBUG 6
|
//#define LOSDEBUG 6
|
||||||
|
|
||||||
void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbose) {
|
void EntityList::DescribeAggro(Client *to_who, NPC *from_who, float d, bool verbose) {
|
||||||
float distance_squared = (d * d);
|
float distance_squared = (d * d);
|
||||||
|
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Describing aggro for {} ({}).",
|
"Describing aggro for {} ({}).",
|
||||||
from_who->GetCleanName(),
|
to_who->GetTargetDescription(from_who)
|
||||||
from_who->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -53,18 +52,14 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
|
|||||||
bool will_aggro_npcs = from_who->WillAggroNPCs();
|
bool will_aggro_npcs = from_who->WillAggroNPCs();
|
||||||
if (is_engaged) {
|
if (is_engaged) {
|
||||||
Mob *top = from_who->GetHateTop();
|
Mob *top = from_who->GetHateTop();
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"I am currently engaged with {}.",
|
"I am currently engaged with {}.",
|
||||||
(
|
(
|
||||||
!top ?
|
!top ?
|
||||||
"nothing" :
|
"nothing" :
|
||||||
fmt::format(
|
from_who->GetTargetDescription(top)
|
||||||
"{} ({})",
|
|
||||||
top->GetCleanName(),
|
|
||||||
top->GetID()
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -90,12 +85,11 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is on Faction {} ({}).",
|
"{} is on Faction {} ({}).",
|
||||||
from_who->GetCleanName(),
|
to_who->GetTargetDescription(from_who),
|
||||||
from_who->GetID(),
|
|
||||||
faction_name,
|
faction_name,
|
||||||
faction_id
|
faction_id
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -115,12 +109,11 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
|
|||||||
|
|
||||||
if (is_engaged) {
|
if (is_engaged) {
|
||||||
uint32 hate_amount = from_who->GetHateAmount(npc);
|
uint32 hate_amount = from_who->GetHateAmount(npc);
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is {}on my hate list{}.",
|
"{} is {}on my hate list{}.",
|
||||||
npc->GetCleanName(),
|
to_who->GetTargetDescription(npc),
|
||||||
npc->GetID(),
|
|
||||||
!hate_amount ? "not " : "",
|
!hate_amount ? "not " : "",
|
||||||
(
|
(
|
||||||
!hate_amount ?
|
!hate_amount ?
|
||||||
@ -133,21 +126,20 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
|
|||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else if (!will_aggro_npcs) {
|
} else if (!will_aggro_npcs) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is an NPC and I cannot aggro NPCs.",
|
"{} is an NPC and I cannot aggro NPCs.",
|
||||||
npc->GetCleanName(),
|
to_who->GetTargetDescription(npc)
|
||||||
npc->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
from_who->DescribeAggro(towho, npc, verbose);
|
from_who->DescribeAggro(to_who, npc, verbose);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
void NPC::DescribeAggro(Client *to_who, Mob *mob, bool verbose) {
|
||||||
//this logic is duplicated from below, try to keep it up to date.
|
//this logic is duplicated from below, try to keep it up to date.
|
||||||
float aggro_range = GetAggroRange();
|
float aggro_range = GetAggroRange();
|
||||||
float x_range = std::abs(mob->GetX() - GetX());
|
float x_range = std::abs(mob->GetX() - GetX());
|
||||||
@ -158,12 +150,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
y_range > aggro_range ||
|
y_range > aggro_range ||
|
||||||
z_range > aggro_range
|
z_range > aggro_range
|
||||||
) {
|
) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is out of range. X Range: {} Y Range: {} Z Range: {} Aggro Range: {}",
|
"{} is out of range. X Range: {} Y Range: {} Z Range: {} Aggro Range: {}",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob),
|
||||||
mob->GetID(),
|
|
||||||
x_range,
|
x_range,
|
||||||
y_range,
|
y_range,
|
||||||
z_range,
|
z_range,
|
||||||
@ -174,12 +165,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mob->IsInvisible(this)) {
|
if (mob->IsInvisible(this)) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is invisible to me. ",
|
"{} is invisible to me.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob)
|
||||||
mob->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -194,12 +184,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
mob->CastToClient()->GetGM()
|
mob->CastToClient()->GetGM()
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is a GM or is not connected. ",
|
"{} is a GM or is not connected.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob)
|
||||||
mob->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -207,12 +196,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
|
|
||||||
|
|
||||||
if (mob == GetOwner()) {
|
if (mob == GetOwner()) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is my owner. ",
|
"{} is my owner.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob)
|
||||||
mob->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -221,12 +209,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
float distance_squared = DistanceSquared(mob->GetPosition(), m_Position);
|
float distance_squared = DistanceSquared(mob->GetPosition(), m_Position);
|
||||||
float aggro_range_squared = (aggro_range * aggro_range);
|
float aggro_range_squared = (aggro_range * aggro_range);
|
||||||
if (distance_squared > aggro_range_squared) {
|
if (distance_squared > aggro_range_squared) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is out of range. Distance: {:.2f} Aggro Range: {:.2f}",
|
"{} is out of range. Distance: {:.2f} Aggro Range: {:.2f}",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob),
|
||||||
mob->GetID(),
|
|
||||||
distance_squared,
|
distance_squared,
|
||||||
aggro_range_squared
|
aggro_range_squared
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -241,12 +228,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
GetBodyType() != BT_Undead &&
|
GetBodyType() != BT_Undead &&
|
||||||
!AlwaysAggro()
|
!AlwaysAggro()
|
||||||
) {
|
) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) considers Red to me.",
|
"{} considers Red to me.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob)
|
||||||
mob->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -257,12 +243,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
mob->GetLevelCon(GetLevel()) == CON_GRAY &&
|
mob->GetLevelCon(GetLevel()) == CON_GRAY &&
|
||||||
!AlwaysAggro()
|
!AlwaysAggro()
|
||||||
) {
|
) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) considers Red to me.",
|
"{} considers Red to me.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob)
|
||||||
mob->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -283,21 +268,19 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mob_faction_id) {
|
if (!mob_faction_id) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) has no primary Faction.",
|
"{} has no primary Faction.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob)
|
||||||
mob->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else if (mob_faction_id < 0) {
|
} else if (mob_faction_id < 0) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is on special Faction {}.",
|
"{} is on special Faction {}.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob),
|
||||||
mob->GetID(),
|
|
||||||
mob_faction_id
|
mob_faction_id
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -306,12 +289,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
bool has_entry = false;
|
bool has_entry = false;
|
||||||
for (auto faction : faction_list) {
|
for (auto faction : faction_list) {
|
||||||
if (static_cast<int>(faction->factionID) == mob_faction_id) {
|
if (static_cast<int>(faction->factionID) == mob_faction_id) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) has {} standing with Faction {} ({}) with their Faction Level of {}",
|
"{} has {} standing with Faction {} ({}) with their Faction Level of {}",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob),
|
||||||
mob->GetID(),
|
|
||||||
(
|
(
|
||||||
faction->npc_value != 0 ?
|
faction->npc_value != 0 ?
|
||||||
(
|
(
|
||||||
@ -332,12 +314,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!has_entry) {
|
if (!has_entry) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is on Faction {} ({}), for which I do not have an entry.",
|
"{} is on Faction {} ({}), for which I do not have an entry.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob),
|
||||||
mob->GetID(),
|
|
||||||
faction_name,
|
faction_name,
|
||||||
mob_faction_id
|
mob_faction_id
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -348,7 +329,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
|
|
||||||
auto faction_value = mob->GetReverseFactionCon(this);
|
auto faction_value = mob->GetReverseFactionCon(this);
|
||||||
|
|
||||||
if(
|
if (
|
||||||
!(
|
!(
|
||||||
faction_value == FACTION_THREATENINGLY ||
|
faction_value == FACTION_THREATENINGLY ||
|
||||||
faction_value == FACTION_SCOWLS ||
|
faction_value == FACTION_SCOWLS ||
|
||||||
@ -359,12 +340,11 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) does not have low enough faction, their Faction Level is {} ({}).",
|
"{} does not have low enough faction, their Faction Level is {} ({}).",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob),
|
||||||
mob->GetID(),
|
|
||||||
FactionValueToString(faction_value),
|
FactionValueToString(faction_value),
|
||||||
faction_value
|
faction_value
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -372,23 +352,21 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!CheckLosFN(mob)) {
|
if (!CheckLosFN(mob)) {
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is out of sight.",
|
"{} is out of sight.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob)
|
||||||
mob->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
towho->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) meets all conditions, I should be attacking them.",
|
"{} meets all conditions, I should be attacking them.",
|
||||||
mob->GetCleanName(),
|
to_who->GetTargetDescription(mob)
|
||||||
mob->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1267,7 +1267,7 @@ public:
|
|||||||
return (task_state ? task_state->EnabledTaskCount(task_set_id) : -1);
|
return (task_state ? task_state->EnabledTaskCount(task_set_id) : -1);
|
||||||
}
|
}
|
||||||
inline int IsTaskCompleted(int task_id) { return (task_state ? task_state->IsTaskCompleted(task_id) : -1); }
|
inline int IsTaskCompleted(int task_id) { return (task_state ? task_state->IsTaskCompleted(task_id) : -1); }
|
||||||
inline void ShowClientTasks(Client *client) { if (task_state) { task_state->ShowClientTasks(client); }}
|
inline void ShowClientTasks(Client *client) { if (task_state) { task_state->ShowClientTasks(this, client); }}
|
||||||
inline void CancelAllTasks() { if (task_state) { task_state->CancelAllTasks(this); }}
|
inline void CancelAllTasks() { if (task_state) { task_state->CancelAllTasks(this); }}
|
||||||
inline int GetActiveTaskCount() { return (task_state ? task_state->GetActiveTaskCount() : 0); }
|
inline int GetActiveTaskCount() { return (task_state ? task_state->GetActiveTaskCount() : 0); }
|
||||||
inline int GetActiveTaskID(int index) { return (task_state ? task_state->GetActiveTaskID(index) : -1); }
|
inline int GetActiveTaskID(int index) { return (task_state ? task_state->GetActiveTaskID(index) : -1); }
|
||||||
|
|||||||
@ -799,9 +799,8 @@ void Client::CompleteConnect()
|
|||||||
Message(
|
Message(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) will expire in {}.",
|
"{} will expire in {}.",
|
||||||
zone->GetLongName(),
|
zone->GetZoneDescription(),
|
||||||
zone->GetInstanceID(),
|
|
||||||
time_string
|
time_string
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -296,7 +296,7 @@ int command_init(void)
|
|||||||
command_add("reloadtraps", "[0|1] - Reloads and repops traps, globally if specified (1 = global)", AccountStatus::QuestTroupe, command_reloadtraps) ||
|
command_add("reloadtraps", "[0|1] - Reloads and repops traps, globally if specified (1 = global)", AccountStatus::QuestTroupe, command_reloadtraps) ||
|
||||||
command_add("reloadtitles", "- Reload player titles from the database", AccountStatus::GMLeadAdmin, command_reloadtitles) ||
|
command_add("reloadtitles", "- Reload player titles from the database", AccountStatus::GMLeadAdmin, command_reloadtitles) ||
|
||||||
command_add("reloadworld", "[0|1|2] - Reload quests global and repop NPCs if specified (0 = No Repop, 1 = Repop, 2 = Force Repop)", AccountStatus::Max, command_reloadworld) ||
|
command_add("reloadworld", "[0|1|2] - Reload quests global and repop NPCs if specified (0 = No Repop, 1 = Repop, 2 = Force Repop)", AccountStatus::Max, command_reloadworld) ||
|
||||||
command_add("reloadzps", "- Reload zone points from database", AccountStatus::GMLeadAdmin, command_reloadzps) ||
|
command_add("reloadzps", "- Reload zone points from database globally", AccountStatus::GMLeadAdmin, command_reloadzps) ||
|
||||||
command_add("removeitem", "[Item ID] [Amount] - Removes the specified Item ID by Amount from you or your player target's inventory (Amount defaults to 1 if not used)", AccountStatus::GMAdmin, command_removeitem) ||
|
command_add("removeitem", "[Item ID] [Amount] - Removes the specified Item ID by Amount from you or your player target's inventory (Amount defaults to 1 if not used)", AccountStatus::GMAdmin, command_removeitem) ||
|
||||||
command_add("repop", "[Force] - Repop the zone with optional force repop", AccountStatus::GMAdmin, command_repop) ||
|
command_add("repop", "[Force] - Repop the zone with optional force repop", AccountStatus::GMAdmin, command_repop) ||
|
||||||
command_add("resetaa", "- Resets a Player's AA in their profile and refunds spent AA's to unspent, may disconnect player.", AccountStatus::GMMgmt, command_resetaa) ||
|
command_add("resetaa", "- Resets a Player's AA in their profile and refunds spent AA's to unspent, may disconnect player.", AccountStatus::GMMgmt, command_resetaa) ||
|
||||||
@ -1104,15 +1104,7 @@ void command_emptyinventory(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Inventory cleared for {}, {} items deleted.",
|
"Inventory cleared for {}, {} items deleted.",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
removed_count
|
removed_count
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -1120,16 +1112,9 @@ void command_emptyinventory(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} no items to delete.",
|
"{} {} no items to delete.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
c == target ? "have" : "has"
|
||||||
"You have" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) has",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -331,7 +331,7 @@ public:
|
|||||||
|
|
||||||
void StopMobAI();
|
void StopMobAI();
|
||||||
|
|
||||||
void DescribeAggro(Client *towho, NPC *from_who, float dist, bool verbose);
|
void DescribeAggro(Client *to_who, NPC *from_who, float dist, bool verbose);
|
||||||
|
|
||||||
void Message(uint32 to_guilddbid, uint32 type, const char* message, ...);
|
void Message(uint32 to_guilddbid, uint32 type, const char* message, ...);
|
||||||
void MessageStatus(uint32 to_guilddbid, int to_minstatus, uint32 type, const char* message, ...);
|
void MessageStatus(uint32 to_guilddbid, int to_minstatus, uint32 type, const char* message, ...);
|
||||||
|
|||||||
@ -206,10 +206,8 @@ void command_advnpcspawn(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Spawn2 {} Deleted | Name: {} ({})",
|
"Spawn2 {} Deleted | Name: {}",
|
||||||
spawn2_id,
|
spawn2_id,c->GetTargetDescription(target)
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
target->Depop(false);
|
target->Depop(false);
|
||||||
@ -324,10 +322,9 @@ void command_advnpcspawn(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Spawn2 {} Respawn Modified | Name: {} ({}) Respawn Timer: {} Variance: {}",
|
"Spawn2 {} Respawn Modified | Name: {} Respawn Timer: {} Variance: {}",
|
||||||
spawn2_id,
|
spawn2_id,
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
respawn_timer,
|
respawn_timer,
|
||||||
variance
|
variance
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -468,10 +465,9 @@ void command_advnpcspawn(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Spawn2 {} Moved | Name: {} ({})",
|
"Spawn2 {} Moved | Name: {}",
|
||||||
spawn2_id,
|
spawn2_id,
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
c->Message(
|
c->Message(
|
||||||
@ -520,10 +516,9 @@ void command_advnpcspawn(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Spawngroup {} Version Modified | Name: {} ({}) Version: {}",
|
"Spawngroup {} Version Modified | Name: {} Version: {}",
|
||||||
target->GetSpawnGroupId(),
|
target->GetSpawnGroupId(),
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
version
|
version
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -17,15 +17,7 @@ void command_aggrozone(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Aggroing zone on {}.",
|
"Aggroing zone on {}.",
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,11 +51,9 @@ void command_ai(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) considers {} ({}) as {} ({}).",
|
"{} considers {} as {} ({}).",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
c->GetTargetDescription(mob_to_consider),
|
||||||
mob_to_consider->GetCleanName(),
|
|
||||||
mob_to_consider->GetID(),
|
|
||||||
EQ::constants::GetConsiderLevelName(consider_level),
|
EQ::constants::GetConsiderLevelName(consider_level),
|
||||||
consider_level
|
consider_level
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -72,9 +70,8 @@ void command_ai(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is now on Faction {}.",
|
"{} is now on Faction {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
(
|
(
|
||||||
faction_name.empty() ?
|
faction_name.empty() ?
|
||||||
std::to_string(faction_id) :
|
std::to_string(faction_id) :
|
||||||
@ -97,9 +94,8 @@ void command_ai(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) now has a guard spot of {:.2f}, {:.2f}, {:.2f} with a heading of {:.2f}.",
|
"{} now has a guard spot of {:.2f}, {:.2f}, {:.2f} with a heading of {:.2f}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
target_position.x,
|
target_position.x,
|
||||||
target_position.y,
|
target_position.y,
|
||||||
target_position.z,
|
target_position.z,
|
||||||
@ -147,9 +143,8 @@ void command_ai(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) now has a roambox from {}, {} to {}, {} with {} and {} and a distance of {}.",
|
"{} now has a roambox from {}, {} to {}, {} with {} and {} and a distance of {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
min_x,
|
min_x,
|
||||||
min_y,
|
min_y,
|
||||||
max_x,
|
max_x,
|
||||||
@ -205,9 +200,8 @@ void command_ai(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) now has a roambox with a max distance of {} and a roam distance variance of {} with {} and {}.",
|
"{} now has a roambox with a max distance of {} and a roam distance variance of {} with {} and {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
max_distance,
|
max_distance,
|
||||||
roam_distance_variance,
|
roam_distance_variance,
|
||||||
(
|
(
|
||||||
@ -246,9 +240,8 @@ void command_ai(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is now using Spell List {}.",
|
"{} is now using Spell List {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
spell_list_id
|
spell_list_id
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -19,10 +19,9 @@ void command_attack(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::EchoChat1,
|
Chat::EchoChat1,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} whispers, 'Attacking {} ({}).'",
|
"{} whispers, 'Attacking {}.'",
|
||||||
c->GetTarget()->GetCleanName(),
|
c->GetTarget()->GetCleanName(),
|
||||||
entity->GetCleanName(),
|
c->GetTargetDescription(entity)
|
||||||
entity->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -7,39 +7,27 @@ void command_bind(Client *c, const Seperator *sep)
|
|||||||
target = c->GetTarget()->CastToClient();
|
target = c->GetTarget()->CastToClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
target->SetBindPoint();
|
bool bind_allowed = (
|
||||||
|
!zone->GetInstanceID() ||
|
||||||
bool in_persistent_instance = (
|
(
|
||||||
zone->GetInstanceID() != 0 &&
|
zone->GetInstanceID() != 0 &&
|
||||||
zone->IsInstancePersistent()
|
zone->IsInstancePersistent()
|
||||||
);
|
|
||||||
|
|
||||||
auto target_string = (
|
|
||||||
c == target ?
|
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!bind_allowed) {
|
||||||
|
c->Message(Chat::White, "Yu cannot bind here.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
target->SetBindPoint();
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Set Bind Point for {} | Zone: {} ({}) ID: {} {}",
|
"Set Bind Point for {} | Zone: {}",
|
||||||
target_string,
|
c->GetTargetDescription(target),
|
||||||
zone->GetLongName(),
|
zone->GetZoneDescription()
|
||||||
zone->GetShortName(),
|
|
||||||
zone->GetZoneID(),
|
|
||||||
(
|
|
||||||
in_persistent_instance ?
|
|
||||||
fmt::format(
|
|
||||||
" Instance ID: {}",
|
|
||||||
zone->GetInstanceID()
|
|
||||||
) :
|
|
||||||
""
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -47,7 +35,7 @@ void command_bind(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Set Bind Point for {} | XYZ: {:.2f}, {:.2f}, {:.2f}",
|
"Set Bind Point for {} | XYZ: {:.2f}, {:.2f}, {:.2f}",
|
||||||
target_string,
|
c->GetTargetDescription(target),
|
||||||
target->GetX(),
|
target->GetX(),
|
||||||
target->GetY(),
|
target->GetY(),
|
||||||
target->GetZ()
|
target->GetZ()
|
||||||
|
|||||||
@ -54,15 +54,7 @@ void command_castspell(Client *c, const Seperator *sep)
|
|||||||
"Cast {} ({}) on {}{}.",
|
"Cast {} ({}) on {}{}.",
|
||||||
GetSpellName(spell_id),
|
GetSpellName(spell_id),
|
||||||
spell_id,
|
spell_id,
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
instant_cast ? " instantly" : ""
|
instant_cast ? " instantly" : ""
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -4,16 +4,19 @@ void command_checklos(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
if (!c->GetTarget()) {
|
if (!c->GetTarget()) {
|
||||||
c->Message(Chat::White, "You must have a target to use this command.");
|
c->Message(Chat::White, "You must have a target to use this command.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool has_los = c->CheckLosFN(c->GetTarget());
|
auto target = c->GetTarget();
|
||||||
|
|
||||||
|
bool has_los = c->CheckLosFN(target);
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"You {}have line of sight to {} ({}).",
|
"You {}have line of sight to {}.",
|
||||||
has_los ? "" : "do not ",
|
has_los ? "" : "do not ",
|
||||||
c->GetTarget()->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
c->GetTarget()->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,10 +110,9 @@ void command_corpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Deleting {} corpse {} ({}).",
|
"Deleting {} corpse {}.",
|
||||||
target->IsNPCCorpse() ? "NPC" : "player",
|
target->IsNPCCorpse() ? "NPC" : "player",
|
||||||
target->GetName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
target->CastToCorpse()->Delete();
|
target->CastToCorpse()->Delete();
|
||||||
@ -155,11 +154,10 @@ void command_corpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Setting the owner to {} ({}) for the player corpse {} ({}).",
|
"Setting the owner to {} ({}) for the player corpse {}.",
|
||||||
database.GetCharNameByID(character_id),
|
database.GetCharNameByID(character_id),
|
||||||
target->CastToCorpse()->SetCharID(character_id),
|
target->CastToCorpse()->SetCharID(character_id),
|
||||||
target->GetName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -181,10 +179,9 @@ void command_corpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Reset looter for {} corpse {} ({}).",
|
"Reset looter for {} corpse {}.",
|
||||||
target->IsNPCCorpse() ? "NPC" : "player",
|
target->IsNPCCorpse() ? "NPC" : "player",
|
||||||
target->GetName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else if (is_remove_cash) {
|
} else if (is_remove_cash) {
|
||||||
@ -206,10 +203,9 @@ void command_corpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Removed cash from {} corpse {} ({}).",
|
"Removed cash from {} corpse {}.",
|
||||||
target->IsNPCCorpse() ? "NPC" : "player",
|
target->IsNPCCorpse() ? "NPC" : "player",
|
||||||
target->GetName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -240,10 +236,9 @@ void command_corpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Locking {} corpse {} ({}).",
|
"Locking {} corpse {}.",
|
||||||
target->IsNPCCorpse() ? "NPC" : "player",
|
target->IsNPCCorpse() ? "NPC" : "player",
|
||||||
target->GetName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else if (is_unlock) {
|
} else if (is_unlock) {
|
||||||
@ -261,10 +256,9 @@ void command_corpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Unlocking {} corpse {} ({}).",
|
"Unlocking {} corpse {}.",
|
||||||
target->IsNPCCorpse() ? "NPC" : "player",
|
target->IsNPCCorpse() ? "NPC" : "player",
|
||||||
target->GetName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else if (is_depop) {
|
} else if (is_depop) {
|
||||||
@ -286,9 +280,8 @@ void command_corpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Depopping player corpse {} ({}).",
|
"Depopping player corpse {}.",
|
||||||
target->GetName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
target->CastToCorpse()->DepopPlayerCorpse();
|
target->CastToCorpse()->DepopPlayerCorpse();
|
||||||
@ -318,9 +311,8 @@ void command_corpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Depopping all player corpses for {} ({}).",
|
"Depopping all player corpses for {}.",
|
||||||
target->GetName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
target->CastToClient()->DepopAllCorpses();
|
target->CastToClient()->DepopAllCorpses();
|
||||||
|
|||||||
@ -42,15 +42,7 @@ void command_countitem(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} {} {} {}.",
|
"{} {} {} {}.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
(
|
(
|
||||||
item_count ?
|
item_count ?
|
||||||
|
|||||||
@ -8,9 +8,8 @@ void command_distance(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is {:.2f} units from you.",
|
"{} is {:.2f} units from you.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
Distance(
|
Distance(
|
||||||
c->GetPosition(),
|
c->GetPosition(),
|
||||||
target->GetPosition()
|
target->GetPosition()
|
||||||
|
|||||||
@ -20,15 +20,7 @@ void command_endurance(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Set {} to full Endurance ({}).",
|
"Set {} to full Endurance ({}).",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
endurance
|
endurance
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -154,16 +154,13 @@ void command_faction(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
else if (!strcasecmp(sep->arg[1], "view")) {
|
else if (!strcasecmp(sep->arg[1], "view")) {
|
||||||
if (c->GetTarget() && c->GetTarget()->IsNPC()) {
|
if (c->GetTarget() && c->GetTarget()->IsNPC()) {
|
||||||
Mob *target = c->GetTarget();
|
auto target = c->GetTarget();
|
||||||
uint32 npc_id = target->GetNPCTypeID();
|
auto npc_faction_id = target->CastToNPC()->GetPrimaryFaction();
|
||||||
uint32 npc_faction_id = target->CastToNPC()->GetPrimaryFaction();
|
|
||||||
std::string npc_name = target->GetCleanName();
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) has a Primary Faction of {} ({}).",
|
"{} has a Primary Faction of {} ({}).",
|
||||||
npc_name,
|
c->GetTargetDescription(target),
|
||||||
npc_id,
|
|
||||||
content_db.GetFactionName(npc_faction_id),
|
content_db.GetFactionName(npc_faction_id),
|
||||||
npc_faction_id
|
npc_faction_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -210,15 +210,7 @@ void command_feature(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"{} set for {} to {}.",
|
"{} set for {} to {}.",
|
||||||
feature_changed,
|
feature_changed,
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
is_size ?
|
is_size ?
|
||||||
fmt::format(
|
fmt::format(
|
||||||
|
|||||||
@ -99,13 +99,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} now {} the flag for {} ({}).",
|
"{} now {} the flag for {} ({}).",
|
||||||
c == target ?
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
zone_long_name,
|
zone_long_name,
|
||||||
zone_id
|
zone_id
|
||||||
@ -229,13 +223,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} no longer {} the flag for {} ({}).",
|
"{} no longer {} the flag for {} ({}).",
|
||||||
c == target ?
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
zone_long_name,
|
zone_long_name,
|
||||||
zone_id
|
zone_id
|
||||||
|
|||||||
@ -28,15 +28,7 @@ void command_flymode(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Fly Mode for {} is now {} ({}).",
|
"Fly Mode for {} is now {} ({}).",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
EQ::constants::GetFlyModeName(flymode_id),
|
EQ::constants::GetFlyModeName(flymode_id),
|
||||||
flymode_id
|
flymode_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -2,41 +2,42 @@
|
|||||||
|
|
||||||
void command_fov(Client *c, const Seperator *sep)
|
void command_fov(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (c->GetTarget()) {
|
if (!c->GetTarget()) {
|
||||||
auto target = c->GetTarget();
|
|
||||||
std::string behind_message = (
|
|
||||||
c->BehindMob(
|
|
||||||
target,
|
|
||||||
c->GetX(),
|
|
||||||
c->GetY()
|
|
||||||
) ?
|
|
||||||
"behind" :
|
|
||||||
"not behind"
|
|
||||||
);
|
|
||||||
std::string gender_message = (
|
|
||||||
target->GetGender() == MALE ?
|
|
||||||
"he" :
|
|
||||||
(
|
|
||||||
target->GetGender() == FEMALE ?
|
|
||||||
"she" :
|
|
||||||
"it"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
c->Message(
|
|
||||||
Chat::White,
|
|
||||||
fmt::format(
|
|
||||||
"You are {} {} ({}), {} has a heading of {}.",
|
|
||||||
behind_message,
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID(),
|
|
||||||
gender_message,
|
|
||||||
target->GetHeading()
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
c->Message(Chat::White, "You must have a target to use this command.");
|
c->Message(Chat::White, "You must have a target to use this command.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto target = c->GetTarget();
|
||||||
|
|
||||||
|
std::string behind_message = (
|
||||||
|
c->BehindMob(
|
||||||
|
target,
|
||||||
|
c->GetX(),
|
||||||
|
c->GetY()
|
||||||
|
) ?
|
||||||
|
"behind" :
|
||||||
|
"not behind"
|
||||||
|
);
|
||||||
|
|
||||||
|
std::string gender_message = (
|
||||||
|
target->GetGender() == MALE ?
|
||||||
|
"he" :
|
||||||
|
(
|
||||||
|
target->GetGender() == FEMALE ?
|
||||||
|
"she" :
|
||||||
|
"it"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"You are {} {}, {} has a heading of {}.",
|
||||||
|
behind_message,
|
||||||
|
c->GetTargetDescription(target),
|
||||||
|
gender_message,
|
||||||
|
target->GetHeading()
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,15 +2,25 @@
|
|||||||
|
|
||||||
void command_freeze(Client *c, const Seperator *sep)
|
void command_freeze(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (c->GetTarget()) {
|
if (!c->GetTarget()) {
|
||||||
auto target = c->GetTarget();
|
|
||||||
if (target != c) {
|
|
||||||
target->SendAppearancePacket(AT_Anim, ANIM_FREEZE);
|
|
||||||
} else {
|
|
||||||
c->Message(Chat::White, "You cannot freeze yourself.");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
c->Message(Chat::White, "You must have a target to use this command.");
|
c->Message(Chat::White, "You must have a target to use this command.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto target = c->GetTarget();
|
||||||
|
if (c == target) {
|
||||||
|
c->Message(Chat::White, "You cannot freeze yourself.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
target->SendAppearancePacket(AT_Anim, ANIM_FREEZE);
|
||||||
|
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"You have frozen {}.",
|
||||||
|
c->GetTargetDescription(target)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,15 +30,7 @@ void command_gender(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Gender changed for {} to {} ({}).",
|
"Gender changed for {} to {} ({}).",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
GetGenderName(gender_id),
|
GetGenderName(gender_id),
|
||||||
gender_id
|
gender_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -12,16 +12,9 @@ void command_getplayerburiedcorpsecount(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} {} buried corpse{}.",
|
"{} {} {} buried corpse{}.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
c == target ? "have" : "has",
|
||||||
"You have" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) has",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
corpse_count ?
|
corpse_count ?
|
||||||
std::to_string(corpse_count) :
|
std::to_string(corpse_count) :
|
||||||
|
|||||||
@ -13,16 +13,9 @@ void command_ginfo(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} not in a group.",
|
"{} {} not in a group.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
c == target ? "are" : "is"
|
||||||
"You are" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) is",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -30,13 +23,7 @@ void command_ginfo(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
std::string popup_title = fmt::format(
|
std::string popup_title = fmt::format(
|
||||||
"Group Info for {}",
|
"Group Info for {}",
|
||||||
c == target ?
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf)
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
std::string popup_text = "<table>";
|
std::string popup_text = "<table>";
|
||||||
popup_text += fmt::format(
|
popup_text += fmt::format(
|
||||||
|
|||||||
@ -36,15 +36,7 @@ void command_givemoney(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"Added {} to {}.",
|
"Added {} to {}.",
|
||||||
ConvertMoneyToString(platinum, gold, silver, copper),
|
ConvertMoneyToString(platinum, gold, silver, copper),
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,8 @@ void command_gm(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is {} flagged as a GM.",
|
"{} is {} flagged as a GM.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
gm_flag ? "now" : "no longer"
|
gm_flag ? "now" : "no longer"
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -24,15 +24,7 @@ void command_gmspeed(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"Turning GM Speed {} for {}.",
|
"Turning GM Speed {} for {}.",
|
||||||
gm_speed_flag ? "on" : "off",
|
gm_speed_flag ? "on" : "off",
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -40,15 +32,7 @@ void command_gmspeed(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Note: {} must zone for it to take effect.",
|
"Note: {} must zone for it to take effect.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou)
|
||||||
c == target ?
|
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -519,16 +519,18 @@ void command_guild(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} is not in a guild.",
|
"{} {} not in a guild.",
|
||||||
client->GetCleanName()
|
c->GetTargetDescription(client, TargetDescriptionType::UCYou),
|
||||||
|
c == target ? "are" : "is"
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else if (guild_mgr.IsGuildLeader(client->GuildID(), client->CharacterID())) {
|
} else if (guild_mgr.IsGuildLeader(client->GuildID(), client->CharacterID())) {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} is the leader of {}.",
|
"{} {} the leader of {}.",
|
||||||
client->GetName(),
|
c->GetTargetDescription(client, TargetDescriptionType::UCYou),
|
||||||
|
c == target ? "are" : "is",
|
||||||
guild_mgr.GetGuildNameByID(client->GuildID())
|
guild_mgr.GetGuildNameByID(client->GuildID())
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -536,8 +538,9 @@ void command_guild(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} is a(n) {} of {}.",
|
"{} {} a(n) {} of {}.",
|
||||||
client->GetName(),
|
c->GetTargetDescription(client, TargetDescriptionType::UCYou),
|
||||||
|
c == target ? "are" : "is",
|
||||||
guild_mgr.GetRankName(client->GuildID(), client->GuildRank()),
|
guild_mgr.GetRankName(client->GuildID(), client->GuildRank()),
|
||||||
guild_mgr.GetGuildNameByID(client->GuildID())
|
guild_mgr.GetGuildNameByID(client->GuildID())
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -13,15 +13,7 @@ void command_heal(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Set {} to full Health ({}).",
|
"Set {} to full Health ({}).",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
target->GetMaxHP()
|
target->GetMaxHP()
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -100,29 +100,19 @@ void command_instance(Client *c, const Seperator *sep)
|
|||||||
uint32 zone_id = database.ZoneIDFromInstanceID(instance_id);
|
uint32 zone_id = database.ZoneIDFromInstanceID(instance_id);
|
||||||
uint32 version = database.VersionFromInstanceID(instance_id);
|
uint32 version = database.VersionFromInstanceID(instance_id);
|
||||||
uint32 current_id = database.GetInstanceID(zone_id, character_id, version);
|
uint32 current_id = database.GetInstanceID(zone_id, character_id, version);
|
||||||
if (!current_id) {
|
if (!current_id) {
|
||||||
std::string target_string = (
|
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
character_name,
|
|
||||||
character_id
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
(
|
(
|
||||||
database.AddClientToInstance(instance_id, character_id) ?
|
database.AddClientToInstance(instance_id, character_id) ?
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Added {} to Instance ID {}.",
|
"Added {} to Instance ID {}.",
|
||||||
target_string,
|
c->GetTargetDescription(target),
|
||||||
instance_id
|
instance_id
|
||||||
) :
|
) :
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Failed to add {} to Instance ID {}.",
|
"Failed to add {} to Instance ID {}.",
|
||||||
target_string,
|
c->GetTargetDescription(target),
|
||||||
instance_id
|
instance_id
|
||||||
)
|
)
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -297,28 +287,18 @@ void command_instance(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string target_string = (
|
|
||||||
c->CharacterID() == character_id ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
character_name,
|
|
||||||
character_id
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
(
|
(
|
||||||
database.RemoveClientFromInstance(instance_id, character_id) ?
|
database.RemoveClientFromInstance(instance_id, character_id) ?
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Removed {} from Instance ID {}.",
|
"Removed {} from Instance ID {}.",
|
||||||
target_string,
|
c->GetTargetDescription(target),
|
||||||
instance_id
|
instance_id
|
||||||
) :
|
) :
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Failed to remove {} from Instance ID {}.",
|
"Failed to remove {} from Instance ID {}.",
|
||||||
target_string,
|
c->GetTargetDescription(target),
|
||||||
instance_id
|
instance_id
|
||||||
)
|
)
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -19,7 +19,7 @@ void command_invul(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} {} now {}.",
|
"{} {} now {}.",
|
||||||
c == target ? "You" : target->GetCleanName(),
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ? "are" : "is",
|
c == target ? "are" : "is",
|
||||||
invul_flag ? "invulnerable" : "vulnerable"
|
invul_flag ? "invulnerable" : "vulnerable"
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -20,15 +20,7 @@ void command_lastname(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} now {} a last name of '{}'.",
|
"{} now {} a last name of '{}'.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
last_name
|
last_name
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -13,15 +13,7 @@ void command_loc(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Location for {} | XYZ: {:.2f}, {:.2f}, {:.2f} Heading: {:.2f}",
|
"Location for {} | XYZ: {:.2f}, {:.2f}, {:.2f} Heading: {:.2f}",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
c == target ?
|
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
target_position.x,
|
target_position.x,
|
||||||
target_position.y,
|
target_position.y,
|
||||||
target_position.z,
|
target_position.z,
|
||||||
|
|||||||
@ -17,15 +17,7 @@ void command_mana(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Set {} to full Mana ({}).",
|
"Set {} to full Mana ({}).",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
mana
|
mana
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -33,16 +33,9 @@ void command_memspell(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} not have a place to memorize {} ({}).",
|
"{} {} not have a place to memorize {} ({}).",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
c == target ? "do" : "does",
|
||||||
"You do" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) does",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
GetSpellName(spell_id),
|
GetSpellName(spell_id),
|
||||||
spell_id
|
spell_id
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -68,12 +61,11 @@ void command_memspell(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) memorized to spell gem {} for {} ({}).",
|
"{} ({}) memorized to spell gem {} for {}.",
|
||||||
GetSpellName(spell_id),
|
GetSpellName(spell_id),
|
||||||
spell_id,
|
spell_id,
|
||||||
spell_gem,
|
spell_gem,
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,93 +2,84 @@
|
|||||||
|
|
||||||
void command_npccast(Client *c, const Seperator *sep)
|
void command_npccast(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (c->GetTarget() && c->GetTarget()->IsNPC()) {
|
if (!c->GetTarget() || !c->GetTarget()->IsNPC()) {
|
||||||
NPC *target = c->GetTarget()->CastToNPC();
|
|
||||||
if (!sep->IsNumber(1) && sep->arg[1] && sep->IsNumber(2)) {
|
|
||||||
const char *entity_name = sep->arg[1] ? sep->arg[1] : 0;
|
|
||||||
auto spell_id = sep->arg[2] ? std::stoul(sep->arg[2]) : 0;
|
|
||||||
Mob *spell_target = entity_list.GetMob(entity_name);
|
|
||||||
if (spell_target && IsValidSpell(spell_id) && spell_id < SPDAT_RECORDS) {
|
|
||||||
c->Message(
|
|
||||||
Chat::White,
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) casting {} ({}) on {} ({}).",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID(),
|
|
||||||
GetSpellName(static_cast<uint16>(spell_id)),
|
|
||||||
spell_id,
|
|
||||||
spell_target->GetCleanName(),
|
|
||||||
spell_target->GetID()
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
|
|
||||||
target->CastSpell(spell_id, spell_target->GetID());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!spell_target) {
|
|
||||||
c->Message(
|
|
||||||
Chat::White,
|
|
||||||
fmt::format(
|
|
||||||
"Entity {} was not found",
|
|
||||||
entity_name
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else if (!spell_id || !IsValidSpell(spell_id)) {
|
|
||||||
c->Message(
|
|
||||||
Chat::White,
|
|
||||||
fmt::format(
|
|
||||||
"Spell ID {} was not found",
|
|
||||||
spell_id
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (sep->IsNumber(1) && sep->IsNumber(2)) {
|
|
||||||
uint16 entity_id = sep->arg[1] ? std::stoul(sep->arg[1]) : 0;
|
|
||||||
auto spell_id = sep->arg[2] ? std::stoul(sep->arg[2]) : 0;
|
|
||||||
Mob *spell_target = entity_list.GetMob(entity_id);
|
|
||||||
if (spell_target && IsValidSpell(spell_id) && spell_id < SPDAT_RECORDS) {
|
|
||||||
c->Message(
|
|
||||||
Chat::White,
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) casting {} ({}) on {} ({}).",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID(),
|
|
||||||
GetSpellName(static_cast<uint16>(spell_id)),
|
|
||||||
spell_id,
|
|
||||||
spell_target->GetCleanName(),
|
|
||||||
spell_target->GetID()
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
|
|
||||||
target->CastSpell(spell_id, spell_target->GetID());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!spell_target) {
|
|
||||||
c->Message(
|
|
||||||
Chat::White,
|
|
||||||
fmt::format(
|
|
||||||
"Entity ID {} was not found",
|
|
||||||
entity_id
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else if (!spell_id || !IsValidSpell(spell_id)) {
|
|
||||||
c->Message(
|
|
||||||
Chat::White,
|
|
||||||
fmt::format(
|
|
||||||
"Spell ID {} was not found",
|
|
||||||
spell_id
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
c->Message(Chat::White, "You must target an NPC to use this command.");
|
c->Message(Chat::White, "You must target an NPC to use this command.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto target = c->GetTarget()->CastToNPC();
|
||||||
|
if (!sep->IsNumber(1) && sep->arg[1] && sep->IsNumber(2)) {
|
||||||
|
std::string entity_name = sep->arg[1] ? sep->arg[1] : 0;
|
||||||
|
auto spell_id = sep->arg[2] ? std::stoul(sep->arg[2]) : 0;
|
||||||
|
auto spell_target = entity_list.GetMob(entity_name.c_str());
|
||||||
|
if (spell_target && IsValidSpell(spell_id) && spell_id < SPDAT_RECORDS) {
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"{} casting {} ({}) on {}.",
|
||||||
|
c->GetTargetDescription(target),
|
||||||
|
GetSpellName(static_cast<uint16>(spell_id)),
|
||||||
|
spell_id,
|
||||||
|
c->GetTargetDescription(spell_target)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
target->CastSpell(spell_id, spell_target->GetID());
|
||||||
|
} else {
|
||||||
|
if (!spell_target) {
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"Entity {} was not found",
|
||||||
|
entity_name
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
} else if (!spell_id || !IsValidSpell(spell_id)) {
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"Spell ID {} was not found",
|
||||||
|
spell_id
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (sep->IsNumber(1) && sep->IsNumber(2)) {
|
||||||
|
uint16 entity_id = static_cast<uint16>(std::stoul(sep->arg[1]));
|
||||||
|
auto spell_id = std::stoul(sep->arg[2]);
|
||||||
|
auto spell_target = entity_list.GetMob(entity_id);
|
||||||
|
if (spell_target && IsValidSpell(spell_id) && spell_id < SPDAT_RECORDS) {
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"{} casting {} ({}) on {}.",
|
||||||
|
c->GetTargetDescription(target),
|
||||||
|
GetSpellName(static_cast<uint16>(spell_id)),
|
||||||
|
spell_id,
|
||||||
|
c->GetTargetDescription(spell_target)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
target->CastSpell(spell_id, spell_target->GetID());
|
||||||
|
} else {
|
||||||
|
if (!spell_target) {
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"Entity ID {} was not found",
|
||||||
|
entity_id
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
} else if (!spell_id || !IsValidSpell(spell_id)) {
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"Spell ID {} was not found",
|
||||||
|
spell_id
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,9 @@ void command_npcloot(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
c->GetTarget()->CastToNPC()->AddItem(
|
auto target = c->GetTarget();
|
||||||
|
|
||||||
|
target->CastToNPC()->AddItem(
|
||||||
item_id,
|
item_id,
|
||||||
item_charges,
|
item_charges,
|
||||||
equip_item,
|
equip_item,
|
||||||
@ -97,11 +99,10 @@ void command_npcloot(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Added {} ({}) to {} ({}).",
|
"Added {} ({}) to {}.",
|
||||||
item_link,
|
item_link,
|
||||||
item_id,
|
item_id,
|
||||||
c->GetTarget()->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
c->GetTarget()->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else if (is_money) {
|
} else if (is_money) {
|
||||||
@ -143,9 +144,8 @@ void command_npcloot(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) now has {}.",
|
"{} now has {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
money_string
|
money_string
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -172,12 +172,11 @@ void command_npcloot(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Removed {} {} ({}) from {} ({}).",
|
"Removed {} {} ({}) from {}.",
|
||||||
item_count,
|
item_count,
|
||||||
database.CreateItemLink(item_id),
|
database.CreateItemLink(item_id),
|
||||||
item_id,
|
item_id,
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -188,20 +187,18 @@ void command_npcloot(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) has no items to remove.",
|
"{} has no items to remove.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} Item{} removed from {} ({}).",
|
"{} Item{} removed from {}.",
|
||||||
total_item_count,
|
total_item_count,
|
||||||
total_item_count != 1 ? "s" : "",
|
total_item_count != 1 ? "s" : "",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -214,21 +211,19 @@ void command_npcloot(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Removed {} {} ({}) from {} ({}).",
|
"Removed {} {} ({}) from {}.",
|
||||||
item_count,
|
item_count,
|
||||||
database.CreateItemLink(item_id),
|
database.CreateItemLink(item_id),
|
||||||
item_id,
|
item_id,
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) does not have any {} ({}).",
|
"{} does not have any {} ({}).",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
database.CreateItemLink(item_id),
|
database.CreateItemLink(item_id),
|
||||||
item_id
|
item_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -2,26 +2,31 @@
|
|||||||
|
|
||||||
void command_npcspawn(Client *c, const Seperator *sep)
|
void command_npcspawn(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
|
if (!c->GetTarget() || !c->GetTarget()->IsNPC()) {
|
||||||
|
c->Message(Chat::White, "You must target an NPC to use this command.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int arguments = sep->argnum;
|
int arguments = sep->argnum;
|
||||||
if (!arguments) {
|
if (!arguments) {
|
||||||
c->Message(Chat::White, "Command Syntax: #npcspawn [Add|Create|Delete|Remove|Update]");
|
c->Message(Chat::White, "Command Syntax: #npcspawn [Add|Create|Delete|Remove|Update]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(c->GetTarget() && c->GetTarget()->IsNPC())) {
|
auto target = c->GetTarget()->CastToNPC();
|
||||||
c->Message(Chat::White, "You must target an NPC to use this command.");
|
uint32 extra = 0;
|
||||||
return;
|
bool is_add = !strcasecmp(sep->arg[1], "add");
|
||||||
}
|
bool is_create = !strcasecmp(sep->arg[1], "create");
|
||||||
|
bool is_delete = !strcasecmp(sep->arg[1], "delete");
|
||||||
NPC *target = c->GetTarget()->CastToNPC();
|
bool is_remove = !strcasecmp(sep->arg[1], "remove");
|
||||||
std::string spawn_type = str_tolower(sep->arg[1]);
|
bool is_update = !strcasecmp(sep->arg[1], "update");
|
||||||
uint32 extra = 0;
|
if (
|
||||||
bool is_add = spawn_type.find("add") != std::string::npos;
|
!is_add &&
|
||||||
bool is_create = spawn_type.find("create") != std::string::npos;
|
!is_create &&
|
||||||
bool is_delete = spawn_type.find("delete") != std::string::npos;
|
!is_delete &&
|
||||||
bool is_remove = spawn_type.find("remove") != std::string::npos;
|
!is_remove &&
|
||||||
bool is_update = spawn_type.find("update") != std::string::npos;
|
!is_update
|
||||||
if (!is_add && !is_create && !is_delete && !is_remove && !is_update) {
|
) {
|
||||||
c->Message(Chat::White, "Command Syntax: #npcspawn [Add|Create|Delete|Remove|Update]");
|
c->Message(Chat::White, "Command Syntax: #npcspawn [Add|Create|Delete|Remove|Update]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -29,16 +34,17 @@ void command_npcspawn(Client *c, const Seperator *sep)
|
|||||||
if (is_add || is_create) {
|
if (is_add || is_create) {
|
||||||
extra = (
|
extra = (
|
||||||
sep->IsNumber(2) ?
|
sep->IsNumber(2) ?
|
||||||
(
|
(
|
||||||
is_add ?
|
|
||||||
std::stoi(sep->arg[2]) :
|
|
||||||
1
|
|
||||||
) : (
|
|
||||||
is_add ?
|
is_add ?
|
||||||
1200 :
|
std::stoi(sep->arg[2]) :
|
||||||
0
|
1
|
||||||
|
) : (
|
||||||
|
is_add ?
|
||||||
|
1200 :
|
||||||
|
0
|
||||||
)
|
)
|
||||||
); // Default to 1200 for Add, 0 for Create if not set
|
); // Default to 1200 for Add, 0 for Create if not set
|
||||||
|
|
||||||
content_db.NPCSpawnDB(
|
content_db.NPCSpawnDB(
|
||||||
is_add ? NPCSpawnTypes::AddNewSpawngroup : NPCSpawnTypes::CreateNewSpawn,
|
is_add ? NPCSpawnTypes::AddNewSpawngroup : NPCSpawnTypes::CreateNewSpawn,
|
||||||
zone->GetShortName(),
|
zone->GetShortName(),
|
||||||
@ -47,35 +53,37 @@ void command_npcspawn(Client *c, const Seperator *sep)
|
|||||||
target,
|
target,
|
||||||
extra
|
extra
|
||||||
);
|
);
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Spawn {} | Name: {} ({})",
|
"Spawn {} | Name: {}",
|
||||||
is_add ? "Added" : "Created",
|
is_add ? "Added" : "Created",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (is_delete || is_remove || is_update) {
|
else if (is_delete || is_remove || is_update) {
|
||||||
uint8 spawn_update_type = (
|
uint8 spawn_update_type = (
|
||||||
is_delete ?
|
is_delete ?
|
||||||
NPCSpawnTypes::DeleteSpawn :
|
NPCSpawnTypes::DeleteSpawn :
|
||||||
(
|
(
|
||||||
is_remove ?
|
is_remove ?
|
||||||
NPCSpawnTypes::RemoveSpawn :
|
NPCSpawnTypes::RemoveSpawn :
|
||||||
NPCSpawnTypes::UpdateAppearance
|
NPCSpawnTypes::UpdateAppearance
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
std::string spawn_message = (
|
|
||||||
|
std::string spawn_message = (
|
||||||
is_delete ?
|
is_delete ?
|
||||||
"Deleted" :
|
"Deleted" :
|
||||||
(
|
(
|
||||||
is_remove ?
|
is_remove ?
|
||||||
"Removed" :
|
"Removed" :
|
||||||
"Updated"
|
"Updated"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
content_db.NPCSpawnDB(
|
content_db.NPCSpawnDB(
|
||||||
spawn_update_type,
|
spawn_update_type,
|
||||||
zone->GetShortName(),
|
zone->GetShortName(),
|
||||||
@ -83,13 +91,13 @@ void command_npcspawn(Client *c, const Seperator *sep)
|
|||||||
c,
|
c,
|
||||||
target
|
target
|
||||||
);
|
);
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Spawn {} | Name: {} ({})",
|
"Spawn {} | Name: {}",
|
||||||
spawn_message,
|
spawn_message,
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,15 +32,7 @@ void command_nukebuffs(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"Faded all{} buffs for {}.",
|
"Faded all{} buffs for {}.",
|
||||||
buff_type,
|
buff_type,
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,15 +23,7 @@ void command_nukeitem(Client *c, const Seperator *sep)
|
|||||||
deleted_count,
|
deleted_count,
|
||||||
database.CreateItemLink(item_id),
|
database.CreateItemLink(item_id),
|
||||||
item_id,
|
item_id,
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -41,15 +33,7 @@ void command_nukeitem(Client *c, const Seperator *sep)
|
|||||||
"Could not find any {} ({}) to delete from {}.",
|
"Could not find any {} ({}) to delete from {}.",
|
||||||
database.CreateItemLink(item_id),
|
database.CreateItemLink(item_id),
|
||||||
item_id,
|
item_id,
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,9 +95,8 @@ void command_peqzone(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"You are already in {} ({}).",
|
"You are already in {}.",
|
||||||
zone->GetLongName(),
|
zone->GetZoneDescription()
|
||||||
zone->GetShortName()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -17,7 +17,7 @@ void command_permaclass(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
LogInfo("Class changed by {} for {} to {} ({})",
|
LogInfo("Class changed by {} for {} to {} ({})",
|
||||||
c->GetCleanName(),
|
c->GetCleanName(),
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
GetClassIDName(class_id),
|
GetClassIDName(class_id),
|
||||||
class_id
|
class_id
|
||||||
);
|
);
|
||||||
@ -31,7 +31,7 @@ void command_permaclass(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Class changed for {} to {} ({}).",
|
"Class changed for {} to {} ({}).",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
GetClassIDName(class_id),
|
GetClassIDName(class_id),
|
||||||
class_id
|
class_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -23,7 +23,7 @@ void command_permagender(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
LogInfo("Gender changed by {} for {} to {} ({})",
|
LogInfo("Gender changed by {} for {} to {} ({})",
|
||||||
c->GetCleanName(),
|
c->GetCleanName(),
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
GetGenderName(gender_id),
|
GetGenderName(gender_id),
|
||||||
gender_id
|
gender_id
|
||||||
);
|
);
|
||||||
@ -36,15 +36,7 @@ void command_permagender(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Gender changed for {} to {} ({}).",
|
"Gender changed for {} to {} ({}).",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
GetGenderName(gender_id),
|
GetGenderName(gender_id),
|
||||||
gender_id
|
gender_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -22,7 +22,7 @@ void command_permarace(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
LogInfo("Race changed by {} for {} to {} ({})",
|
LogInfo("Race changed by {} for {} to {} ({})",
|
||||||
c->GetCleanName(),
|
c->GetCleanName(),
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
GetRaceIDName(race_id),
|
GetRaceIDName(race_id),
|
||||||
race_id
|
race_id
|
||||||
);
|
);
|
||||||
@ -36,15 +36,7 @@ void command_permarace(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Race changed for {} to {} ({}).",
|
"Race changed for {} to {} ({}).",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
GetRaceIDName(race_id),
|
GetRaceIDName(race_id),
|
||||||
race_id
|
race_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -27,9 +27,8 @@ void command_push(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Pushing {} ({}) with a push back of {:.2f} and a push up of {:.2f}.",
|
"Pushing {} with a push back of {:.2f} and a push up of {:.2f}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
back,
|
back,
|
||||||
up
|
up
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -19,8 +19,9 @@ void command_pvp(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} now follows the ways of {}.",
|
"{} now follow{} the ways of {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
|
c != target ? "s" : "",
|
||||||
pvp_state ? "Discord" : "Order"
|
pvp_state ? "Discord" : "Order"
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -43,9 +43,8 @@ void command_qglobal(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Failed to disable quest global flag for {} ({}).",
|
"Failed to disable quest global flag for {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -60,9 +59,8 @@ void command_qglobal(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) will no longer be able to view quest globals, {} them to apply this change.",
|
"{} will no longer be able to view quest globals, {} them to apply this change.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
repop_link
|
repop_link
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -78,9 +76,8 @@ void command_qglobal(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Failed to enable quest global flag for {} ({}).",
|
"Failed to enable quest global flag for {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -95,9 +92,8 @@ void command_qglobal(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) will now be able to view quest globals, {} them to apply this change.",
|
"{} will now be able to view quest globals, {} them to apply this change.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
repop_link
|
repop_link
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -118,9 +114,8 @@ void command_qglobal(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) {} view quest globals.",
|
"{} {} view quest globals.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
npc_type->qglobal ? "can" : "cannot"
|
npc_type->qglobal ? "can" : "cannot"
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -13,18 +13,20 @@ void command_randomfeatures(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) has had their features randomized.",
|
"{} {} had {} features randomized.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
target->GetID()
|
c == target ? "have" : "had",
|
||||||
|
c == target ? "your" : "their"
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is not a player race, their race is {} ({}).",
|
"{} {} not a player race, {} race is {} ({}).",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
target->GetID(),
|
c == target ? "are" : "is",
|
||||||
|
c == target ? "your" : "their",
|
||||||
GetRaceIDName(target->GetRace()),
|
GetRaceIDName(target->GetRace()),
|
||||||
target->GetRace()
|
target->GetRace()
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -14,16 +14,9 @@ void command_refreshgroup(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} not in a group.",
|
"{} {} not in a group.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
c == target ? "are" : "is"
|
||||||
"You are" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}} is",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -35,15 +28,7 @@ void command_refreshgroup(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Group has been refreshed for {}.",
|
"Group has been refreshed for {}.",
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
void command_reloadzps(Client *c, const Seperator *sep)
|
void command_reloadzps(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
content_db.LoadStaticZonePoints(&zone->zone_point_list, zone->GetShortName(), zone->GetInstanceVersion());
|
c->Message(Chat::White, "Attempting to reloading server zone points globally.");
|
||||||
c->Message(Chat::White, "Reloading server zone_points.");
|
auto pack = new ServerPacket(ServerOP_ReloadZonePoints, 0);
|
||||||
|
worldserver.SendPacket(pack);
|
||||||
|
safe_delete(pack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,16 +12,6 @@ void command_removeitem(Client *c, const Seperator *sep)
|
|||||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||||
target = c->GetTarget()->CastToClient();
|
target = c->GetTarget()->CastToClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto target_string = (
|
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
auto item_id = std::stoi(sep->arg[1]);
|
auto item_id = std::stoi(sep->arg[1]);
|
||||||
if (!database.GetItem(item_id)) {
|
if (!database.GetItem(item_id)) {
|
||||||
@ -49,7 +39,7 @@ void command_removeitem(Client *c, const Seperator *sep)
|
|||||||
amount,
|
amount,
|
||||||
item_link,
|
item_link,
|
||||||
item_id,
|
item_id,
|
||||||
target_string
|
c->GetTargetDescription(target)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -62,7 +52,7 @@ void command_removeitem(Client *c, const Seperator *sep)
|
|||||||
item_count,
|
item_count,
|
||||||
item_link,
|
item_link,
|
||||||
item_id,
|
item_id,
|
||||||
target_string,
|
c->GetTargetDescription(target),
|
||||||
c == target ? "you" : "they",
|
c == target ? "you" : "they",
|
||||||
amount,
|
amount,
|
||||||
item_link,
|
item_link,
|
||||||
@ -77,7 +67,7 @@ void command_removeitem(Client *c, const Seperator *sep)
|
|||||||
"Could not find any {} ({}) to delete from {}.",
|
"Could not find any {} ({}) to delete from {}.",
|
||||||
database.CreateItemLink(item_id),
|
database.CreateItemLink(item_id),
|
||||||
item_id,
|
item_id,
|
||||||
target_string
|
c->GetTargetDescription(target)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,15 +14,7 @@ void command_resetaa(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Successfully reset all Alternate Advancements for {}.",
|
"Successfully reset all Alternate Advancements for {}.",
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,15 +21,7 @@ void command_resetaa_timer(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Reset all Alternate Advancement timers for {}.",
|
"Reset all Alternate Advancement timers for {}.",
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
target->ResetAlternateAdvancementTimers();
|
target->ResetAlternateAdvancementTimers();
|
||||||
@ -43,15 +35,7 @@ void command_resetaa_timer(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"Reset Alternate Advancement timer {} for {}.",
|
"Reset Alternate Advancement timer {} for {}.",
|
||||||
timer_id,
|
timer_id,
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
target->ResetAlternateAdvancementTimer(timer_id);
|
target->ResetAlternateAdvancementTimer(timer_id);
|
||||||
|
|||||||
@ -21,15 +21,7 @@ void command_resetdisc_timer(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Reset all Discipline timers for {}.",
|
"Reset all Discipline timers for {}.",
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
target->ResetAllDisciplineTimers();
|
target->ResetAllDisciplineTimers();
|
||||||
@ -43,15 +35,7 @@ void command_resetdisc_timer(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"Reset Discipline timer {} for {}.",
|
"Reset Discipline timer {} for {}.",
|
||||||
timer_id,
|
timer_id,
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
target->ResetDisciplineTimer(timer_id);
|
target->ResetDisciplineTimer(timer_id);
|
||||||
|
|||||||
@ -49,9 +49,8 @@ void command_revoke(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Found {} ({}) in this zone.",
|
"Found {} in this zone.",
|
||||||
revoke_client->GetName(),
|
c->GetTargetDescription(revoke_client)
|
||||||
revoke_client->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
revoke_client->SetRevoked(revoked);
|
revoke_client->SetRevoked(revoked);
|
||||||
|
|||||||
@ -77,9 +77,8 @@ void command_roambox(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Failed to set roambox for {} ({}).",
|
"Failed to set roambox for {}.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -88,10 +87,9 @@ void command_roambox(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Roambox set to box size of {} for {} ({}) on spawn group ID {} with a delay of {} ({}).",
|
"Roambox set to box size of {} for {} on spawn group ID {} with a delay of {} ({}).",
|
||||||
box_size,
|
box_size,
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
spawn_group_id,
|
spawn_group_id,
|
||||||
ConvertMillisecondsToTime(delay),
|
ConvertMillisecondsToTime(delay),
|
||||||
delay
|
delay
|
||||||
|
|||||||
@ -15,24 +15,25 @@ void command_save(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->GetTarget()->IsClient()) {
|
auto target = c->GetTarget();
|
||||||
|
|
||||||
|
if (target->IsClient()) {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) {} saved.",
|
"{} {} been {} saved.",
|
||||||
c->GetTarget()->GetCleanName(),
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c->GetTarget()->GetID(),
|
c == target ? "have" : "has",
|
||||||
c->GetTarget()->CastToClient()->Save(2) ? "successfully" : "failed to be"
|
target->CastToClient()->Save(2) ? "successfully" : "failed to be"
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else if (c->GetTarget()->IsPlayerCorpse()) {
|
} else if (target->IsPlayerCorpse()) {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) {} saved.",
|
"{} has been {} saved.",
|
||||||
c->GetTarget()->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
c->GetTarget()->CastToCorpse()->GetCorpseDBID(),
|
target->CastToMob()->Save() ? "successfully" : "failed to be"
|
||||||
c->GetTarget()->CastToMob()->Save() ? "successfully" : "failed to be"
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ void command_scribespells(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sep->argnum < 1 || !sep->IsNumber(1)) {
|
if (sep->argnum < 1 || !sep->IsNumber(1)) {
|
||||||
c->Message(Chat::White, "FORMAT: #scribespells <max level> <min level>");
|
c->Message(Chat::White, "Usage: #scribespells [Max Level] [Min Level]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,12 +31,12 @@ void command_scribespells(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (max_level < 1 || min_level < 1) {
|
if (max_level < 1 || min_level < 1) {
|
||||||
c->Message(Chat::White, "ERROR: Level must be greater than or equal to 1.");
|
c->Message(Chat::White, "Level must be greater than or equal to 1.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (min_level > max_level) {
|
if (min_level > max_level) {
|
||||||
c->Message(Chat::White, "ERROR: Minimum Level must be less than or equal to Maximum Level.");
|
c->Message(Chat::White, "Minimum Level must be less than or equal to Maximum Level.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ void command_scribespells(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"{} scribed for {}.",
|
"{} scribed for {}.",
|
||||||
spell_message,
|
spell_message,
|
||||||
target->GetCleanName()
|
c->GetTargetDescription(target)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,9 +18,8 @@ void command_sensetrap(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is too far away.",
|
"{} is too far away.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,15 +68,7 @@ void command_set_adventure_points(Client *c, const Seperator *sep)
|
|||||||
EQ::constants::GetLDoNThemeName(theme_id)
|
EQ::constants::GetLDoNThemeName(theme_id)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -48,15 +48,7 @@ void command_setaapts(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
std::string aa_message = fmt::format(
|
std::string aa_message = fmt::format(
|
||||||
"{} now {} {} {}AA Point{}.",
|
"{} now {} {} {}AA Point{}.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
aa_points,
|
aa_points,
|
||||||
group_raid_string,
|
group_raid_string,
|
||||||
|
|||||||
@ -54,15 +54,7 @@ void command_setaaxp(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
std::string aa_exp_message = fmt::format(
|
std::string aa_exp_message = fmt::format(
|
||||||
"{} now {} {} {}AA Experience.",
|
"{} now {} {} {}AA Experience.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
aa_experience,
|
aa_experience,
|
||||||
group_raid_string
|
group_raid_string
|
||||||
|
|||||||
@ -37,15 +37,7 @@ void command_setaltcurrency(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} now {} {} {}.",
|
"{} now {} {} {}.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
(
|
(
|
||||||
amount ?
|
amount ?
|
||||||
|
|||||||
@ -43,15 +43,7 @@ void command_setanim(Client *c, const Seperator *sep)
|
|||||||
"Set animation to {} ({}) for {}.",
|
"Set animation to {} ({}) for {}.",
|
||||||
animation_name,
|
animation_name,
|
||||||
animation_id,
|
animation_id,
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,15 +42,7 @@ void command_setcrystals(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} now {} {} {}.",
|
"{} now {} {} {}.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
crystal_amount,
|
crystal_amount,
|
||||||
crystal_link
|
crystal_link
|
||||||
|
|||||||
@ -35,15 +35,7 @@ void command_setendurance(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Set {} to {} Endurance{}.",
|
"Set {} to {} Endurance{}.",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
set_to_max ?
|
set_to_max ?
|
||||||
"full" :
|
"full" :
|
||||||
|
|||||||
@ -27,15 +27,7 @@ void command_sethp(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Set {} to {} Health{}.",
|
"Set {} to {} Health{}.",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
set_to_max ?
|
set_to_max ?
|
||||||
"full" :
|
"full" :
|
||||||
|
|||||||
@ -37,7 +37,7 @@ void command_setlanguage(Client *c, const Seperator *sep)
|
|||||||
LogInfo(
|
LogInfo(
|
||||||
"Set language request from [{}], Target: [{}] Language ID: [{}] Language Value: [{}]",
|
"Set language request from [{}], Target: [{}] Language ID: [{}] Language Value: [{}]",
|
||||||
c->GetCleanName(),
|
c->GetCleanName(),
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
language_id,
|
language_id,
|
||||||
language_value
|
language_value
|
||||||
);
|
);
|
||||||
@ -52,7 +52,7 @@ void command_setlanguage(Client *c, const Seperator *sep)
|
|||||||
EQ::constants::GetLanguageName(language_id),
|
EQ::constants::GetLanguageName(language_id),
|
||||||
language_id,
|
language_id,
|
||||||
language_value,
|
language_value,
|
||||||
target->GetCleanName()
|
c->GetTargetDescription(target)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,15 +35,7 @@ void command_setmana(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Set {} to {} Mana{}.",
|
"Set {} to {} Mana{}.",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
set_to_max ?
|
set_to_max ?
|
||||||
"full" :
|
"full" :
|
||||||
|
|||||||
@ -19,15 +19,7 @@ void command_setpvppoints(Client *c, const Seperator *sep)
|
|||||||
target->SendPVPStats();
|
target->SendPVPStats();
|
||||||
std::string pvp_message = fmt::format(
|
std::string pvp_message = fmt::format(
|
||||||
"{} now {} {} PVP Point{}.",
|
"{} now {} {} PVP Point{}.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
|
||||||
"You" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
c == target ? "have" : "has",
|
c == target ? "have" : "has",
|
||||||
pvp_points,
|
pvp_points,
|
||||||
pvp_points != 1 ? "s" : ""
|
pvp_points != 1 ? "s" : ""
|
||||||
|
|||||||
@ -23,7 +23,7 @@ void command_setskill(Client *c, const Seperator *sep)
|
|||||||
LogInfo(
|
LogInfo(
|
||||||
"Set skill request from [{}], Target: [{}] Skill ID: [{}] Skill Value: [{}]",
|
"Set skill request from [{}], Target: [{}] Skill ID: [{}] Skill Value: [{}]",
|
||||||
c->GetCleanName(),
|
c->GetCleanName(),
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
skill_id,
|
skill_id,
|
||||||
skill_value
|
skill_value
|
||||||
);
|
);
|
||||||
@ -45,7 +45,7 @@ void command_setskill(Client *c, const Seperator *sep)
|
|||||||
EQ::skills::GetSkillName((EQ::skills::SkillType) skill_id),
|
EQ::skills::GetSkillName((EQ::skills::SkillType) skill_id),
|
||||||
skill_id,
|
skill_id,
|
||||||
skill_value,
|
skill_value,
|
||||||
target->GetCleanName()
|
c->GetTargetDescription(target)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ void command_setskillall(Client *c, const Seperator *sep)
|
|||||||
LogInfo(
|
LogInfo(
|
||||||
"Set ALL skill request from [{}], target:[{}]",
|
"Set ALL skill request from [{}], target:[{}]",
|
||||||
c->GetCleanName(),
|
c->GetCleanName(),
|
||||||
target->GetCleanName()
|
c->GetTargetDescription(target)
|
||||||
);
|
);
|
||||||
|
|
||||||
auto skill_level = static_cast<uint16>(std::stoul(sep->arg[1]));
|
auto skill_level = static_cast<uint16>(std::stoul(sep->arg[1]));
|
||||||
@ -31,13 +31,7 @@ void command_setskillall(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"Setting all skills to {} for {}.",
|
"Setting all skills to {} for {}.",
|
||||||
skill_level,
|
skill_level,
|
||||||
c == target ?
|
c->GetTargetDescription(target)
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -35,15 +35,7 @@ void command_setstartzone(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"Start Zone {} for {} |{}",
|
"Start Zone {} for {} |{}",
|
||||||
is_reset ? "Reset" : "Changed",
|
is_reset ? "Reset" : "Changed",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
c == target ?
|
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
zone_id ?
|
zone_id ?
|
||||||
fmt::format(
|
fmt::format(
|
||||||
|
|||||||
@ -46,13 +46,7 @@ void command_showskills(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
std::string popup_title = fmt::format(
|
std::string popup_title = fmt::format(
|
||||||
"Skills for {} [{} to {}]",
|
"Skills for {} [{} to {}]",
|
||||||
c == target ?
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
),
|
|
||||||
start_skill_id,
|
start_skill_id,
|
||||||
max_skill_id
|
max_skill_id
|
||||||
);
|
);
|
||||||
@ -71,13 +65,7 @@ void command_showskills(Client *c, const Seperator *sep)
|
|||||||
start_skill_id,
|
start_skill_id,
|
||||||
EQ::skills::GetSkillName((EQ::skills::SkillType) max_skill_id),
|
EQ::skills::GetSkillName((EQ::skills::SkillType) max_skill_id),
|
||||||
max_skill_id,
|
max_skill_id,
|
||||||
c == target ?
|
c->GetTargetDescription(target)
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -30,28 +30,12 @@ void command_stun(Client *c, const Seperator *sep)
|
|||||||
duration ?
|
duration ?
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"You stunned {} for {}.",
|
"You stunned {} for {}.",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
ConvertMillisecondsToTime(duration)
|
ConvertMillisecondsToTime(duration)
|
||||||
) :
|
) :
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"You unstunned {}.",
|
"You unstunned {}.",
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
c->Message(
|
c->Message(
|
||||||
|
|||||||
@ -67,9 +67,8 @@ void command_summon(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Summoning {} ({}) to {:.2f}, {:.2f}, {:.2f} in {} ({}).",
|
"Summoning {} to {:.2f}, {:.2f}, {:.2f} in {} ({}).",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
c->GetX(),
|
c->GetX(),
|
||||||
c->GetY(),
|
c->GetY(),
|
||||||
c->GetZ(),
|
c->GetZ(),
|
||||||
|
|||||||
@ -19,16 +19,9 @@ void command_summonburiedplayercorpse(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} not have any buried corpses.",
|
"{} {} not have any buried corpses.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
c == target ? "do" : "does"
|
||||||
"You do" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) does",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,9 +80,9 @@ void command_task(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Client *client_target = c;
|
Client *target = c;
|
||||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||||
client_target = c->GetTarget()->CastToClient();
|
target = c->GetTarget()->CastToClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_assign = !strcasecmp(sep->arg[1], "assign");
|
bool is_assign = !strcasecmp(sep->arg[1], "assign");
|
||||||
@ -177,21 +177,13 @@ void command_task(Client *c, const Seperator *sep)
|
|||||||
if (is_assign) {
|
if (is_assign) {
|
||||||
auto task_id = std::stoul(sep->arg[2]);
|
auto task_id = std::stoul(sep->arg[2]);
|
||||||
if (task_id && task_id < MAXTASKS) {
|
if (task_id && task_id < MAXTASKS) {
|
||||||
client_target->AssignTask(task_id, 0, false);
|
target->AssignTask(task_id, 0, false);
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Assigned task ID {} to {}.",
|
"Assigned task ID {} to {}.",
|
||||||
task_id,
|
task_id,
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
client_target == c ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
client_target->GetCleanName(),
|
|
||||||
client_target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -201,23 +193,15 @@ void command_task(Client *c, const Seperator *sep)
|
|||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Task timers have been purged for {}.",
|
"Task timers have been purged for {}.",
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
client_target == c ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
client_target->GetCleanName(),
|
|
||||||
client_target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (client_target != c) {
|
if (c != target) {
|
||||||
client_target->Message(Chat::Yellow, "Your task timers have been purged by a GM.");
|
target->Message(Chat::Yellow, "Your task timers have been purged by a GM.");
|
||||||
}
|
}
|
||||||
|
|
||||||
client_target->PurgeTaskTimers();
|
target->PurgeTaskTimers();
|
||||||
return;
|
return;
|
||||||
} else if (is_reload) {
|
} else if (is_reload) {
|
||||||
if (arguments >= 2) {
|
if (arguments >= 2) {
|
||||||
@ -282,62 +266,45 @@ void command_task(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
} else if (is_show) {
|
} else if (is_show) {
|
||||||
c->ShowClientTasks(client_target);
|
target->ShowClientTasks(c);
|
||||||
return;
|
return;
|
||||||
} else if (is_uncomplete) {
|
} else if (is_uncomplete) {
|
||||||
if (sep->IsNumber(2)) {
|
if (sep->IsNumber(2)) {
|
||||||
auto task_id = std::stoul(sep->arg[2]);
|
auto task_id = std::stoul(sep->arg[2]);
|
||||||
if (task_id && task_id < MAXTASKS) {
|
if (!task_id || task_id > MAXTASKS) {
|
||||||
if (
|
|
||||||
CompletedTasksRepository::DeleteWhere(
|
|
||||||
database,
|
|
||||||
fmt::format(
|
|
||||||
"charid = {} AND taskid = {}",
|
|
||||||
client_target->CharacterID(),
|
|
||||||
task_id
|
|
||||||
)
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
c->Message(
|
|
||||||
Chat::Yellow,
|
|
||||||
fmt::format(
|
|
||||||
"Successfully uncompleted task ID {} for {}.",
|
|
||||||
task_id,
|
|
||||||
(
|
|
||||||
client_target == c ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
client_target->GetCleanName(),
|
|
||||||
client_target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
c->Message(
|
|
||||||
Chat::Yellow,
|
|
||||||
fmt::format(
|
|
||||||
"{} not completed task ID {}.",
|
|
||||||
(
|
|
||||||
client_target == c ?
|
|
||||||
"You have" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) has",
|
|
||||||
client_target->GetCleanName(),
|
|
||||||
client_target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
task_id
|
|
||||||
).c_str()
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
c->Message(Chat::White, "Invalid task ID specified.");
|
c->Message(Chat::White, "Invalid task ID specified.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
CompletedTasksRepository::DeleteWhere(
|
||||||
|
database,
|
||||||
|
fmt::format(
|
||||||
|
"charid = {} AND taskid = {}",
|
||||||
|
target->CharacterID(),
|
||||||
|
task_id
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
c->Message(
|
||||||
|
Chat::Yellow,
|
||||||
|
fmt::format(
|
||||||
|
"Successfully uncompleted task ID {} for {}.",
|
||||||
|
task_id,
|
||||||
|
c->GetTargetDescription(target)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
c->Message(
|
||||||
|
Chat::Yellow,
|
||||||
|
fmt::format(
|
||||||
|
"{} {} not completed task ID {}.",
|
||||||
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
|
c == target ? "have" : "has",
|
||||||
|
task_id
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (is_update) {
|
} else if (is_update) {
|
||||||
if (arguments >= 3) {
|
if (arguments >= 3) {
|
||||||
@ -359,21 +326,12 @@ void command_task(Client *c, const Seperator *sep)
|
|||||||
task_id,
|
task_id,
|
||||||
activity_id,
|
activity_id,
|
||||||
count,
|
count,
|
||||||
(
|
c->GetTargetDescription(target)
|
||||||
client_target == c ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
client_target->GetCleanName(),
|
|
||||||
client_target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
client_target->UpdateTaskActivity(task_id, activity_id, count);
|
target->UpdateTaskActivity(task_id, activity_id, count);
|
||||||
c->ShowClientTasks(client_target);
|
target->ShowClientTasks(c);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,15 +41,7 @@ void command_texture(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Texture Changed for {} | Texture: {}{}",
|
"Texture Changed for {} | Texture: {}{}",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
c == target ?
|
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
texture,
|
texture,
|
||||||
(
|
(
|
||||||
Mob::IsPlayerRace(target->GetModel()) ?
|
Mob::IsPlayerRace(target->GetModel()) ?
|
||||||
|
|||||||
@ -12,13 +12,7 @@ void command_timers(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
std::string popup_title = fmt::format(
|
std::string popup_title = fmt::format(
|
||||||
"Recast Timers for {}",
|
"Recast Timers for {}",
|
||||||
c == target ?
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf)
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
std::string popup_text = "<table>";
|
std::string popup_text = "<table>";
|
||||||
|
|||||||
@ -44,15 +44,7 @@ void command_title(Client *c, const Seperator *sep)
|
|||||||
"Title has been {}{} for {}{}",
|
"Title has been {}{} for {}{}",
|
||||||
is_remove ? "removed" : "changed",
|
is_remove ? "removed" : "changed",
|
||||||
!is_remove && save_title ? " and saved" : "",
|
!is_remove && save_title ? " and saved" : "",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
is_remove ?
|
is_remove ?
|
||||||
"." :
|
"." :
|
||||||
|
|||||||
@ -44,15 +44,7 @@ void command_titlesuffix(Client *c, const Seperator *sep)
|
|||||||
"Title suffix has been {}{} for {}{}",
|
"Title suffix has been {}{} for {}{}",
|
||||||
is_remove ? "removed" : "changed",
|
is_remove ? "removed" : "changed",
|
||||||
!is_remove && save_suffix ? " and saved" : "",
|
!is_remove && save_suffix ? " and saved" : "",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
is_remove ?
|
is_remove ?
|
||||||
"." :
|
"." :
|
||||||
|
|||||||
@ -8,7 +8,7 @@ void command_traindisc(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sep->argnum < 1 || !sep->IsNumber(1)) {
|
if (sep->argnum < 1 || !sep->IsNumber(1)) {
|
||||||
c->Message(Chat::White, "FORMAT: #traindisc <max level> <min level>");
|
c->Message(Chat::White, "Usage: #traindisc [Max Level] [Min Level]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,12 +32,12 @@ void command_traindisc(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (max_level < 1 || min_level < 1) {
|
if (max_level < 1 || min_level < 1) {
|
||||||
c->Message(Chat::White, "ERROR: Level must be greater than or equal to 1.");
|
c->Message(Chat::White, "Level must be greater than or equal to 1.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (min_level > max_level) {
|
if (min_level > max_level) {
|
||||||
c->Message(Chat::White, "ERROR: Minimum Level must be less than or equal to Maximum Level.");
|
c->Message(Chat::White, "Minimum Level must be less than or equal to Maximum Level.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ void command_traindisc(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"{} learned for {}.",
|
"{} learned for {}.",
|
||||||
discipline_message,
|
discipline_message,
|
||||||
target->GetCleanName()
|
c->GetTargetDescription(target)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,13 +12,7 @@ void command_undye(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Undyed armor for {}.",
|
"Undyed armor for {}.",
|
||||||
c == target ?
|
c->GetTargetDescription(target)
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,15 @@ void command_unfreeze(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
c->GetTarget()->SendAppearancePacket(AT_Anim, ANIM_STAND);
|
auto target = c->GetTarget();
|
||||||
|
target->SendAppearancePacket(AT_Anim, ANIM_STAND);
|
||||||
|
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"You have unfrozen {}.",
|
||||||
|
c->GetTargetDescription(target)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,16 +33,9 @@ void command_unmemspell(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} not have {} ({}) memorized.",
|
"{} {} not have {} ({}) memorized.",
|
||||||
(
|
c->GetTargetDescription(target),
|
||||||
c == target ?
|
c == target ? "do" : "does",
|
||||||
"You do" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) does",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
GetSpellName(spell_id),
|
GetSpellName(spell_id),
|
||||||
spell_id
|
spell_id
|
||||||
).c_str()
|
).c_str()
|
||||||
@ -56,11 +49,10 @@ void command_unmemspell(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) unmemorized for {} ({}) from spell gem {}.",
|
"{} ({}) unmemorized for {} from spell gem {}.",
|
||||||
GetSpellName(spell_id),
|
GetSpellName(spell_id),
|
||||||
spell_id,
|
spell_id,
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
spell_gem
|
spell_gem
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -12,16 +12,9 @@ void command_unmemspells(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} no spells to unmemorize.",
|
"{} {} no spells to unmemorize.",
|
||||||
(
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou),
|
||||||
c == target ?
|
c == target ? "have" : "has"
|
||||||
"You have" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({}) has",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -33,9 +26,8 @@ void command_unmemspells(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) has had {} spells unmemorized.",
|
"{} has had {} spells unmemorized.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target),
|
||||||
target->GetID(),
|
|
||||||
memmed_count
|
memmed_count
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -38,27 +38,16 @@ void command_unscribespell(Client *c, const Seperator *sep)
|
|||||||
"Unscribing {} ({}) for {}.",
|
"Unscribing {} ({}) for {}.",
|
||||||
spell_name,
|
spell_name,
|
||||||
spell_id,
|
spell_id,
|
||||||
c == target ?
|
c->GetTargetDescription(target)
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} not have {} ({}) scribed.",
|
"{} {} not have {} ({}) scribed.",
|
||||||
c == target ?
|
c->GetTargetDescription(target),
|
||||||
"You do" :
|
c == target ? "do" : "does",
|
||||||
fmt::format(
|
|
||||||
"{} ({}) does",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
),
|
|
||||||
spell_name,
|
spell_name,
|
||||||
spell_id
|
spell_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -38,27 +38,16 @@ void command_untraindisc(Client *c, const Seperator *sep)
|
|||||||
"Untraining {} ({}) for {}.",
|
"Untraining {} ({}) for {}.",
|
||||||
spell_name,
|
spell_name,
|
||||||
spell_id,
|
spell_id,
|
||||||
c == target ?
|
c->GetTargetDescription(target)
|
||||||
"yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} not have {} ({}) trained.",
|
"{} {} not have {} ({}) trained.",
|
||||||
c == target ?
|
c->GetTargetDescription(target),
|
||||||
"You do" :
|
c == target ? "do" : "does",
|
||||||
fmt::format(
|
|
||||||
"{} ({}) does",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
),
|
|
||||||
spell_name,
|
spell_name,
|
||||||
spell_id
|
spell_id
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -6,16 +6,6 @@ void command_viewcurrencies(Client *c, const Seperator *sep)
|
|||||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||||
target = c->GetTarget()->CastToClient();
|
target = c->GetTarget()->CastToClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto target_string = (
|
|
||||||
c == target ?
|
|
||||||
"Yourself" :
|
|
||||||
fmt::format(
|
|
||||||
"{} ({})",
|
|
||||||
target->GetCleanName(),
|
|
||||||
target->GetID()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
auto platinum = (
|
auto platinum = (
|
||||||
target->GetMoney(3, 0) +
|
target->GetMoney(3, 0) +
|
||||||
@ -52,7 +42,7 @@ void command_viewcurrencies(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Money for {} | {}",
|
"Money for {} | {}",
|
||||||
target_string,
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
ConvertMoneyToString(
|
ConvertMoneyToString(
|
||||||
platinum,
|
platinum,
|
||||||
gold,
|
gold,
|
||||||
@ -70,7 +60,7 @@ void command_viewcurrencies(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"{} for {} | {}",
|
"{} for {} | {}",
|
||||||
database.CreateItemLink(RuleI(Zone, EbonCrystalItemID)),
|
database.CreateItemLink(RuleI(Zone, EbonCrystalItemID)),
|
||||||
target_string,
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
ebon_crystals
|
ebon_crystals
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -83,21 +73,21 @@ void command_viewcurrencies(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"{} for {} | {}",
|
"{} for {} | {}",
|
||||||
database.CreateItemLink(RuleI(Zone, RadiantCrystalItemID)),
|
database.CreateItemLink(RuleI(Zone, RadiantCrystalItemID)),
|
||||||
target_string,
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
radiant_crystals
|
radiant_crystals
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& alternate_currency : zone->AlternateCurrencies) {
|
for (const auto& ac : zone->AlternateCurrencies) {
|
||||||
auto currency_value = target->GetAlternateCurrencyValue(alternate_currency.id);
|
auto currency_value = target->GetAlternateCurrencyValue(ac.id);
|
||||||
if (currency_value) {
|
if (currency_value) {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} for {} | {}",
|
"{} for {} | {}",
|
||||||
database.CreateItemLink(alternate_currency.item_id),
|
database.CreateItemLink(ac.item_id),
|
||||||
target_string,
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
currency_value
|
currency_value
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -116,7 +106,7 @@ void command_viewcurrencies(Client *c, const Seperator *sep)
|
|||||||
fmt::format(
|
fmt::format(
|
||||||
"{} for {} | {}",
|
"{} for {} | {}",
|
||||||
EQ::constants::GetLDoNThemeName(ldon_currency_id),
|
EQ::constants::GetLDoNThemeName(ldon_currency_id),
|
||||||
target_string,
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
ldon_currency_value
|
ldon_currency_value
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
@ -129,7 +119,7 @@ void command_viewcurrencies(Client *c, const Seperator *sep)
|
|||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"PVP Points for {} | {}",
|
"PVP Points for {} | {}",
|
||||||
target_string,
|
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||||
pvp_points
|
pvp_points
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -13,9 +13,8 @@ void command_wpinfo(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} ({}) is not a part of any grid.",
|
"{} is not a part of any grid.",
|
||||||
target->GetCleanName(),
|
c->GetTargetDescription(target)
|
||||||
target->GetID()
|
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -80,9 +80,8 @@ void command_zclip(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Clipping Changed | Zone: {} ({}) Permanent: {}",
|
"Clipping Changed | Zone: {} Permanent: {}",
|
||||||
zone->GetLongName(),
|
zone->GetZoneDescription(),
|
||||||
zone->GetZoneID(),
|
|
||||||
permanent ? "Yes" : "No"
|
permanent ? "Yes" : "No"
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -56,9 +56,8 @@ void command_zcolor(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Fog Color Changed | Zone: {} ({}) Red: {} Green: {} Blue: {} Permanent: {}",
|
"Fog Color Changed | Zone: {} Red: {} Green: {} Blue: {} Permanent: {}",
|
||||||
zone->GetLongName(),
|
zone->GetZoneDescription(),
|
||||||
zone->GetZoneID(),
|
|
||||||
red,
|
red,
|
||||||
green,
|
green,
|
||||||
blue,
|
blue,
|
||||||
|
|||||||
@ -44,17 +44,8 @@ void command_zsafecoords(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Safe Coordinates Changed | Zone: {} ({}){} XYZ: {:.2f}, {:.2f}, {:.2f} Heading: {:.2f} Permanent: {} ",
|
"Safe Coordinates Changed | Zone: {} XYZ: {:.2f}, {:.2f}, {:.2f} Heading: {:.2f} Permanent: {} ",
|
||||||
zone->GetLongName(),
|
zone->GetZoneDescription(),
|
||||||
zone->GetZoneID(),
|
|
||||||
(
|
|
||||||
zone->GetInstanceVersion() ?
|
|
||||||
fmt::format(
|
|
||||||
" Version: {}",
|
|
||||||
zone->GetInstanceVersion()
|
|
||||||
) :
|
|
||||||
""
|
|
||||||
),
|
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
z,
|
z,
|
||||||
|
|||||||
@ -34,9 +34,8 @@ void command_zsky(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Sky Changed | Zone: {} ({}) Sky Type: {} Permanent: {}",
|
"Sky Changed | Zone: {} Sky Type: {} Permanent: {}",
|
||||||
zone->GetLongName(),
|
zone->GetZoneDescription(),
|
||||||
zone->GetZoneID(),
|
|
||||||
sky_type,
|
sky_type,
|
||||||
permanent ? "Yes" : "No"
|
permanent ? "Yes" : "No"
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user