mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-26 09:32:34 +00:00
Few adjustments [skip ci[
This commit is contained in:
parent
b8c44ee41b
commit
093509baa9
@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
#else
|
#else
|
||||||
#include "unix.h"
|
#include "unix.h"
|
||||||
|
#include "../zone/zonedb.h"
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
@ -319,10 +320,10 @@ uint16 Database::GetInstanceID(const char* zone, uint32 character_id, int16 vers
|
|||||||
"AND instance_list.id = instance_list_player.id "
|
"AND instance_list.id = instance_list_player.id "
|
||||||
"AND instance_list_player.charid = %u "
|
"AND instance_list_player.charid = %u "
|
||||||
"LIMIT 1 ",
|
"LIMIT 1 ",
|
||||||
GetZoneID(zone),
|
content_db.GetZoneID(zone),
|
||||||
version,
|
version,
|
||||||
character_id
|
character_id
|
||||||
);
|
);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
|
|||||||
@ -327,6 +327,8 @@ int main(int argc, char** argv) {
|
|||||||
database.PurgeAllDeletedDataBuckets();
|
database.PurgeAllDeletedDataBuckets();
|
||||||
|
|
||||||
LogInfo("Loading zones");
|
LogInfo("Loading zones");
|
||||||
|
// Load to both context for now... this needs to be cleaned up
|
||||||
|
database.LoadZoneNames();
|
||||||
content_db.LoadZoneNames();
|
content_db.LoadZoneNames();
|
||||||
LogInfo("Clearing groups");
|
LogInfo("Clearing groups");
|
||||||
database.ClearGroup();
|
database.ClearGroup();
|
||||||
|
|||||||
@ -9298,7 +9298,7 @@ void Client::SetBotOption(BotOwnerOption boo, bool flag) {
|
|||||||
void Client::SendToGuildHall()
|
void Client::SendToGuildHall()
|
||||||
{
|
{
|
||||||
std::string zone_short_name = "guildhall";
|
std::string zone_short_name = "guildhall";
|
||||||
uint32 zone_id = database.GetZoneID(zone_short_name.c_str());
|
uint32 zone_id = content_db.GetZoneID(zone_short_name.c_str());
|
||||||
if (zone_id == 0) {
|
if (zone_id == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -258,7 +258,7 @@ bool Client::Process() {
|
|||||||
if (mob_close_scan_timer.Check()) {
|
if (mob_close_scan_timer.Check()) {
|
||||||
entity_list.ScanCloseMobs(close_mobs, this);
|
entity_list.ScanCloseMobs(close_mobs, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool may_use_attacks = false;
|
bool may_use_attacks = false;
|
||||||
/*
|
/*
|
||||||
Things which prevent us from attacking:
|
Things which prevent us from attacking:
|
||||||
@ -757,7 +757,7 @@ void Client::BulkSendInventoryItems()
|
|||||||
|
|
||||||
if (ob.tellp() == last_pos)
|
if (ob.tellp() == last_pos)
|
||||||
LogInventory("Serialization failed on item slot [{}] during BulkSendInventoryItems. Item skipped", slot_id);
|
LogInventory("Serialization failed on item slot [{}] during BulkSendInventoryItems. Item skipped", slot_id);
|
||||||
|
|
||||||
last_pos = ob.tellp();
|
last_pos = ob.tellp();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -836,7 +836,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
|||||||
else {
|
else {
|
||||||
cur_fac_level = GetModCharacterFactionLevel(fac);
|
cur_fac_level = GetModCharacterFactionLevel(fac);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cur_fac_level < ml.faction_required)
|
if (cur_fac_level < ml.faction_required)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1170,7 +1170,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// could just do a range, but this is clearer and explicit
|
// could just do a range, but this is clearer and explicit
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
2. Add the function in this file.
|
2. Add the function in this file.
|
||||||
3. In the command_init function you must add a call to command_add
|
3. In the command_init function you must add a call to command_add
|
||||||
for your function.
|
for your function.
|
||||||
|
|
||||||
Notes: If you want an alias for your command, add an entry to the
|
Notes: If you want an alias for your command, add an entry to the
|
||||||
`command_settings` table in your database. The access level you
|
`command_settings` table in your database. The access level you
|
||||||
set with command_add is the default setting if the command isn't
|
set with command_add is the default setting if the command isn't
|
||||||
@ -497,7 +497,7 @@ int command_init(void)
|
|||||||
working_cl_iter.first.c_str()
|
working_cl_iter.first.c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -507,7 +507,7 @@ int command_init(void)
|
|||||||
working_cl_iter.first.c_str(),
|
working_cl_iter.first.c_str(),
|
||||||
cs_iter->second.first
|
cs_iter->second.first
|
||||||
);
|
);
|
||||||
|
|
||||||
if (cs_iter->second.second.empty()) {
|
if (cs_iter->second.second.empty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -522,7 +522,7 @@ int command_init(void)
|
|||||||
"command_init(): Warning: Alias [{}] already exists as a command - skipping!",
|
"command_init(): Warning: Alias [{}] already exists as a command - skipping!",
|
||||||
alias_iter.c_str()
|
alias_iter.c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1289,7 +1289,7 @@ void command_peqzone(Client *c, const Seperator *sep)
|
|||||||
if (sep->IsNumber(1))
|
if (sep->IsNumber(1))
|
||||||
{
|
{
|
||||||
zoneid = atoi(sep->arg[1]);
|
zoneid = atoi(sep->arg[1]);
|
||||||
destzone = database.GetPEQZone(zoneid, 0);
|
destzone = content_db.GetPEQZone(zoneid, 0);
|
||||||
if(destzone == 0){
|
if(destzone == 0){
|
||||||
c->Message(Chat::Red, "You cannot use this command to enter that zone!");
|
c->Message(Chat::Red, "You cannot use this command to enter that zone!");
|
||||||
return;
|
return;
|
||||||
@ -1307,7 +1307,7 @@ void command_peqzone(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
zoneid = content_db.GetZoneID(sep->arg[1]);
|
zoneid = content_db.GetZoneID(sep->arg[1]);
|
||||||
destzone = database.GetPEQZone(zoneid, 0);
|
destzone = content_db.GetPEQZone(zoneid, 0);
|
||||||
if(zoneid == 0) {
|
if(zoneid == 0) {
|
||||||
c->Message(Chat::White, "Unable to locate zone '%s'", sep->arg[1]);
|
c->Message(Chat::White, "Unable to locate zone '%s'", sep->arg[1]);
|
||||||
return;
|
return;
|
||||||
@ -4245,7 +4245,7 @@ void command_reloadworld(Client *c, const Seperator *sep)
|
|||||||
c->Message(Chat::White, "Reloading quest cache worldwide.");
|
c->Message(Chat::White, "Reloading quest cache worldwide.");
|
||||||
else
|
else
|
||||||
c->Message(Chat::White, "Reloading quest cache and repopping zones worldwide.");
|
c->Message(Chat::White, "Reloading quest cache and repopping zones worldwide.");
|
||||||
|
|
||||||
auto pack = new ServerPacket(ServerOP_ReloadWorld, sizeof(ReloadWorld_Struct));
|
auto pack = new ServerPacket(ServerOP_ReloadWorld, sizeof(ReloadWorld_Struct));
|
||||||
ReloadWorld_Struct* RW = (ReloadWorld_Struct*) pack->pBuffer;
|
ReloadWorld_Struct* RW = (ReloadWorld_Struct*) pack->pBuffer;
|
||||||
RW->Option = world_repop;
|
RW->Option = world_repop;
|
||||||
@ -6578,7 +6578,7 @@ void command_editmassrespawn(Client* c, const Seperator* sep)
|
|||||||
if (change_respawn_seconds > 0) {
|
if (change_respawn_seconds > 0) {
|
||||||
|
|
||||||
if (change_apply) {
|
if (change_apply) {
|
||||||
|
|
||||||
results = database.QueryDatabase(
|
results = database.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
SQL(
|
SQL(
|
||||||
@ -7949,7 +7949,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
|||||||
c->Message(Chat::White, "#npceditmass search_column [exact_match: =]search_value change_column change_value (apply)");
|
c->Message(Chat::White, "#npceditmass search_column [exact_match: =]search_value change_column change_value (apply)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string query = SQL(
|
std::string query = SQL(
|
||||||
SELECT
|
SELECT
|
||||||
COLUMN_NAME
|
COLUMN_NAME
|
||||||
@ -8070,7 +8070,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
@ -13413,7 +13413,7 @@ void command_bot(Client *c, const Seperator *sep)
|
|||||||
bot_message = bot_message.substr(bot_message.find_first_not_of("#bot"));
|
bot_message = bot_message.substr(bot_message.find_first_not_of("#bot"));
|
||||||
bot_message[0] = BOT_COMMAND_CHAR;
|
bot_message[0] = BOT_COMMAND_CHAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bot_command_dispatch(c, bot_message.c_str()) == -2) {
|
if (bot_command_dispatch(c, bot_message.c_str()) == -2) {
|
||||||
if (parse->PlayerHasQuestSub(EVENT_BOT_COMMAND)) {
|
if (parse->PlayerHasQuestSub(EVENT_BOT_COMMAND)) {
|
||||||
int i = parse->EventPlayer(EVENT_BOT_COMMAND, c, bot_message, 0);
|
int i = parse->EventPlayer(EVENT_BOT_COMMAND, c, bot_message, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user