mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-03 06:23:53 +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
|
||||
#else
|
||||
#include "unix.h"
|
||||
#include "../zone/zonedb.h"
|
||||
#include <netinet/in.h>
|
||||
#include <sys/time.h>
|
||||
#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_player.charid = %u "
|
||||
"LIMIT 1 ",
|
||||
GetZoneID(zone),
|
||||
content_db.GetZoneID(zone),
|
||||
version,
|
||||
character_id
|
||||
);
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success())
|
||||
|
||||
@ -327,6 +327,8 @@ int main(int argc, char** argv) {
|
||||
database.PurgeAllDeletedDataBuckets();
|
||||
|
||||
LogInfo("Loading zones");
|
||||
// Load to both context for now... this needs to be cleaned up
|
||||
database.LoadZoneNames();
|
||||
content_db.LoadZoneNames();
|
||||
LogInfo("Clearing groups");
|
||||
database.ClearGroup();
|
||||
|
||||
@ -9298,7 +9298,7 @@ void Client::SetBotOption(BotOwnerOption boo, bool flag) {
|
||||
void Client::SendToGuildHall()
|
||||
{
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -258,7 +258,7 @@ bool Client::Process() {
|
||||
if (mob_close_scan_timer.Check()) {
|
||||
entity_list.ScanCloseMobs(close_mobs, this);
|
||||
}
|
||||
|
||||
|
||||
bool may_use_attacks = false;
|
||||
/*
|
||||
Things which prevent us from attacking:
|
||||
@ -757,7 +757,7 @@ void Client::BulkSendInventoryItems()
|
||||
|
||||
if (ob.tellp() == last_pos)
|
||||
LogInventory("Serialization failed on item slot [{}] during BulkSendInventoryItems. Item skipped", slot_id);
|
||||
|
||||
|
||||
last_pos = ob.tellp();
|
||||
}
|
||||
|
||||
@ -836,7 +836,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
else {
|
||||
cur_fac_level = GetModCharacterFactionLevel(fac);
|
||||
}
|
||||
|
||||
|
||||
if (cur_fac_level < ml.faction_required)
|
||||
continue;
|
||||
|
||||
@ -1170,7 +1170,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// could just do a range, but this is clearer and explicit
|
||||
if
|
||||
(
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
2. Add the function in this file.
|
||||
3. In the command_init function you must add a call to command_add
|
||||
for your function.
|
||||
|
||||
|
||||
Notes: If you want an alias for your command, add an entry to the
|
||||
`command_settings` table in your database. The access level you
|
||||
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()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -507,7 +507,7 @@ int command_init(void)
|
||||
working_cl_iter.first.c_str(),
|
||||
cs_iter->second.first
|
||||
);
|
||||
|
||||
|
||||
if (cs_iter->second.second.empty()) {
|
||||
continue;
|
||||
}
|
||||
@ -522,7 +522,7 @@ int command_init(void)
|
||||
"command_init(): Warning: Alias [{}] already exists as a command - skipping!",
|
||||
alias_iter.c_str()
|
||||
);
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1289,7 +1289,7 @@ void command_peqzone(Client *c, const Seperator *sep)
|
||||
if (sep->IsNumber(1))
|
||||
{
|
||||
zoneid = atoi(sep->arg[1]);
|
||||
destzone = database.GetPEQZone(zoneid, 0);
|
||||
destzone = content_db.GetPEQZone(zoneid, 0);
|
||||
if(destzone == 0){
|
||||
c->Message(Chat::Red, "You cannot use this command to enter that zone!");
|
||||
return;
|
||||
@ -1307,7 +1307,7 @@ void command_peqzone(Client *c, const Seperator *sep)
|
||||
}
|
||||
else {
|
||||
zoneid = content_db.GetZoneID(sep->arg[1]);
|
||||
destzone = database.GetPEQZone(zoneid, 0);
|
||||
destzone = content_db.GetPEQZone(zoneid, 0);
|
||||
if(zoneid == 0) {
|
||||
c->Message(Chat::White, "Unable to locate zone '%s'", sep->arg[1]);
|
||||
return;
|
||||
@ -4245,7 +4245,7 @@ void command_reloadworld(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "Reloading quest cache worldwide.");
|
||||
else
|
||||
c->Message(Chat::White, "Reloading quest cache and repopping zones worldwide.");
|
||||
|
||||
|
||||
auto pack = new ServerPacket(ServerOP_ReloadWorld, sizeof(ReloadWorld_Struct));
|
||||
ReloadWorld_Struct* RW = (ReloadWorld_Struct*) pack->pBuffer;
|
||||
RW->Option = world_repop;
|
||||
@ -6578,7 +6578,7 @@ void command_editmassrespawn(Client* c, const Seperator* sep)
|
||||
if (change_respawn_seconds > 0) {
|
||||
|
||||
if (change_apply) {
|
||||
|
||||
|
||||
results = database.QueryDatabase(
|
||||
fmt::format(
|
||||
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)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
std::string query = SQL(
|
||||
SELECT
|
||||
COLUMN_NAME
|
||||
@ -8070,7 +8070,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
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[0] = BOT_COMMAND_CHAR;
|
||||
}
|
||||
|
||||
|
||||
if (bot_command_dispatch(c, bot_message.c_str()) == -2) {
|
||||
if (parse->PlayerHasQuestSub(EVENT_BOT_COMMAND)) {
|
||||
int i = parse->EventPlayer(EVENT_BOT_COMMAND, c, bot_message, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user