mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Migrate getZoneX calls and npc types calls [skip ci]
This commit is contained in:
parent
b22d8f6148
commit
ca49f3902f
@ -143,7 +143,7 @@ bool Adventure::Process()
|
|||||||
|
|
||||||
bool Adventure::CreateInstance()
|
bool Adventure::CreateInstance()
|
||||||
{
|
{
|
||||||
uint32 zone_id = database.GetZoneID(adventure_template->zone);
|
uint32 zone_id = content_db.GetZoneID(adventure_template->zone);
|
||||||
if(!zone_id)
|
if(!zone_id)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -771,7 +771,7 @@ void AdventureManager::PlayerClickedDoor(const char *player, int zone_id, int do
|
|||||||
sizeof(ServerPlayerClickedAdventureDoorReply_Struct));
|
sizeof(ServerPlayerClickedAdventureDoorReply_Struct));
|
||||||
ServerPlayerClickedAdventureDoorReply_Struct *sr = (ServerPlayerClickedAdventureDoorReply_Struct*)pack->pBuffer;
|
ServerPlayerClickedAdventureDoorReply_Struct *sr = (ServerPlayerClickedAdventureDoorReply_Struct*)pack->pBuffer;
|
||||||
strcpy(sr->player, player);
|
strcpy(sr->player, player);
|
||||||
sr->zone_id = database.GetZoneID(t->zone);
|
sr->zone_id = content_db.GetZoneID(t->zone);
|
||||||
sr->instance_id = (*iter)->GetInstanceID();
|
sr->instance_id = (*iter)->GetInstanceID();
|
||||||
sr->x = t->dest_x;
|
sr->x = t->dest_x;
|
||||||
sr->y = t->dest_y;
|
sr->y = t->dest_y;
|
||||||
|
|||||||
@ -785,7 +785,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
|
|
||||||
if (tutorial_enabled) {
|
if (tutorial_enabled) {
|
||||||
zone_id = RuleI(World, TutorialZoneID);
|
zone_id = RuleI(World, TutorialZoneID);
|
||||||
database.MoveCharacterToZone(charid, database.GetZoneName(zone_id));
|
database.MoveCharacterToZone(charid, content_db.GetZoneName(zone_id));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LogInfo("[{}] is trying to go to tutorial but are not allowed", char_name);
|
LogInfo("[{}] is trying to go to tutorial but are not allowed", char_name);
|
||||||
@ -796,7 +796,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zone_id == 0 || !database.GetZoneName(zone_id)) {
|
if (zone_id == 0 || !content_db.GetZoneName(zone_id)) {
|
||||||
// This is to save people in an invalid zone, once it's removed from the DB
|
// This is to save people in an invalid zone, once it's removed from the DB
|
||||||
database.MoveCharacterToZone(charid, "arena");
|
database.MoveCharacterToZone(charid, "arena");
|
||||||
LogInfo("Zone not found in database zone_id=[{}], moveing char to arena character:[{}]", zone_id, char_name);
|
LogInfo("Zone not found in database zone_id=[{}], moveing char to arena character:[{}]", zone_id, char_name);
|
||||||
@ -1154,7 +1154,7 @@ void Client::EnterWorld(bool TryBootup) {
|
|||||||
else
|
else
|
||||||
zone_server = zoneserver_list.FindByZoneID(zone_id);
|
zone_server = zoneserver_list.FindByZoneID(zone_id);
|
||||||
|
|
||||||
const char *zone_name = database.GetZoneName(zone_id, true);
|
const char *zone_name = content_db.GetZoneName(zone_id, true);
|
||||||
if (zone_server) {
|
if (zone_server) {
|
||||||
if (false == enter_world_triggered) {
|
if (false == enter_world_triggered) {
|
||||||
//Drop any clients we own in other zones.
|
//Drop any clients we own in other zones.
|
||||||
@ -1267,7 +1267,7 @@ void Client::Clearance(int8 response)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* zonename = database.GetZoneName(zone_id);
|
const char* zonename = content_db.GetZoneName(zone_id);
|
||||||
if (zonename == 0) {
|
if (zonename == 0) {
|
||||||
LogInfo("zonename is nullptr in Client::Clearance!!");
|
LogInfo("zonename is nullptr in Client::Clearance!!");
|
||||||
TellClientZoneUnavailable();
|
TellClientZoneUnavailable();
|
||||||
@ -1322,7 +1322,7 @@ void Client::Clearance(int8 response)
|
|||||||
void Client::TellClientZoneUnavailable() {
|
void Client::TellClientZoneUnavailable() {
|
||||||
auto outapp = new EQApplicationPacket(OP_ZoneUnavail, sizeof(ZoneUnavail_Struct));
|
auto outapp = new EQApplicationPacket(OP_ZoneUnavail, sizeof(ZoneUnavail_Struct));
|
||||||
ZoneUnavail_Struct* ua = (ZoneUnavail_Struct*)outapp->pBuffer;
|
ZoneUnavail_Struct* ua = (ZoneUnavail_Struct*)outapp->pBuffer;
|
||||||
const char* zonename = database.GetZoneName(zone_id);
|
const char* zonename = content_db.GetZoneName(zone_id);
|
||||||
if (zonename)
|
if (zonename)
|
||||||
strcpy(ua->zonename, zonename);
|
strcpy(ua->zonename, zonename);
|
||||||
QueuePacket(outapp);
|
QueuePacket(outapp);
|
||||||
@ -1581,11 +1581,11 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log(Logs::Detail, Logs::WorldServer, "Current location: %s (%d) %0.2f, %0.2f, %0.2f, %0.2f",
|
Log(Logs::Detail, Logs::WorldServer, "Current location: %s (%d) %0.2f, %0.2f, %0.2f, %0.2f",
|
||||||
database.GetZoneName(pp.zone_id), pp.zone_id, pp.x, pp.y, pp.z, pp.heading);
|
content_db.GetZoneName(pp.zone_id), pp.zone_id, pp.x, pp.y, pp.z, pp.heading);
|
||||||
Log(Logs::Detail, Logs::WorldServer, "Bind location: %s (%d) %0.2f, %0.2f, %0.2f",
|
Log(Logs::Detail, Logs::WorldServer, "Bind location: %s (%d) %0.2f, %0.2f, %0.2f",
|
||||||
database.GetZoneName(pp.binds[0].zoneId), pp.binds[0].zoneId, pp.binds[0].x, pp.binds[0].y, pp.binds[0].z);
|
content_db.GetZoneName(pp.binds[0].zoneId), pp.binds[0].zoneId, pp.binds[0].x, pp.binds[0].y, pp.binds[0].z);
|
||||||
Log(Logs::Detail, Logs::WorldServer, "Home location: %s (%d) %0.2f, %0.2f, %0.2f",
|
Log(Logs::Detail, Logs::WorldServer, "Home location: %s (%d) %0.2f, %0.2f, %0.2f",
|
||||||
database.GetZoneName(pp.binds[4].zoneId), pp.binds[4].zoneId, pp.binds[4].x, pp.binds[4].y, pp.binds[4].z);
|
content_db.GetZoneName(pp.binds[4].zoneId), pp.binds[4].zoneId, pp.binds[4].x, pp.binds[4].y, pp.binds[4].z);
|
||||||
|
|
||||||
/* Starting Items inventory */
|
/* Starting Items inventory */
|
||||||
content_db.SetStartingItems(&pp, &inv, pp.race, pp.class_, pp.deity, pp.zone_id, pp.name, GetAdmin());
|
content_db.SetStartingItems(&pp, &inv, pp.race, pp.class_, pp.deity, pp.zone_id, pp.name, GetAdmin());
|
||||||
|
|||||||
@ -293,7 +293,7 @@ void ClientList::SendCLEList(const int16& admin, const char* to, WorldTCPConnect
|
|||||||
if (cle->LSID())
|
if (cle->LSID())
|
||||||
AppendAnyLenString(&output, &outsize, &outlen, "%s LSID: %i LSName: %s WorldAdmin: %i", newline, cle->LSID(), cle->LSName(), cle->WorldAdmin());
|
AppendAnyLenString(&output, &outsize, &outlen, "%s LSID: %i LSName: %s WorldAdmin: %i", newline, cle->LSID(), cle->LSName(), cle->WorldAdmin());
|
||||||
if (cle->CharID())
|
if (cle->CharID())
|
||||||
AppendAnyLenString(&output, &outsize, &outlen, "%s CharID: %i CharName: %s Zone: %s (%i)", newline, cle->CharID(), cle->name(), database.GetZoneName(cle->zone()), cle->zone());
|
AppendAnyLenString(&output, &outsize, &outlen, "%s CharID: %i CharName: %s Zone: %s (%i)", newline, cle->CharID(), cle->name(), content_db.GetZoneName(cle->zone()), cle->zone());
|
||||||
if (outlen >= 3072) {
|
if (outlen >= 3072) {
|
||||||
connection->SendEmoteMessageRaw(to, 0, 0, 10, output);
|
connection->SendEmoteMessageRaw(to, 0, 0, 10, output);
|
||||||
safe_delete(output);
|
safe_delete(output);
|
||||||
@ -500,7 +500,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S
|
|||||||
countclients.Reset();
|
countclients.Reset();
|
||||||
while(countclients.MoreElements()){
|
while(countclients.MoreElements()){
|
||||||
countcle = countclients.GetData();
|
countcle = countclients.GetData();
|
||||||
const char* tmpZone = database.GetZoneName(countcle->zone());
|
const char* tmpZone = content_db.GetZoneName(countcle->zone());
|
||||||
if (
|
if (
|
||||||
(countcle->Online() >= CLE_Status::Zoning) &&
|
(countcle->Online() >= CLE_Status::Zoning) &&
|
||||||
(!countcle->GetGM() || countcle->Anon() != 1 || admin >= countcle->Admin()) &&
|
(!countcle->GetGM() || countcle->Anon() != 1 || admin >= countcle->Admin()) &&
|
||||||
@ -580,7 +580,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S
|
|||||||
while(iterator.MoreElements()) {
|
while(iterator.MoreElements()) {
|
||||||
cle = iterator.GetData();
|
cle = iterator.GetData();
|
||||||
|
|
||||||
const char* tmpZone = database.GetZoneName(cle->zone());
|
const char* tmpZone = content_db.GetZoneName(cle->zone());
|
||||||
if (
|
if (
|
||||||
(cle->Online() >= CLE_Status::Zoning) &&
|
(cle->Online() >= CLE_Status::Zoning) &&
|
||||||
(!cle->GetGM() || cle->Anon() != 1 || admin >= cle->Admin()) &&
|
(!cle->GetGM() || cle->Anon() != 1 || admin >= cle->Admin()) &&
|
||||||
@ -965,7 +965,7 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct*
|
|||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
while (iterator.MoreElements()) {
|
while (iterator.MoreElements()) {
|
||||||
cle = iterator.GetData();
|
cle = iterator.GetData();
|
||||||
const char* tmpZone = database.GetZoneName(cle->zone());
|
const char* tmpZone = content_db.GetZoneName(cle->zone());
|
||||||
if (
|
if (
|
||||||
(cle->Online() >= CLE_Status::Zoning)
|
(cle->Online() >= CLE_Status::Zoning)
|
||||||
&& (whom == 0 || (
|
&& (whom == 0 || (
|
||||||
@ -1282,7 +1282,7 @@ void ClientList::GetClients(const char *zone_name, std::vector<ClientListEntry *
|
|||||||
iterator.Advance();
|
iterator.Advance();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uint32 zoneid = database.GetZoneID(zone_name);
|
uint32 zoneid = content_db.GetZoneID(zone_name);
|
||||||
while(iterator.MoreElements()) {
|
while(iterator.MoreElements()) {
|
||||||
ClientListEntry* tmp = iterator.GetData();
|
ClientListEntry* tmp = iterator.GetData();
|
||||||
if(tmp->zone() == zoneid)
|
if(tmp->zone() == zoneid)
|
||||||
|
|||||||
@ -541,7 +541,7 @@ void ConsoleZoneShutdown(
|
|||||||
s->ZoneServerID = atoi(args[0].c_str());
|
s->ZoneServerID = atoi(args[0].c_str());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s->zoneid = database.GetZoneID(args[0].c_str());
|
s->zoneid = content_db.GetZoneID(args[0].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
ZoneServer *zs = 0;
|
ZoneServer *zs = 0;
|
||||||
@ -549,7 +549,7 @@ void ConsoleZoneShutdown(
|
|||||||
zs = zoneserver_list.FindByID(s->ZoneServerID);
|
zs = zoneserver_list.FindByID(s->ZoneServerID);
|
||||||
}
|
}
|
||||||
else if (s->zoneid != 0) {
|
else if (s->zoneid != 0) {
|
||||||
zs = zoneserver_list.FindByName(database.GetZoneName(s->zoneid));
|
zs = zoneserver_list.FindByName(content_db.GetZoneName(s->zoneid));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
connection->SendLine("Error: ZoneShutdown: neither ID nor name specified");
|
connection->SendLine("Error: ZoneShutdown: neither ID nor name specified");
|
||||||
@ -633,10 +633,10 @@ void ConsoleZoneLock(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 tmp = database.GetZoneID(args[1].c_str());
|
uint16 tmp = content_db.GetZoneID(args[1].c_str());
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
if (zoneserver_list.SetLockedZone(tmp, true)) {
|
if (zoneserver_list.SetLockedZone(tmp, true)) {
|
||||||
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone locked: %s", database.GetZoneName(tmp));
|
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone locked: %s", content_db.GetZoneName(tmp));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
connection->SendLine("Failed to change lock");
|
connection->SendLine("Failed to change lock");
|
||||||
@ -651,10 +651,10 @@ void ConsoleZoneLock(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 tmp = database.GetZoneID(args[1].c_str());
|
uint16 tmp = content_db.GetZoneID(args[1].c_str());
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
if (zoneserver_list.SetLockedZone(tmp, false)) {
|
if (zoneserver_list.SetLockedZone(tmp, false)) {
|
||||||
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone unlocked: %s", database.GetZoneName(tmp));
|
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone unlocked: %s", content_db.GetZoneName(tmp));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
connection->SendLine("Failed to change lock");
|
connection->SendLine("Failed to change lock");
|
||||||
|
|||||||
@ -616,7 +616,7 @@ void Console::ProcessCommand(const char* command) {
|
|||||||
if(sep.arg[1][0]==0 || sep.arg[2][0] == 0)
|
if(sep.arg[1][0]==0 || sep.arg[2][0] == 0)
|
||||||
SendMessage(1, "Usage: movechar [charactername] [zonename]");
|
SendMessage(1, "Usage: movechar [charactername] [zonename]");
|
||||||
else {
|
else {
|
||||||
if (!database.GetZoneID(sep.arg[2]))
|
if (!content_db.GetZoneID(sep.arg[2]))
|
||||||
SendMessage(1, "Error: Zone '%s' not found", sep.arg[2]);
|
SendMessage(1, "Error: Zone '%s' not found", sep.arg[2]);
|
||||||
else if (!database.CheckUsedName((char*) sep.arg[1])) {
|
else if (!database.CheckUsedName((char*) sep.arg[1])) {
|
||||||
if (!database.MoveCharacterToZone((char*) sep.arg[1], (char*) sep.arg[2]))
|
if (!database.MoveCharacterToZone((char*) sep.arg[1], (char*) sep.arg[2]))
|
||||||
@ -711,13 +711,13 @@ void Console::ProcessCommand(const char* command) {
|
|||||||
if (sep.arg[1][0] >= '0' && sep.arg[1][0] <= '9')
|
if (sep.arg[1][0] >= '0' && sep.arg[1][0] <= '9')
|
||||||
s->ZoneServerID = atoi(sep.arg[1]);
|
s->ZoneServerID = atoi(sep.arg[1]);
|
||||||
else
|
else
|
||||||
s->zoneid = database.GetZoneID(sep.arg[1]);
|
s->zoneid = content_db.GetZoneID(sep.arg[1]);
|
||||||
|
|
||||||
ZoneServer* zs = 0;
|
ZoneServer* zs = 0;
|
||||||
if (s->ZoneServerID != 0)
|
if (s->ZoneServerID != 0)
|
||||||
zs = zoneserver_list.FindByID(s->ZoneServerID);
|
zs = zoneserver_list.FindByID(s->ZoneServerID);
|
||||||
else if (s->zoneid != 0)
|
else if (s->zoneid != 0)
|
||||||
zs = zoneserver_list.FindByName(database.GetZoneName(s->zoneid));
|
zs = zoneserver_list.FindByName(content_db.GetZoneName(s->zoneid));
|
||||||
else
|
else
|
||||||
SendMessage(1, "Error: ZoneShutdown: neither ID nor name specified");
|
SendMessage(1, "Error: ZoneShutdown: neither ID nor name specified");
|
||||||
|
|
||||||
@ -828,10 +828,10 @@ void Console::ProcessCommand(const char* command) {
|
|||||||
zoneserver_list.ListLockedZones(0, this);
|
zoneserver_list.ListLockedZones(0, this);
|
||||||
}
|
}
|
||||||
else if (strcasecmp(sep.arg[1], "lock") == 0 && admin >= 101) {
|
else if (strcasecmp(sep.arg[1], "lock") == 0 && admin >= 101) {
|
||||||
uint16 tmp = database.GetZoneID(sep.arg[2]);
|
uint16 tmp = content_db.GetZoneID(sep.arg[2]);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
if (zoneserver_list.SetLockedZone(tmp, true))
|
if (zoneserver_list.SetLockedZone(tmp, true))
|
||||||
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone locked: %s", database.GetZoneName(tmp));
|
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone locked: %s", content_db.GetZoneName(tmp));
|
||||||
else
|
else
|
||||||
SendMessage(1, "Failed to change lock");
|
SendMessage(1, "Failed to change lock");
|
||||||
}
|
}
|
||||||
@ -839,10 +839,10 @@ void Console::ProcessCommand(const char* command) {
|
|||||||
SendMessage(1, "Usage: #zonelock lock [zonename]");
|
SendMessage(1, "Usage: #zonelock lock [zonename]");
|
||||||
}
|
}
|
||||||
else if (strcasecmp(sep.arg[1], "unlock") == 0 && admin >= 101) {
|
else if (strcasecmp(sep.arg[1], "unlock") == 0 && admin >= 101) {
|
||||||
uint16 tmp = database.GetZoneID(sep.arg[2]);
|
uint16 tmp = content_db.GetZoneID(sep.arg[2]);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
if (zoneserver_list.SetLockedZone(tmp, false))
|
if (zoneserver_list.SetLockedZone(tmp, false))
|
||||||
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone unlocked: %s", database.GetZoneName(tmp));
|
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone unlocked: %s", content_db.GetZoneName(tmp));
|
||||||
else
|
else
|
||||||
SendMessage(1, "Failed to change lock");
|
SendMessage(1, "Failed to change lock");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -156,7 +156,7 @@ void EQLConfig::StartZone(Const_char *zone_ref) {
|
|||||||
|
|
||||||
bool EQLConfig::BootStaticZone(Const_char *short_name, uint16 port) {
|
bool EQLConfig::BootStaticZone(Const_char *short_name, uint16 port) {
|
||||||
//make sure the short name is valid.
|
//make sure the short name is valid.
|
||||||
if(database.GetZoneID(short_name) == 0)
|
if(content_db.GetZoneID(short_name) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//database update
|
//database update
|
||||||
@ -191,7 +191,7 @@ bool EQLConfig::BootStaticZone(Const_char *short_name, uint16 port) {
|
|||||||
|
|
||||||
bool EQLConfig::ChangeStaticZone(Const_char *short_name, uint16 port) {
|
bool EQLConfig::ChangeStaticZone(Const_char *short_name, uint16 port) {
|
||||||
//make sure the short name is valid.
|
//make sure the short name is valid.
|
||||||
if(database.GetZoneID(short_name) == 0)
|
if(content_db.GetZoneID(short_name) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//check internal state
|
//check internal state
|
||||||
|
|||||||
@ -188,7 +188,7 @@ std::map<std::string,std::string> EQW::GetPlayerDetails(Const_char *char_name) {
|
|||||||
res["character"] = cle->name();
|
res["character"] = cle->name();
|
||||||
res["account"] = cle->AccountName();
|
res["account"] = cle->AccountName();
|
||||||
res["account_id"] = itoa(cle->AccountID());
|
res["account_id"] = itoa(cle->AccountID());
|
||||||
res["location_short"] = cle->zone()?database.GetZoneName(cle->zone()):"No Zone";
|
res["location_short"] = cle->zone()?content_db.GetZoneName(cle->zone()):"No Zone";
|
||||||
res["location_long"] = res["location_short"];
|
res["location_long"] = res["location_short"];
|
||||||
res["location_id"] = itoa(cle->zone());
|
res["location_id"] = itoa(cle->zone());
|
||||||
res["ip"] = long2ip(cle->GetIP());
|
res["ip"] = long2ip(cle->GetIP());
|
||||||
|
|||||||
@ -251,7 +251,7 @@ void ZSList::ListLockedZones(const char* to, WorldTCPConnection* connection) {
|
|||||||
int x = 0;
|
int x = 0;
|
||||||
for (auto &zone : pLockedZones) {
|
for (auto &zone : pLockedZones) {
|
||||||
if (zone) {
|
if (zone) {
|
||||||
connection->SendEmoteMessageRaw(to, 0, 0, 0, database.GetZoneName(zone, true));
|
connection->SendEmoteMessageRaw(to, 0, 0, 0, content_db.GetZoneName(zone, true));
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -517,7 +517,7 @@ void ZSList::SOPZoneBootup(const char* adminname, uint32 ZoneServerID, const cha
|
|||||||
ZoneServer* zs = 0;
|
ZoneServer* zs = 0;
|
||||||
ZoneServer* zs2 = 0;
|
ZoneServer* zs2 = 0;
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
if (!(zoneid = database.GetZoneID(zonename)))
|
if (!(zoneid = content_db.GetZoneID(zonename)))
|
||||||
SendEmoteMessage(adminname, 0, 0, 0, "Error: SOP_ZoneBootup: zone '%s' not found in 'zone' table. Typo protection=ON.", zonename);
|
SendEmoteMessage(adminname, 0, 0, 0, "Error: SOP_ZoneBootup: zone '%s' not found in 'zone' table. Typo protection=ON.", zonename);
|
||||||
else {
|
else {
|
||||||
if (ZoneServerID != 0)
|
if (ZoneServerID != 0)
|
||||||
|
|||||||
@ -86,7 +86,7 @@ ZoneServer::~ZoneServer() {
|
|||||||
bool ZoneServer::SetZone(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
bool ZoneServer::SetZone(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||||
is_booting_up = false;
|
is_booting_up = false;
|
||||||
|
|
||||||
const char* zn = MakeLowerString(database.GetZoneName(iZoneID));
|
const char* zn = MakeLowerString(content_db.GetZoneName(iZoneID));
|
||||||
char* longname;
|
char* longname;
|
||||||
|
|
||||||
if (iZoneID)
|
if (iZoneID)
|
||||||
@ -566,7 +566,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
|||||||
|
|
||||||
SetZone_Struct* szs = (SetZone_Struct*)pack->pBuffer;
|
SetZone_Struct* szs = (SetZone_Struct*)pack->pBuffer;
|
||||||
if (szs->zoneid != 0) {
|
if (szs->zoneid != 0) {
|
||||||
if (database.GetZoneName(szs->zoneid))
|
if (content_db.GetZoneName(szs->zoneid))
|
||||||
SetZone(szs->zoneid, szs->instanceid, szs->staticzone);
|
SetZone(szs->zoneid, szs->instanceid, szs->staticzone);
|
||||||
else
|
else
|
||||||
SetZone(0);
|
SetZone(0);
|
||||||
@ -648,7 +648,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
|||||||
if (s->ZoneServerID != 0)
|
if (s->ZoneServerID != 0)
|
||||||
zs = zoneserver_list.FindByID(s->ZoneServerID);
|
zs = zoneserver_list.FindByID(s->ZoneServerID);
|
||||||
else if (s->zoneid != 0)
|
else if (s->zoneid != 0)
|
||||||
zs = zoneserver_list.FindByName(database.GetZoneName(s->zoneid));
|
zs = zoneserver_list.FindByName(content_db.GetZoneName(s->zoneid));
|
||||||
else
|
else
|
||||||
zoneserver_list.SendEmoteMessage(s->adminname, 0, 0, 0, "Error: SOP_ZoneShutdown: neither ID nor name specified");
|
zoneserver_list.SendEmoteMessage(s->adminname, 0, 0, 0, "Error: SOP_ZoneShutdown: neither ID nor name specified");
|
||||||
|
|
||||||
@ -660,7 +660,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
|||||||
}
|
}
|
||||||
case ServerOP_ZoneBootup: {
|
case ServerOP_ZoneBootup: {
|
||||||
ServerZoneStateChange_struct* s = (ServerZoneStateChange_struct *)pack->pBuffer;
|
ServerZoneStateChange_struct* s = (ServerZoneStateChange_struct *)pack->pBuffer;
|
||||||
zoneserver_list.SOPZoneBootup(s->adminname, s->ZoneServerID, database.GetZoneName(s->zoneid), s->makestatic);
|
zoneserver_list.SOPZoneBootup(s->adminname, s->ZoneServerID, content_db.GetZoneName(s->zoneid), s->makestatic);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ServerOP_ZoneStatus: {
|
case ServerOP_ZoneStatus: {
|
||||||
@ -1018,13 +1018,13 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (zoneserver_list.SetLockedZone(s->zoneID, true))
|
if (zoneserver_list.SetLockedZone(s->zoneID, true))
|
||||||
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone locked: %s", database.GetZoneName(s->zoneID));
|
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone locked: %s", content_db.GetZoneName(s->zoneID));
|
||||||
else
|
else
|
||||||
this->SendEmoteMessageRaw(s->adminname, 0, 0, 0, "Failed to change lock");
|
this->SendEmoteMessageRaw(s->adminname, 0, 0, 0, "Failed to change lock");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (zoneserver_list.SetLockedZone(s->zoneID, false))
|
if (zoneserver_list.SetLockedZone(s->zoneID, false))
|
||||||
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone unlocked: %s", database.GetZoneName(s->zoneID));
|
zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone unlocked: %s", content_db.GetZoneName(s->zoneID));
|
||||||
else
|
else
|
||||||
this->SendEmoteMessageRaw(s->adminname, 0, 0, 0, "Failed to change lock");
|
this->SendEmoteMessageRaw(s->adminname, 0, 0, 0, "Failed to change lock");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -1893,7 +1893,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQEmu::skills::Sk
|
|||||||
dead_timer.Start(5000, true);
|
dead_timer.Start(5000, true);
|
||||||
m_pp.zone_id = m_pp.binds[0].zoneId;
|
m_pp.zone_id = m_pp.binds[0].zoneId;
|
||||||
m_pp.zoneInstance = m_pp.binds[0].instance_id;
|
m_pp.zoneInstance = m_pp.binds[0].instance_id;
|
||||||
database.MoveCharacterToZone(this->CharacterID(), database.GetZoneName(m_pp.zone_id));
|
database.MoveCharacterToZone(this->CharacterID(), content_db.GetZoneName(m_pp.zone_id));
|
||||||
Save();
|
Save();
|
||||||
GoToDeath();
|
GoToDeath();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4004,7 +4004,7 @@ void Client::SendOPTranslocateConfirm(Mob *Caster, uint16 SpellID) {
|
|||||||
PendingTranslocateData.heading = m_pp.binds[0].heading;
|
PendingTranslocateData.heading = m_pp.binds[0].heading;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PendingTranslocateData.zone_id = ts->ZoneID = database.GetZoneID(Spell.teleport_zone);
|
PendingTranslocateData.zone_id = ts->ZoneID = content_db.GetZoneID(Spell.teleport_zone);
|
||||||
PendingTranslocateData.instance_id = 0;
|
PendingTranslocateData.instance_id = 0;
|
||||||
PendingTranslocateData.y = ts->y = Spell.base[0];
|
PendingTranslocateData.y = ts->y = Spell.base[0];
|
||||||
PendingTranslocateData.x = ts->x = Spell.base[1];
|
PendingTranslocateData.x = ts->x = Spell.base[1];
|
||||||
@ -5286,7 +5286,7 @@ void Client::SetStartZone(uint32 zoneid, float x, float y, float z)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check to make sure the zone is valid
|
// check to make sure the zone is valid
|
||||||
const char *target_zone_name = database.GetZoneName(zoneid);
|
const char *target_zone_name = content_db.GetZoneName(zoneid);
|
||||||
if(target_zone_name == nullptr)
|
if(target_zone_name == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -789,7 +789,7 @@ void Client::CompleteConnect()
|
|||||||
//enforce some rules..
|
//enforce some rules..
|
||||||
if (!CanBeInZone()) {
|
if (!CanBeInZone()) {
|
||||||
LogDebug("[CLIENT] Kicking char from zone, not allowed here");
|
LogDebug("[CLIENT] Kicking char from zone, not allowed here");
|
||||||
GoToSafeCoords(database.GetZoneID("arena"), 0);
|
GoToSafeCoords(content_db.GetZoneID("arena"), 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6400,7 +6400,7 @@ void Client::Handle_OP_GMZoneRequest(const EQApplicationPacket *app)
|
|||||||
uint16 zid = gmzr->zone_id;
|
uint16 zid = gmzr->zone_id;
|
||||||
if (gmzr->zone_id == 0)
|
if (gmzr->zone_id == 0)
|
||||||
zid = zonesummon_id;
|
zid = zonesummon_id;
|
||||||
const char * zname = database.GetZoneName(zid);
|
const char * zname = content_db.GetZoneName(zid);
|
||||||
if (zname == nullptr)
|
if (zname == nullptr)
|
||||||
tarzone[0] = 0;
|
tarzone[0] = 0;
|
||||||
else
|
else
|
||||||
@ -12357,7 +12357,7 @@ void Client::Handle_OP_SetStartCity(const EQApplicationPacket *app)
|
|||||||
{
|
{
|
||||||
// if the character has a start city, don't let them use the command
|
// if the character has a start city, don't let them use the command
|
||||||
if (m_pp.binds[4].zoneId != 0 && m_pp.binds[4].zoneId != 189) {
|
if (m_pp.binds[4].zoneId != 0 && m_pp.binds[4].zoneId != 189) {
|
||||||
Message(Chat::Yellow, "Your home city has already been set.", m_pp.binds[4].zoneId, database.GetZoneName(m_pp.binds[4].zoneId));
|
Message(Chat::Yellow, "Your home city has already been set.", m_pp.binds[4].zoneId, content_db.GetZoneName(m_pp.binds[4].zoneId));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12418,7 +12418,7 @@ void Client::Handle_OP_SetStartCity(const EQApplicationPacket *app)
|
|||||||
zoneid = atoi(row[0]);
|
zoneid = atoi(row[0]);
|
||||||
|
|
||||||
char* name = nullptr;
|
char* name = nullptr;
|
||||||
content_db.GetZoneLongName(database.GetZoneName(zoneid), &name);
|
content_db.GetZoneLongName(content_db.GetZoneName(zoneid), &name);
|
||||||
Message(Chat::Yellow, "%d - %s", zoneid, name);
|
Message(Chat::Yellow, "%d - %s", zoneid, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -129,7 +129,7 @@ bool Client::Process() {
|
|||||||
CheckManaEndUpdate();
|
CheckManaEndUpdate();
|
||||||
|
|
||||||
if (dead && dead_timer.Check()) {
|
if (dead && dead_timer.Check()) {
|
||||||
database.MoveCharacterToZone(GetName(), database.GetZoneName(m_pp.binds[0].zoneId));
|
database.MoveCharacterToZone(GetName(), content_db.GetZoneName(m_pp.binds[0].zoneId));
|
||||||
|
|
||||||
m_pp.zone_id = m_pp.binds[0].zoneId;
|
m_pp.zone_id = m_pp.binds[0].zoneId;
|
||||||
m_pp.zoneInstance = m_pp.binds[0].instance_id;
|
m_pp.zoneInstance = m_pp.binds[0].instance_id;
|
||||||
@ -2087,7 +2087,7 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
|||||||
|
|
||||||
m_pp.zone_id = chosen->zone_id;
|
m_pp.zone_id = chosen->zone_id;
|
||||||
m_pp.zoneInstance = chosen->instance_id;
|
m_pp.zoneInstance = chosen->instance_id;
|
||||||
database.MoveCharacterToZone(CharacterID(), database.GetZoneName(chosen->zone_id));
|
database.MoveCharacterToZone(CharacterID(), content_db.GetZoneName(chosen->zone_id));
|
||||||
|
|
||||||
Save();
|
Save();
|
||||||
|
|
||||||
|
|||||||
212
zone/command.cpp
212
zone/command.cpp
@ -813,7 +813,7 @@ void command_setfaction(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
std::string query = StringFormat("UPDATE npc_types SET npc_faction_id = %i WHERE id = %i",
|
std::string query = StringFormat("UPDATE npc_types SET npc_faction_id = %i WHERE id = %i",
|
||||||
atoi(sep->argplus[1]), npcTypeID);
|
atoi(sep->argplus[1]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
void command_serversidename(Client *c, const Seperator *sep)
|
void command_serversidename(Client *c, const Seperator *sep)
|
||||||
@ -1171,7 +1171,7 @@ void command_zone(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
zoneid = database.GetZoneID(sep->arg[1]);
|
zoneid = content_db.GetZoneID(sep->arg[1]);
|
||||||
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;
|
||||||
@ -1306,7 +1306,7 @@ void command_peqzone(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
zoneid = database.GetZoneID(sep->arg[1]);
|
zoneid = content_db.GetZoneID(sep->arg[1]);
|
||||||
destzone = database.GetPEQZone(zoneid, 0);
|
destzone = database.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]);
|
||||||
@ -2105,7 +2105,7 @@ void command_zheader(Client *c, const Seperator *sep)
|
|||||||
if(sep->arg[1][0]==0) {
|
if(sep->arg[1][0]==0) {
|
||||||
c->Message(Chat::White, "Usage: #zheader <zone name>");
|
c->Message(Chat::White, "Usage: #zheader <zone name>");
|
||||||
}
|
}
|
||||||
else if(database.GetZoneID(sep->argplus[1])==0)
|
else if(content_db.GetZoneID(sep->argplus[1])==0)
|
||||||
c->Message(Chat::White, "Invalid Zone Name: %s", sep->argplus[1]);
|
c->Message(Chat::White, "Invalid Zone Name: %s", sep->argplus[1]);
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@ -3953,7 +3953,7 @@ void command_findnpctype(Client *c, const Seperator *sep)
|
|||||||
else // Otherwise, look for just that npc id.
|
else // Otherwise, look for just that npc id.
|
||||||
query = StringFormat("SELECT id, name FROM npc_types WHERE id = %i", id);
|
query = StringFormat("SELECT id, name FROM npc_types WHERE id = %i", id);
|
||||||
|
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
c->Message (0, "Error querying database.");
|
c->Message (0, "Error querying database.");
|
||||||
c->Message (0, query.c_str());
|
c->Message (0, query.c_str());
|
||||||
@ -4290,7 +4290,7 @@ void command_zoneshutdown(Client *c, const Seperator *sep)
|
|||||||
if (sep->arg[1][0] >= '0' && sep->arg[1][0] <= '9')
|
if (sep->arg[1][0] >= '0' && sep->arg[1][0] <= '9')
|
||||||
s->ZoneServerID = atoi(sep->arg[1]);
|
s->ZoneServerID = atoi(sep->arg[1]);
|
||||||
else
|
else
|
||||||
s->zoneid = database.GetZoneID(sep->arg[1]);
|
s->zoneid = content_db.GetZoneID(sep->arg[1]);
|
||||||
worldserver.SendPacket(pack);
|
worldserver.SendPacket(pack);
|
||||||
safe_delete(pack);
|
safe_delete(pack);
|
||||||
}
|
}
|
||||||
@ -4308,7 +4308,7 @@ void command_zonebootup(Client *c, const Seperator *sep)
|
|||||||
ServerZoneStateChange_struct* s = (ServerZoneStateChange_struct *) pack->pBuffer;
|
ServerZoneStateChange_struct* s = (ServerZoneStateChange_struct *) pack->pBuffer;
|
||||||
s->ZoneServerID = atoi(sep->arg[1]);
|
s->ZoneServerID = atoi(sep->arg[1]);
|
||||||
strcpy(s->adminname, c->GetName());
|
strcpy(s->adminname, c->GetName());
|
||||||
s->zoneid = database.GetZoneID(sep->arg[2]);
|
s->zoneid = content_db.GetZoneID(sep->arg[2]);
|
||||||
s->makestatic = (bool) (strcasecmp(sep->arg[3], "static") == 0);
|
s->makestatic = (bool) (strcasecmp(sep->arg[3], "static") == 0);
|
||||||
worldserver.SendPacket(pack);
|
worldserver.SendPacket(pack);
|
||||||
safe_delete(pack);
|
safe_delete(pack);
|
||||||
@ -4491,7 +4491,7 @@ void command_zonelock(Client *c, const Seperator *sep)
|
|||||||
worldserver.SendPacket(pack);
|
worldserver.SendPacket(pack);
|
||||||
}
|
}
|
||||||
else if (strcasecmp(sep->arg[1], "lock") == 0 && c->Admin() >= commandLockZones) {
|
else if (strcasecmp(sep->arg[1], "lock") == 0 && c->Admin() >= commandLockZones) {
|
||||||
uint16 tmp = database.GetZoneID(sep->arg[2]);
|
uint16 tmp = content_db.GetZoneID(sep->arg[2]);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
s->op = 1;
|
s->op = 1;
|
||||||
s->zoneID = tmp;
|
s->zoneID = tmp;
|
||||||
@ -4501,7 +4501,7 @@ void command_zonelock(Client *c, const Seperator *sep)
|
|||||||
c->Message(Chat::White, "Usage: #zonelock lock [zonename]");
|
c->Message(Chat::White, "Usage: #zonelock lock [zonename]");
|
||||||
}
|
}
|
||||||
else if (strcasecmp(sep->arg[1], "unlock") == 0 && c->Admin() >= commandLockZones) {
|
else if (strcasecmp(sep->arg[1], "unlock") == 0 && c->Admin() >= commandLockZones) {
|
||||||
uint16 tmp = database.GetZoneID(sep->arg[2]);
|
uint16 tmp = content_db.GetZoneID(sep->arg[2]);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
s->op = 2;
|
s->op = 2;
|
||||||
s->zoneID = tmp;
|
s->zoneID = tmp;
|
||||||
@ -4908,7 +4908,7 @@ void command_gmzone(Client *c, const Seperator *sep)
|
|||||||
const char *zone_short_name = sep->arg[1];
|
const char *zone_short_name = sep->arg[1];
|
||||||
auto zone_version = static_cast<uint32>(sep->arg[2] ? atoi(sep->arg[2]) : 0);
|
auto zone_version = static_cast<uint32>(sep->arg[2] ? atoi(sep->arg[2]) : 0);
|
||||||
std::string identifier = "gmzone";
|
std::string identifier = "gmzone";
|
||||||
uint32 zone_id = database.GetZoneID(zone_short_name);
|
uint32 zone_id = content_db.GetZoneID(zone_short_name);
|
||||||
uint32 duration = 100000000;
|
uint32 duration = 100000000;
|
||||||
uint16 instance_id = 0;
|
uint16 instance_id = 0;
|
||||||
|
|
||||||
@ -7813,7 +7813,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
bool valid_change_column = false;
|
bool valid_change_column = false;
|
||||||
bool valid_search_column = false;
|
bool valid_search_column = false;
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
|
|
||||||
std::vector <std::string> possible_column_options;
|
std::vector <std::string> possible_column_options;
|
||||||
|
|
||||||
@ -7888,7 +7888,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int found_count = 0;
|
int found_count = 0;
|
||||||
results = database.QueryDatabase(query);
|
results = content_db.QueryDatabase(query);
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
|
|
||||||
std::string npc_id = row[0];
|
std::string npc_id = row[0];
|
||||||
@ -7943,7 +7943,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
database.QueryDatabase(
|
content_db.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"UPDATE `npc_types` SET {} = '{}' WHERE id IN ({})",
|
"UPDATE `npc_types` SET {} = '{}' WHERE id IN ({})",
|
||||||
change_column,
|
change_column,
|
||||||
@ -8064,161 +8064,161 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
if (strcasecmp(sep->arg[1], "name") == 0) {
|
if (strcasecmp(sep->arg[1], "name") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has the name %s.", npcTypeID, sep->argplus[2]);
|
c->Message(Chat::Yellow,"NPCID %u now has the name %s.", npcTypeID, sep->argplus[2]);
|
||||||
std::string query = StringFormat("UPDATE npc_types SET name = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET name = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "lastname") == 0) {
|
if (strcasecmp(sep->arg[1], "lastname") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has the lastname %s.", npcTypeID, sep->argplus[2]);
|
c->Message(Chat::Yellow,"NPCID %u now has the lastname %s.", npcTypeID, sep->argplus[2]);
|
||||||
std::string query = StringFormat("UPDATE npc_types SET lastname = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET lastname = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "flymode") == 0) {
|
if (strcasecmp(sep->arg[1], "flymode") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has flymode [%s]", npcTypeID, sep->argplus[2]);
|
c->Message(Chat::Yellow,"NPCID %u now has flymode [%s]", npcTypeID, sep->argplus[2]);
|
||||||
std::string query = StringFormat("UPDATE npc_types SET flymode = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET flymode = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "race") == 0) {
|
if (strcasecmp(sep->arg[1], "race") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has the race %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has the race %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET race = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET race = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "class") == 0) {
|
if (strcasecmp(sep->arg[1], "class") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now class %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u is now class %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET class = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET class = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "bodytype") == 0) {
|
if (strcasecmp(sep->arg[1], "bodytype") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has type %i bodytype.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has type %i bodytype.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET bodytype = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET bodytype = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "hp") == 0) {
|
if (strcasecmp(sep->arg[1], "hp") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Hitpoints.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Hitpoints.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET hp = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET hp = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "gender") == 0) {
|
if (strcasecmp(sep->arg[1], "gender") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now gender %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u is now gender %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET gender = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET gender = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "texture") == 0) {
|
if (strcasecmp(sep->arg[1], "texture") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses texture %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses texture %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET texture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET texture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "helmtexture") == 0) {
|
if (strcasecmp(sep->arg[1], "helmtexture") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses helmtexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses helmtexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET helmtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET helmtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "armtexture") == 0) {
|
if (strcasecmp(sep->arg[1], "armtexture") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses armtexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses armtexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET armtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET armtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "bracertexture") == 0) {
|
if (strcasecmp(sep->arg[1], "bracertexture") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses bracertexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses bracertexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET bracertexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET bracertexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "handtexture") == 0) {
|
if (strcasecmp(sep->arg[1], "handtexture") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses handtexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses handtexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET handtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET handtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "legtexture") == 0) {
|
if (strcasecmp(sep->arg[1], "legtexture") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses legtexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses legtexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET legtexture = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET legtexture = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "feettexture") == 0) {
|
if (strcasecmp(sep->arg[1], "feettexture") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses feettexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses feettexture %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET feettexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET feettexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "herosforgemodel") == 0) {
|
if (strcasecmp(sep->arg[1], "herosforgemodel") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses herosforgemodel %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses herosforgemodel %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET herosforgemodel = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET herosforgemodel = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "size") == 0) {
|
if (strcasecmp(sep->arg[1], "size") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now size %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u is now size %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET size = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET size = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "hpregen") == 0) {
|
if (strcasecmp(sep->arg[1], "hpregen") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now regens %i hitpoints per tick.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now regens %i hitpoints per tick.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET hp_regen_rate = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET hp_regen_rate = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "manaregen") == 0) {
|
if (strcasecmp(sep->arg[1], "manaregen") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now regens %i mana per tick.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now regens %i mana per tick.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET mana_regen_rate = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET mana_regen_rate = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "loottable") == 0) {
|
if (strcasecmp(sep->arg[1], "loottable") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now on loottable_id %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u is now on loottable_id %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET loottable_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET loottable_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "merchantid") == 0) {
|
if (strcasecmp(sep->arg[1], "merchantid") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now merchant_id %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u is now merchant_id %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET merchant_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET merchant_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "alt_currency_id") == 0) {
|
if (strcasecmp(sep->arg[1], "alt_currency_id") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has field 'alt_currency_id' set to %s.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has field 'alt_currency_id' set to %s.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET alt_currency_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET alt_currency_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "npc_spells_effects_id") == 0) {
|
if (strcasecmp(sep->arg[1], "npc_spells_effects_id") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has field 'npc_spells_effects_id' set to %s.", npcTypeID, sep->argplus[2]);
|
c->Message(Chat::Yellow,"NPCID %u now has field 'npc_spells_effects_id' set to %s.", npcTypeID, sep->argplus[2]);
|
||||||
std::string query = StringFormat("UPDATE npc_types SET npc_spells_effects_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET npc_spells_effects_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8232,322 +8232,322 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
if (strcasecmp(sep->arg[1], "trap_template") == 0) {
|
if (strcasecmp(sep->arg[1], "trap_template") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has field 'trap_template' set to %s.", npcTypeID, sep->argplus[2]);
|
c->Message(Chat::Yellow,"NPCID %u now has field 'trap_template' set to %s.", npcTypeID, sep->argplus[2]);
|
||||||
std::string query = StringFormat("UPDATE npc_types SET trap_template = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET trap_template = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "special_abilities") == 0) {
|
if (strcasecmp(sep->arg[1], "special_abilities") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has field 'special_abilities' set to %s.", npcTypeID, sep->argplus[2]);
|
c->Message(Chat::Yellow,"NPCID %u now has field 'special_abilities' set to %s.", npcTypeID, sep->argplus[2]);
|
||||||
std::string query = StringFormat("UPDATE npc_types SET special_abilities = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET special_abilities = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "spell") == 0) {
|
if (strcasecmp(sep->arg[1], "spell") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now uses spell list %i", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now uses spell list %i", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET npc_spells_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET npc_spells_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "faction") == 0) {
|
if (strcasecmp(sep->arg[1], "faction") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now faction %i", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u is now faction %i", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET npc_faction_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET npc_faction_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "damage") == 0) {
|
if (strcasecmp(sep->arg[1], "damage") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now hits from %i to %i", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
c->Message(Chat::Yellow,"NPCID %u now hits from %i to %i", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET mindmg = %i, maxdmg = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET mindmg = %i, maxdmg = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "meleetype") == 0) {
|
if (strcasecmp(sep->arg[1], "meleetype") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a primary melee type of %i and a secondary melee type of %i.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
c->Message(Chat::Yellow,"NPCID %u now has a primary melee type of %i and a secondary melee type of %i.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET prim_melee_type = %i, sec_melee_type = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET prim_melee_type = %i, sec_melee_type = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "rangedtype") == 0) {
|
if (strcasecmp(sep->arg[1], "rangedtype") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a ranged type of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a ranged type of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET ranged_type = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET ranged_type = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "ammoidfile") == 0) {
|
if (strcasecmp(sep->arg[1], "ammoidfile") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u's ammo id file is now %i", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u's ammo id file is now %i", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET ammoidfile = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET ammoidfile = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "aggroradius") == 0) {
|
if (strcasecmp(sep->arg[1], "aggroradius") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has an aggro radius of %i", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has an aggro radius of %i", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET aggroradius = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET aggroradius = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "assistradius") == 0) {
|
if (strcasecmp(sep->arg[1], "assistradius") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has an assist radius of %i", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has an assist radius of %i", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET assistradius = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET assistradius = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "social") == 0) {
|
if (strcasecmp(sep->arg[1], "social") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u social status is now %i", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u social status is now %i", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET social = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET social = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "runspeed") == 0) {
|
if (strcasecmp(sep->arg[1], "runspeed") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now runs at %f", npcTypeID, atof(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now runs at %f", npcTypeID, atof(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET runspeed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET runspeed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "walkspeed") == 0) {
|
if (strcasecmp(sep->arg[1], "walkspeed") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now walks at %f", npcTypeID, atof(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now walks at %f", npcTypeID, atof(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET walkspeed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET walkspeed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "AGI") == 0) {
|
if (strcasecmp(sep->arg[1], "AGI") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Agility.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Agility.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET AGI = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET AGI = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "CHA") == 0) {
|
if (strcasecmp(sep->arg[1], "CHA") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Charisma.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Charisma.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET CHA = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET CHA = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "DEX") == 0) {
|
if (strcasecmp(sep->arg[1], "DEX") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Dexterity.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Dexterity.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET DEX = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET DEX = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "INT") == 0) {
|
if (strcasecmp(sep->arg[1], "INT") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Intelligence.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Intelligence.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET _INT = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET _INT = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "STA") == 0) {
|
if (strcasecmp(sep->arg[1], "STA") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Stamina.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Stamina.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET STA = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET STA = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "STR") == 0) {
|
if (strcasecmp(sep->arg[1], "STR") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Strength.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Strength.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET STR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET STR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "WIS") == 0) {
|
if (strcasecmp(sep->arg[1], "WIS") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET WIS = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET WIS = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "MR") == 0) {
|
if (strcasecmp(sep->arg[1], "MR") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET MR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET MR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "DR") == 0) {
|
if (strcasecmp(sep->arg[1], "DR") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a Disease Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a Disease Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET DR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET DR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "CR") == 0) {
|
if (strcasecmp(sep->arg[1], "CR") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a Cold Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a Cold Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET CR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET CR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "FR") == 0) {
|
if (strcasecmp(sep->arg[1], "FR") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a Fire Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a Fire Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET FR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET FR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "PR") == 0) {
|
if (strcasecmp(sep->arg[1], "PR") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a Poison Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a Poison Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET PR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET PR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "Corrup") == 0) {
|
if (strcasecmp(sep->arg[1], "Corrup") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a Corruption Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a Corruption Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET corrup = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET corrup = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "PhR") == 0) {
|
if (strcasecmp(sep->arg[1], "PhR") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a Physical Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a Physical Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET PhR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET PhR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "seeinvis") == 0) {
|
if (strcasecmp(sep->arg[1], "seeinvis") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has seeinvis set to %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has seeinvis set to %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET see_invis = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET see_invis = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "seeinvisundead") == 0) {
|
if (strcasecmp(sep->arg[1], "seeinvisundead") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has seeinvisundead set to %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has seeinvisundead set to %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET see_invis_undead = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET see_invis_undead = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "seehide") == 0) {
|
if (strcasecmp(sep->arg[1], "seehide") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has seehide set to %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has seehide set to %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET see_hide = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET see_hide = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "seeimprovedhide") == 0) {
|
if (strcasecmp(sep->arg[1], "seeimprovedhide") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has seeimprovedhide set to %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has seeimprovedhide set to %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET see_improved_hide = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET see_improved_hide = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "AC") == 0) {
|
if (strcasecmp(sep->arg[1], "AC") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Armor Class.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Armor Class.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET ac = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET ac = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "ATK") == 0) {
|
if (strcasecmp(sep->arg[1], "ATK") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Attack.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Attack.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET atk = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET atk = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "Accuracy") == 0) {
|
if (strcasecmp(sep->arg[1], "Accuracy") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Accuracy.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Accuracy.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET accuracy = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET accuracy = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "Avoidance") == 0) {
|
if (strcasecmp(sep->arg[1], "Avoidance") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i Avoidance.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i Avoidance.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET avoidance = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET avoidance = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "level") == 0) {
|
if (strcasecmp(sep->arg[1], "level") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now level %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u is now level %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET level = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET level = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "maxlevel") == 0) {
|
if (strcasecmp(sep->arg[1], "maxlevel") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a maximum level of %i.", npcTypeID, atoi(sep->argplus[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a maximum level of %i.", npcTypeID, atoi(sep->argplus[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET maxlevel = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET maxlevel = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "qglobal") == 0) {
|
if (strcasecmp(sep->arg[1], "qglobal") == 0) {
|
||||||
c->Message(Chat::Yellow,"Quest globals have been %s for NPCID %u", atoi(sep->arg[2]) == 0 ? "disabled" : "enabled", npcTypeID);
|
c->Message(Chat::Yellow,"Quest globals have been %s for NPCID %u", atoi(sep->arg[2]) == 0 ? "disabled" : "enabled", npcTypeID);
|
||||||
std::string query = StringFormat("UPDATE npc_types SET qglobal = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET qglobal = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "npcaggro") == 0) {
|
if (strcasecmp(sep->arg[1], "npcaggro") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u will now %s other NPCs with negative faction npc_value", npcTypeID, atoi(sep->arg[2]) == 0? "not aggro": "aggro");
|
c->Message(Chat::Yellow,"NPCID %u will now %s other NPCs with negative faction npc_value", npcTypeID, atoi(sep->arg[2]) == 0? "not aggro": "aggro");
|
||||||
std::string query = StringFormat("UPDATE npc_types SET npc_aggro = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET npc_aggro = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "spawn_limit") == 0) {
|
if (strcasecmp(sep->arg[1], "spawn_limit") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a spawn limit of %i", npcTypeID, atoi(sep->arg[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a spawn limit of %i", npcTypeID, atoi(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET spawn_limit = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET spawn_limit = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "Attackspeed") == 0) {
|
if (strcasecmp(sep->arg[1], "Attackspeed") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has attack_speed set to %f", npcTypeID, atof(sep->arg[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has attack_speed set to %f", npcTypeID, atof(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET attack_speed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET attack_speed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "Attackdelay") == 0) {
|
if (strcasecmp(sep->arg[1], "Attackdelay") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has attack_delay set to %i", npcTypeID,atoi(sep->arg[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has attack_delay set to %i", npcTypeID,atoi(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET attack_delay = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET attack_delay = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "Attackcount") == 0) {
|
if (strcasecmp(sep->arg[1], "Attackcount") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has attack_count set to %i", npcTypeID,atoi(sep->arg[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has attack_count set to %i", npcTypeID,atoi(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET attack_count = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET attack_count = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "findable") == 0) {
|
if (strcasecmp(sep->arg[1], "findable") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not findable": "findable");
|
c->Message(Chat::Yellow,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not findable": "findable");
|
||||||
std::string query = StringFormat("UPDATE npc_types SET findable = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET findable = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "trackable") == 0) {
|
if (strcasecmp(sep->arg[1], "trackable") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not trackable": "trackable");
|
c->Message(Chat::Yellow,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not trackable": "trackable");
|
||||||
std::string query = StringFormat("UPDATE npc_types SET trackable = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET trackable = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "weapon") == 0) {
|
if (strcasecmp(sep->arg[1], "weapon") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u will have item graphic %i set to his primary and item graphic %i set to his secondary on repop.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
c->Message(Chat::Yellow,"NPCID %u will have item graphic %i set to his primary and item graphic %i set to his secondary on repop.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET d_melee_texture1 = %i, d_melee_texture2 = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET d_melee_texture1 = %i, d_melee_texture2 = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8565,21 +8565,21 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
target->GetLuclinFace(), target->GetDrakkinHeritage(),
|
target->GetLuclinFace(), target->GetDrakkinHeritage(),
|
||||||
target->GetDrakkinTattoo(), target->GetDrakkinDetails(),
|
target->GetDrakkinTattoo(), target->GetDrakkinDetails(),
|
||||||
npcTypeID);
|
npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "color") == 0) {
|
if (strcasecmp(sep->arg[1], "color") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has %i red, %i green, and %i blue tinting on their armor.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]));
|
c->Message(Chat::Yellow,"NPCID %u now has %i red, %i green, and %i blue tinting on their armor.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET armortint_red = %i, armortint_green = %i, armortint_blue = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET armortint_red = %i, armortint_green = %i, armortint_blue = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "armortint_id") == 0) {
|
if (strcasecmp(sep->arg[1], "armortint_id") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has field 'armortint_id' set to %s", npcTypeID, sep->arg[2]);
|
c->Message(Chat::Yellow,"NPCID %u now has field 'armortint_id' set to %s", npcTypeID, sep->arg[2]);
|
||||||
std::string query = StringFormat("UPDATE npc_types SET armortint_id = '%s' WHERE id = %i", sep->argplus[2], npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET armortint_id = '%s' WHERE id = %i", sep->argplus[2], npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8616,42 +8616,42 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
if (strcasecmp(sep->arg[1], "scalerate") == 0) {
|
if (strcasecmp(sep->arg[1], "scalerate") == 0) {
|
||||||
c->Message(Chat::Yellow,"NPCID %u now has a scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
|
c->Message(Chat::Yellow,"NPCID %u now has a scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET scalerate = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET scalerate = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "healscale") == 0) {
|
if (strcasecmp(sep->arg[1], "healscale") == 0) {
|
||||||
c->Message(Chat::Yellow, "NPCID %u now has a heal scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
|
c->Message(Chat::Yellow, "NPCID %u now has a heal scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET healscale = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET healscale = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "spellscale") == 0) {
|
if (strcasecmp(sep->arg[1], "spellscale") == 0) {
|
||||||
c->Message(Chat::Yellow, "NPCID %u now has a spell scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
|
c->Message(Chat::Yellow, "NPCID %u now has a spell scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET spellscale = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET spellscale = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "no_target") == 0) {
|
if (strcasecmp(sep->arg[1], "no_target") == 0) {
|
||||||
c->Message(Chat::Yellow, "NPCID %u is now %s.", npcTypeID, atoi(sep->arg[2]) == 0? "targetable": "untargetable");
|
c->Message(Chat::Yellow, "NPCID %u is now %s.", npcTypeID, atoi(sep->arg[2]) == 0? "targetable": "untargetable");
|
||||||
std::string query = StringFormat("UPDATE npc_types SET no_target_hotkey = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET no_target_hotkey = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "version") == 0) {
|
if (strcasecmp(sep->arg[1], "version") == 0) {
|
||||||
c->Message(Chat::Yellow, "NPCID %u is now version %i.", npcTypeID, atoi(sep->arg[2]));
|
c->Message(Chat::Yellow, "NPCID %u is now version %i.", npcTypeID, atoi(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET version = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET version = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(sep->arg[1], "slow_mitigation") == 0) {
|
if (strcasecmp(sep->arg[1], "slow_mitigation") == 0) {
|
||||||
c->Message(Chat::Yellow, "NPCID %u's slow mitigation limit is now %i.", npcTypeID, atoi(sep->arg[2]));
|
c->Message(Chat::Yellow, "NPCID %u's slow mitigation limit is now %i.", npcTypeID, atoi(sep->arg[2]));
|
||||||
std::string query = StringFormat("UPDATE npc_types SET slow_mitigation = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
std::string query = StringFormat("UPDATE npc_types SET slow_mitigation = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
|
||||||
database.QueryDatabase(query);
|
content_db.QueryDatabase(query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8704,7 +8704,7 @@ void command_qglobal(Client *c, const Seperator *sep) {
|
|||||||
if(!strcasecmp(sep->arg[1], "on")) {
|
if(!strcasecmp(sep->arg[1], "on")) {
|
||||||
std::string query = StringFormat("UPDATE npc_types SET qglobal = 1 WHERE id = '%i'",
|
std::string query = StringFormat("UPDATE npc_types SET qglobal = 1 WHERE id = '%i'",
|
||||||
target->GetNPCTypeID());
|
target->GetNPCTypeID());
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
if(!results.Success()) {
|
if(!results.Success()) {
|
||||||
c->Message(Chat::Yellow, "Could not update database.");
|
c->Message(Chat::Yellow, "Could not update database.");
|
||||||
return;
|
return;
|
||||||
@ -8717,7 +8717,7 @@ void command_qglobal(Client *c, const Seperator *sep) {
|
|||||||
if(!strcasecmp(sep->arg[1], "off")) {
|
if(!strcasecmp(sep->arg[1], "off")) {
|
||||||
std::string query = StringFormat("UPDATE npc_types SET qglobal = 0 WHERE id = '%i'",
|
std::string query = StringFormat("UPDATE npc_types SET qglobal = 0 WHERE id = '%i'",
|
||||||
target->GetNPCTypeID());
|
target->GetNPCTypeID());
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
if(!results.Success()) {
|
if(!results.Success()) {
|
||||||
c->Message(Chat::Yellow, "Could not update database.");
|
c->Message(Chat::Yellow, "Could not update database.");
|
||||||
return;
|
return;
|
||||||
@ -9042,7 +9042,7 @@ void command_flagedit(Client *c, const Seperator *sep) {
|
|||||||
if(sep->arg[2][0] != '\0') {
|
if(sep->arg[2][0] != '\0') {
|
||||||
zoneid = atoi(sep->arg[2]);
|
zoneid = atoi(sep->arg[2]);
|
||||||
if(zoneid < 1) {
|
if(zoneid < 1) {
|
||||||
zoneid = database.GetZoneID(sep->arg[2]);
|
zoneid = content_db.GetZoneID(sep->arg[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(zoneid < 1) {
|
if(zoneid < 1) {
|
||||||
@ -9061,13 +9061,13 @@ void command_flagedit(Client *c, const Seperator *sep) {
|
|||||||
std::string query = StringFormat("UPDATE zone SET flag_needed = '%s' "
|
std::string query = StringFormat("UPDATE zone SET flag_needed = '%s' "
|
||||||
"WHERE zoneidnumber = %d AND version = %d",
|
"WHERE zoneidnumber = %d AND version = %d",
|
||||||
flag_name, zoneid, zone->GetInstanceVersion());
|
flag_name, zoneid, zone->GetInstanceVersion());
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
if(!results.Success()) {
|
if(!results.Success()) {
|
||||||
c->Message(Chat::Red, "Error updating zone: %s", results.ErrorMessage().c_str());
|
c->Message(Chat::Red, "Error updating zone: %s", results.ErrorMessage().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
c->Message(Chat::Yellow, "Success! Zone %s now requires a flag, named %s", database.GetZoneName(zoneid), flag_name);
|
c->Message(Chat::Yellow, "Success! Zone %s now requires a flag, named %s", content_db.GetZoneName(zoneid), flag_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9076,7 +9076,7 @@ void command_flagedit(Client *c, const Seperator *sep) {
|
|||||||
if(sep->arg[2][0] != '\0') {
|
if(sep->arg[2][0] != '\0') {
|
||||||
zoneid = atoi(sep->arg[2]);
|
zoneid = atoi(sep->arg[2]);
|
||||||
if(zoneid < 1) {
|
if(zoneid < 1) {
|
||||||
zoneid = database.GetZoneID(sep->arg[2]);
|
zoneid = content_db.GetZoneID(sep->arg[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9088,13 +9088,13 @@ void command_flagedit(Client *c, const Seperator *sep) {
|
|||||||
std::string query = StringFormat("UPDATE zone SET flag_needed = '' "
|
std::string query = StringFormat("UPDATE zone SET flag_needed = '' "
|
||||||
"WHERE zoneidnumber = %d AND version = %d",
|
"WHERE zoneidnumber = %d AND version = %d",
|
||||||
zoneid, zone->GetInstanceVersion());
|
zoneid, zone->GetInstanceVersion());
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
if(!results.Success()) {
|
if(!results.Success()) {
|
||||||
c->Message(Chat::Yellow, "Error updating zone: %s", results.ErrorMessage().c_str());
|
c->Message(Chat::Yellow, "Error updating zone: %s", results.ErrorMessage().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
c->Message(Chat::Yellow, "Success! Zone %s no longer requires a flag.", database.GetZoneName(zoneid));
|
c->Message(Chat::Yellow, "Success! Zone %s no longer requires a flag.", content_db.GetZoneName(zoneid));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9118,7 +9118,7 @@ void command_flagedit(Client *c, const Seperator *sep) {
|
|||||||
if(sep->arg[2][0] != '\0') {
|
if(sep->arg[2][0] != '\0') {
|
||||||
zoneid = atoi(sep->arg[2]);
|
zoneid = atoi(sep->arg[2]);
|
||||||
if(zoneid < 1) {
|
if(zoneid < 1) {
|
||||||
zoneid = database.GetZoneID(sep->arg[2]);
|
zoneid = content_db.GetZoneID(sep->arg[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(zoneid < 1) {
|
if(zoneid < 1) {
|
||||||
@ -9141,7 +9141,7 @@ void command_flagedit(Client *c, const Seperator *sep) {
|
|||||||
if(sep->arg[2][0] != '\0') {
|
if(sep->arg[2][0] != '\0') {
|
||||||
zoneid = atoi(sep->arg[2]);
|
zoneid = atoi(sep->arg[2]);
|
||||||
if(zoneid < 1) {
|
if(zoneid < 1) {
|
||||||
zoneid = database.GetZoneID(sep->arg[2]);
|
zoneid = content_db.GetZoneID(sep->arg[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(zoneid < 1) {
|
if(zoneid < 1) {
|
||||||
@ -9606,7 +9606,7 @@ void command_setgraveyard(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
zoneid = database.GetZoneID(sep->arg[1]);
|
zoneid = content_db.GetZoneID(sep->arg[1]);
|
||||||
|
|
||||||
if(zoneid > 0) {
|
if(zoneid > 0) {
|
||||||
graveyard_id = database.CreateGraveyardRecord(zoneid, t->GetPosition());
|
graveyard_id = database.CreateGraveyardRecord(zoneid, t->GetPosition());
|
||||||
@ -10047,12 +10047,12 @@ void command_instance(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
zone_id = database.GetZoneID(sep->arg[2]);
|
zone_id = content_db.GetZoneID(sep->arg[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 version = atoi(sep->arg[3]);
|
uint32 version = atoi(sep->arg[3]);
|
||||||
uint32 duration = atoi(sep->arg[4]);
|
uint32 duration = atoi(sep->arg[4]);
|
||||||
zn = database.GetZoneName(zone_id);
|
zn = content_db.GetZoneName(zone_id);
|
||||||
|
|
||||||
if(!zn)
|
if(!zn)
|
||||||
{
|
{
|
||||||
@ -10207,7 +10207,7 @@ void command_setstartzone(Client *c, const Seperator *sep)
|
|||||||
startzone = 0;
|
startzone = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
startzone = database.GetZoneID(sep->arg[1]);
|
startzone = content_db.GetZoneID(sep->arg[1]);
|
||||||
if(startzone == 0) {
|
if(startzone == 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;
|
||||||
@ -10571,7 +10571,7 @@ void command_object(Client *c, const Seperator *sep)
|
|||||||
// biggie.
|
// biggie.
|
||||||
|
|
||||||
query = "SELECT MAX(id) FROM object";
|
query = "SELECT MAX(id) FROM object";
|
||||||
results = database.QueryDatabase(query);
|
results = content_db.QueryDatabase(query);
|
||||||
if (results.Success() && results.RowCount() != 0) {
|
if (results.Success() && results.RowCount() != 0) {
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
id = atoi(row[0]);
|
id = atoi(row[0]);
|
||||||
|
|||||||
@ -837,7 +837,7 @@ bool Corpse::Process() {
|
|||||||
spc->zone_id = zone->graveyard_zoneid();
|
spc->zone_id = zone->graveyard_zoneid();
|
||||||
worldserver.SendPacket(pack);
|
worldserver.SendPacket(pack);
|
||||||
safe_delete(pack);
|
safe_delete(pack);
|
||||||
LogDebug("Moved [{}] player corpse to the designated graveyard in zone [{}]", this->GetName(), database.GetZoneName(zone->graveyard_zoneid()));
|
LogDebug("Moved [{}] player corpse to the designated graveyard in zone [{}]", this->GetName(), content_db.GetZoneName(zone->graveyard_zoneid()));
|
||||||
corpse_db_id = 0;
|
corpse_db_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -446,7 +446,7 @@ int main(int argc, char** argv) {
|
|||||||
if (!strlen(zone_name) || !strcmp(zone_name, ".")) {
|
if (!strlen(zone_name) || !strcmp(zone_name, ".")) {
|
||||||
LogInfo("Entering sleep mode");
|
LogInfo("Entering sleep mode");
|
||||||
}
|
}
|
||||||
else if (!Zone::Bootup(database.GetZoneID(zone_name), instance_id, true)) {
|
else if (!Zone::Bootup(content_db.GetZoneID(zone_name), instance_id, true)) {
|
||||||
LogError("Zone Bootup failed :: Zone::Bootup");
|
LogError("Zone Bootup failed :: Zone::Bootup");
|
||||||
zone = 0;
|
zone = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4757,7 +4757,7 @@ Merc* Merc::LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id,
|
|||||||
if(merc_template)
|
if(merc_template)
|
||||||
{
|
{
|
||||||
//TODO: Maybe add a way of updating client merc stats in a seperate function? like, for example, on leveling up.
|
//TODO: Maybe add a way of updating client merc stats in a seperate function? like, for example, on leveling up.
|
||||||
const NPCType* npc_type_to_copy = database.GetMercType(merc_template->MercNPCID, merc_template->RaceID, c->GetLevel());
|
const NPCType* npc_type_to_copy = content_db.GetMercType(merc_template->MercNPCID, merc_template->RaceID, c->GetLevel());
|
||||||
if(npc_type_to_copy != nullptr)
|
if(npc_type_to_copy != nullptr)
|
||||||
{
|
{
|
||||||
//This is actually a very terrible method of assigning stats, and should be changed at some point. See the comment in merc's deconstructor.
|
//This is actually a very terrible method of assigning stats, and should be changed at some point. See the comment in merc's deconstructor.
|
||||||
@ -4886,7 +4886,7 @@ void Merc::UpdateMercStats(Client *c, bool setmax)
|
|||||||
if (c->GetMercInfo().MercTemplateID > 0) {
|
if (c->GetMercInfo().MercTemplateID > 0) {
|
||||||
Log(Logs::General, Logs::Mercenaries, "Updating Mercenary Stats for %s (%s).", GetName(),
|
Log(Logs::General, Logs::Mercenaries, "Updating Mercenary Stats for %s (%s).", GetName(),
|
||||||
c->GetName());
|
c->GetName());
|
||||||
const NPCType *npc_type = database.GetMercType(
|
const NPCType *npc_type = content_db.GetMercType(
|
||||||
zone->GetMercTemplate(c->GetMercInfo().MercTemplateID)->MercNPCID, GetRace(), c->GetLevel());
|
zone->GetMercTemplate(c->GetMercInfo().MercTemplateID)->MercNPCID, GetRace(), c->GetLevel());
|
||||||
if (npc_type) {
|
if (npc_type) {
|
||||||
max_hp = npc_type->max_hp;
|
max_hp = npc_type->max_hp;
|
||||||
|
|||||||
@ -1969,7 +1969,7 @@ void Mob::NPCSpecialAttacks(const char* parse, int permtag, bool reset, bool rem
|
|||||||
|
|
||||||
if(permtag == 1 && this->GetNPCTypeID() > 0)
|
if(permtag == 1 && this->GetNPCTypeID() > 0)
|
||||||
{
|
{
|
||||||
if(database.SetSpecialAttkFlag(this->GetNPCTypeID(), orig_parse))
|
if(content_db.SetSpecialAttkFlag(this->GetNPCTypeID(), orig_parse))
|
||||||
{
|
{
|
||||||
LogInfo("NPCTypeID: [{}] flagged to [{}] for Special Attacks.\n",this->GetNPCTypeID(),orig_parse);
|
LogInfo("NPCTypeID: [{}] flagged to [{}] for Special Attacks.\n",this->GetNPCTypeID(),orig_parse);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -397,7 +397,7 @@ void QuestManager::Zone(const char *zone_name) {
|
|||||||
ztz->response = 0;
|
ztz->response = 0;
|
||||||
ztz->current_zone_id = zone->GetZoneID();
|
ztz->current_zone_id = zone->GetZoneID();
|
||||||
ztz->current_instance_id = zone->GetInstanceID();
|
ztz->current_instance_id = zone->GetInstanceID();
|
||||||
ztz->requested_zone_id = database.GetZoneID(zone_name);
|
ztz->requested_zone_id = content_db.GetZoneID(zone_name);
|
||||||
ztz->admin = initiator->Admin();
|
ztz->admin = initiator->Admin();
|
||||||
strcpy(ztz->name, initiator->GetName());
|
strcpy(ztz->name, initiator->GetName());
|
||||||
ztz->guild_id = initiator->GuildID();
|
ztz->guild_id = initiator->GuildID();
|
||||||
@ -2675,7 +2675,7 @@ uint16 QuestManager::CreateInstance(const char *zone, int16 version, uint32 dura
|
|||||||
QuestManagerCurrentQuestVars();
|
QuestManagerCurrentQuestVars();
|
||||||
if(initiator)
|
if(initiator)
|
||||||
{
|
{
|
||||||
uint32 zone_id = database.GetZoneID(zone);
|
uint32 zone_id = content_db.GetZoneID(zone);
|
||||||
if(zone_id == 0)
|
if(zone_id == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -3060,7 +3060,7 @@ uint16 QuestManager::CreateDoor(const char* model, float x, float y, float z, fl
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32 QuestManager::GetZoneID(const char *zone) {
|
int32 QuestManager::GetZoneID(const char *zone) {
|
||||||
return static_cast<int32>(database.GetZoneID(zone));
|
return static_cast<int32>(content_db.GetZoneID(zone));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* QuestManager::GetZoneLongName(const char *zone) {
|
const char* QuestManager::GetZoneLongName(const char *zone) {
|
||||||
|
|||||||
@ -458,7 +458,7 @@ bool ZoneDatabase::PopulateZoneSpawnListClose(uint32 zoneid, LinkedList<Spawn2*>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *zone_name = database.GetZoneName(zoneid);
|
const char *zone_name = content_db.GetZoneName(zoneid);
|
||||||
std::string query = StringFormat(
|
std::string query = StringFormat(
|
||||||
"SELECT "
|
"SELECT "
|
||||||
"id, "
|
"id, "
|
||||||
@ -562,7 +562,7 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList<Spawn2*> &spa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *zone_name = database.GetZoneName(zoneid);
|
const char *zone_name = content_db.GetZoneName(zoneid);
|
||||||
std::string query = StringFormat(
|
std::string query = StringFormat(
|
||||||
"SELECT "
|
"SELECT "
|
||||||
"id, "
|
"id, "
|
||||||
@ -1214,7 +1214,7 @@ void SpawnConditionManager::SetCondition(const char *zone_short, uint32 instance
|
|||||||
auto pack = new ServerPacket(ServerOP_SpawnCondition, sizeof(ServerSpawnCondition_Struct));
|
auto pack = new ServerPacket(ServerOP_SpawnCondition, sizeof(ServerSpawnCondition_Struct));
|
||||||
ServerSpawnCondition_Struct* ssc = (ServerSpawnCondition_Struct*)pack->pBuffer;
|
ServerSpawnCondition_Struct* ssc = (ServerSpawnCondition_Struct*)pack->pBuffer;
|
||||||
|
|
||||||
ssc->zoneID = database.GetZoneID(zone_short);
|
ssc->zoneID = content_db.GetZoneID(zone_short);
|
||||||
ssc->instanceID = instance_id;
|
ssc->instanceID = instance_id;
|
||||||
ssc->condition_id = condition_id;
|
ssc->condition_id = condition_id;
|
||||||
ssc->value = new_value;
|
ssc->value = new_value;
|
||||||
@ -1346,7 +1346,7 @@ void SpawnConditionManager::ToggleEvent(uint32 event_id, bool enabled, bool stri
|
|||||||
auto pack = new ServerPacket(ServerOP_SpawnEvent, sizeof(ServerSpawnEvent_Struct));
|
auto pack = new ServerPacket(ServerOP_SpawnEvent, sizeof(ServerSpawnEvent_Struct));
|
||||||
ServerSpawnEvent_Struct* sse = (ServerSpawnEvent_Struct*)pack->pBuffer;
|
ServerSpawnEvent_Struct* sse = (ServerSpawnEvent_Struct*)pack->pBuffer;
|
||||||
|
|
||||||
sse->zoneID = database.GetZoneID(zone_short_name.c_str());
|
sse->zoneID = content_db.GetZoneID(zone_short_name.c_str());
|
||||||
sse->event_id = event_id;
|
sse->event_id = event_id;
|
||||||
|
|
||||||
worldserver.SendPacket(pack);
|
worldserver.SendPacket(pack);
|
||||||
|
|||||||
@ -576,7 +576,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
case ServerOP_ZonePlayer: {
|
case ServerOP_ZonePlayer: {
|
||||||
ServerZonePlayer_Struct* szp = (ServerZonePlayer_Struct*)pack->pBuffer;
|
ServerZonePlayer_Struct* szp = (ServerZonePlayer_Struct*)pack->pBuffer;
|
||||||
Client* client = entity_list.GetClientByName(szp->name);
|
Client* client = entity_list.GetClientByName(szp->name);
|
||||||
printf("Zoning %s to %s(%u) - %u\n", client != nullptr ? client->GetCleanName() : "Unknown", szp->zone, database.GetZoneID(szp->zone), szp->instance_id);
|
printf("Zoning %s to %s(%u) - %u\n", client != nullptr ? client->GetCleanName() : "Unknown", szp->zone, content_db.GetZoneID(szp->zone), szp->instance_id);
|
||||||
if (client != 0) {
|
if (client != 0) {
|
||||||
if (strcasecmp(szp->adminname, szp->name) == 0)
|
if (strcasecmp(szp->adminname, szp->name) == 0)
|
||||||
client->Message(Chat::White, "Zoning to: %s", szp->zone);
|
client->Message(Chat::White, "Zoning to: %s", szp->zone);
|
||||||
@ -586,17 +586,17 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
SendEmoteMessage(szp->adminname, 0, 0, "Summoning %s to %s %1.1f, %1.1f, %1.1f", szp->name, szp->zone, szp->x_pos, szp->y_pos, szp->z_pos);
|
SendEmoteMessage(szp->adminname, 0, 0, "Summoning %s to %s %1.1f, %1.1f, %1.1f", szp->name, szp->zone, szp->x_pos, szp->y_pos, szp->z_pos);
|
||||||
}
|
}
|
||||||
if (!szp->instance_id) {
|
if (!szp->instance_id) {
|
||||||
client->MovePC(database.GetZoneID(szp->zone), szp->instance_id, szp->x_pos, szp->y_pos, szp->z_pos, client->GetHeading(), szp->ignorerestrictions, GMSummon);
|
client->MovePC(content_db.GetZoneID(szp->zone), szp->instance_id, szp->x_pos, szp->y_pos, szp->z_pos, client->GetHeading(), szp->ignorerestrictions, GMSummon);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (database.GetInstanceID(client->CharacterID(), database.GetZoneID(szp->zone)) == 0) {
|
if (database.GetInstanceID(client->CharacterID(), content_db.GetZoneID(szp->zone)) == 0) {
|
||||||
client->AssignToInstance(szp->instance_id);
|
client->AssignToInstance(szp->instance_id);
|
||||||
client->MovePC(database.GetZoneID(szp->zone), szp->instance_id, szp->x_pos, szp->y_pos, szp->z_pos, client->GetHeading(), szp->ignorerestrictions, GMSummon);
|
client->MovePC(content_db.GetZoneID(szp->zone), szp->instance_id, szp->x_pos, szp->y_pos, szp->z_pos, client->GetHeading(), szp->ignorerestrictions, GMSummon);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
client->RemoveFromInstance(database.GetInstanceID(client->CharacterID(), database.GetZoneID(szp->zone)));
|
client->RemoveFromInstance(database.GetInstanceID(client->CharacterID(), content_db.GetZoneID(szp->zone)));
|
||||||
client->AssignToInstance(szp->instance_id);
|
client->AssignToInstance(szp->instance_id);
|
||||||
client->MovePC(database.GetZoneID(szp->zone), szp->instance_id, szp->x_pos, szp->y_pos, szp->z_pos, client->GetHeading(), szp->ignorerestrictions, GMSummon);
|
client->MovePC(content_db.GetZoneID(szp->zone), szp->instance_id, szp->x_pos, szp->y_pos, szp->z_pos, client->GetHeading(), szp->ignorerestrictions, GMSummon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,7 +83,7 @@ Zone* zone = 0;
|
|||||||
void UpdateWindowTitle(char* iNewTitle);
|
void UpdateWindowTitle(char* iNewTitle);
|
||||||
|
|
||||||
bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||||
const char* zonename = database.GetZoneName(iZoneID);
|
const char* zonename = content_db.GetZoneName(iZoneID);
|
||||||
|
|
||||||
if (iZoneID == 0 || zonename == 0)
|
if (iZoneID == 0 || zonename == 0)
|
||||||
return false;
|
return false;
|
||||||
@ -186,7 +186,7 @@ bool Zone::LoadZoneObjects()
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
if (atoi(row[9]) == 0) {
|
if (atoi(row[9]) == 0) {
|
||||||
// Type == 0 - Static Object
|
// Type == 0 - Static Object
|
||||||
const char *shortname = database.GetZoneName(atoi(row[1]), false); // zoneid -> zone_shortname
|
const char *shortname = content_db.GetZoneName(atoi(row[1]), false); // zoneid -> zone_shortname
|
||||||
|
|
||||||
if (!shortname)
|
if (!shortname)
|
||||||
continue;
|
continue;
|
||||||
@ -1736,7 +1736,7 @@ ZonePoint* Zone::GetClosestZonePoint(const glm::vec3& location, uint32 to, Clien
|
|||||||
ZonePoint* Zone::GetClosestZonePoint(const glm::vec3& location, const char* to_name, Client* client, float max_distance) {
|
ZonePoint* Zone::GetClosestZonePoint(const glm::vec3& location, const char* to_name, Client* client, float max_distance) {
|
||||||
if(to_name == nullptr)
|
if(to_name == nullptr)
|
||||||
return GetClosestZonePointWithoutZone(location.x, location.y, location.z, client, max_distance);
|
return GetClosestZonePointWithoutZone(location.x, location.y, location.z, client, max_distance);
|
||||||
return GetClosestZonePoint(location, database.GetZoneID(to_name), client, max_distance);
|
return GetClosestZonePoint(location, content_db.GetZoneID(to_name), client, max_distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
ZonePoint* Zone::GetClosestZonePointWithoutZone(float x, float y, float z, Client* client, float max_distance) {
|
ZonePoint* Zone::GetClosestZonePointWithoutZone(float x, float y, float z, Client* client, float max_distance) {
|
||||||
|
|||||||
@ -3552,7 +3552,7 @@ void ZoneDatabase::ListAllInstances(Client* client, uint32 charid)
|
|||||||
client->Message(Chat::White, "%s is part of the following instances:", name);
|
client->Message(Chat::White, "%s is part of the following instances:", name);
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
client->Message(Chat::White, "%s - id: %lu, version: %lu", database.GetZoneName(atoi(row[1])),
|
client->Message(Chat::White, "%s - id: %lu, version: %lu", content_db.GetZoneName(atoi(row[1])),
|
||||||
(unsigned long)atoi(row[0]), (unsigned long)atoi(row[2]));
|
(unsigned long)atoi(row[0]), (unsigned long)atoi(row[2]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -156,7 +156,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check for Valid Zone */
|
/* Check for Valid Zone */
|
||||||
const char *target_zone_name = database.GetZoneName(target_zone_id);
|
const char *target_zone_name = content_db.GetZoneName(target_zone_id);
|
||||||
if(target_zone_name == nullptr) {
|
if(target_zone_name == nullptr) {
|
||||||
//invalid zone...
|
//invalid zone...
|
||||||
Message(Chat::Red, "Invalid target zone ID.");
|
Message(Chat::Red, "Invalid target zone ID.");
|
||||||
@ -348,7 +348,7 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
|||||||
if(this->GetPet())
|
if(this->GetPet())
|
||||||
entity_list.RemoveFromHateLists(this->GetPet());
|
entity_list.RemoveFromHateLists(this->GetPet());
|
||||||
|
|
||||||
LogInfo("Zoning [{}] to: [{}] ([{}]) - ([{}]) x [{}] y [{}] z [{}]", m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z);
|
LogInfo("Zoning [{}] to: [{}] ([{}]) - ([{}]) x [{}] y [{}] z [{}]", m_pp.name, content_db.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z);
|
||||||
|
|
||||||
//set the player's coordinates in the new zone so they have them
|
//set the player's coordinates in the new zone so they have them
|
||||||
//when they zone into it
|
//when they zone into it
|
||||||
@ -402,7 +402,7 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Client::MovePC(const char* zonename, float x, float y, float z, float heading, uint8 ignorerestrictions, ZoneMode zm) {
|
void Client::MovePC(const char* zonename, float x, float y, float z, float heading, uint8 ignorerestrictions, ZoneMode zm) {
|
||||||
ProcessMovePC(database.GetZoneID(zonename), 0, x, y, z, heading, ignorerestrictions, zm);
|
ProcessMovePC(content_db.GetZoneID(zonename), 0, x, y, z, heading, ignorerestrictions, zm);
|
||||||
}
|
}
|
||||||
|
|
||||||
//designed for in zone moving
|
//designed for in zone moving
|
||||||
@ -482,7 +482,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
|||||||
const char* pShortZoneName = nullptr;
|
const char* pShortZoneName = nullptr;
|
||||||
char* pZoneName = nullptr;
|
char* pZoneName = nullptr;
|
||||||
|
|
||||||
pShortZoneName = database.GetZoneName(zoneID);
|
pShortZoneName = content_db.GetZoneName(zoneID);
|
||||||
content_db.GetZoneLongName(pShortZoneName, &pZoneName);
|
content_db.GetZoneLongName(pShortZoneName, &pZoneName);
|
||||||
|
|
||||||
if(!pZoneName) {
|
if(!pZoneName) {
|
||||||
@ -828,7 +828,7 @@ void Client::SendZoneFlagInfo(Client *to) const {
|
|||||||
for(; cur != end; ++cur) {
|
for(; cur != end; ++cur) {
|
||||||
uint32 zoneid = *cur;
|
uint32 zoneid = *cur;
|
||||||
|
|
||||||
const char *short_name = database.GetZoneName(zoneid);
|
const char *short_name = content_db.GetZoneName(zoneid);
|
||||||
|
|
||||||
char *long_name = nullptr;
|
char *long_name = nullptr;
|
||||||
content_db.GetZoneLongName(short_name, &long_name);
|
content_db.GetZoneLongName(short_name, &long_name);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user