mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 17:58:20 +00:00
Merge 31ede315f2 into 239d4afb13
This commit is contained in:
+3
-1
@@ -233,4 +233,6 @@ IF(UNIX)
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(EXECUTABLE_OUTPUT_PATH ../Bin)
|
||||
INCLUDE_DIRECTORIES(${VLD_INCLUDE_DIR})
|
||||
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
|
||||
|
||||
+11
-11
@@ -3881,7 +3881,7 @@ void Client::Handle_OP_LDoNInspect(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_Dye(const EQApplicationPacket *app)
|
||||
{
|
||||
if(app->size!=sizeof(DyeStruct))
|
||||
printf("Wrong size of DyeStruct, Got: %i, Expected: %i\n",app->size,sizeof(DyeStruct));
|
||||
printf("Wrong size of DyeStruct, Got: %i, Expected: %zu\n",app->size,sizeof(DyeStruct));
|
||||
else{
|
||||
DyeStruct* dye = (DyeStruct*)app->pBuffer;
|
||||
DyeArmor(dye);
|
||||
@@ -3952,7 +3952,7 @@ void Client::Handle_OP_GuildPublicNote(const EQApplicationPacket *app)
|
||||
|
||||
if (app->size < sizeof(GuildUpdate_PublicNote)) {
|
||||
// client calls for a motd on login even if they arent in a guild
|
||||
printf("Error: app size of %i < size of OP_GuildPublicNote of %i\n",app->size,sizeof(GuildUpdate_PublicNote));
|
||||
printf("Error: app size of %i < size of OP_GuildPublicNote of %zu\n",app->size,sizeof(GuildUpdate_PublicNote));
|
||||
return;
|
||||
}
|
||||
GuildUpdate_PublicNote* gpn=(GuildUpdate_PublicNote*)app->pBuffer;
|
||||
@@ -4010,7 +4010,7 @@ void Client::Handle_OP_SetGuildMOTD(const EQApplicationPacket *app)
|
||||
|
||||
if (app->size != sizeof(GuildMOTD_Struct)) {
|
||||
// client calls for a motd on login even if they arent in a guild
|
||||
printf("Error: app size of %i != size of GuildMOTD_Struct of %i\n",app->size,sizeof(GuildMOTD_Struct));
|
||||
printf("Error: app size of %i != size of GuildMOTD_Struct of %zu\n",app->size,sizeof(GuildMOTD_Struct));
|
||||
return;
|
||||
}
|
||||
if(!IsInAGuild()) {
|
||||
@@ -6896,7 +6896,7 @@ void Client::Handle_OP_DeleteSpell(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_LoadSpellSet(const EQApplicationPacket *app)
|
||||
{
|
||||
if(app->size!=sizeof(LoadSpellSet_Struct)) {
|
||||
printf("Wrong size of LoadSpellSet_Struct! Expected: %i, Got: %i\n",sizeof(LoadSpellSet_Struct),app->size);
|
||||
printf("Wrong size of LoadSpellSet_Struct! Expected: %zu, Got: %i\n",sizeof(LoadSpellSet_Struct),app->size);
|
||||
return;
|
||||
}
|
||||
int i;
|
||||
@@ -6911,7 +6911,7 @@ void Client::Handle_OP_LoadSpellSet(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app)
|
||||
{
|
||||
if(app->size!=sizeof(PetitionBug_Struct))
|
||||
printf("Wrong size of BugStruct! Expected: %i, Got: %i\n",sizeof(PetitionBug_Struct),app->size);
|
||||
printf("Wrong size of BugStruct! Expected: %zu, Got: %i\n",sizeof(PetitionBug_Struct),app->size);
|
||||
else{
|
||||
Message(0, "Petition Bugs are not supported, please use /bug.");
|
||||
}
|
||||
@@ -6921,7 +6921,7 @@ void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_Bug(const EQApplicationPacket *app)
|
||||
{
|
||||
if(app->size!=sizeof(BugStruct))
|
||||
printf("Wrong size of BugStruct got %d expected %i!\n", app->size, sizeof(BugStruct));
|
||||
printf("Wrong size of BugStruct got %d expected %zu!\n", app->size, sizeof(BugStruct));
|
||||
else{
|
||||
BugStruct* bug=(BugStruct*)app->pBuffer;
|
||||
database.UpdateBug(bug);
|
||||
@@ -8317,7 +8317,7 @@ void Client::Handle_OP_OpenTributeMaster(const EQApplicationPacket *app)
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
if(app->size != sizeof(StartTribute_Struct))
|
||||
printf("Error in OP_OpenTributeMaster. Expected size of: %i, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||
printf("Error in OP_OpenTributeMaster. Expected size of: %zu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||
else {
|
||||
//Opens the tribute master window
|
||||
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
|
||||
@@ -8342,7 +8342,7 @@ void Client::Handle_OP_OpenGuildTributeMaster(const EQApplicationPacket *app)
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
if(app->size != sizeof(StartTribute_Struct))
|
||||
printf("Error in OP_OpenGuildTributeMaster. Expected size of: %i, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||
printf("Error in OP_OpenGuildTributeMaster. Expected size of: %zu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||
else {
|
||||
//Opens the guild tribute master window
|
||||
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
|
||||
@@ -8368,7 +8368,7 @@ void Client::Handle_OP_TributeItem(const EQApplicationPacket *app)
|
||||
|
||||
//player donates an item...
|
||||
if(app->size != sizeof(TributeItem_Struct))
|
||||
printf("Error in OP_TributeItem. Expected size of: %i, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||
printf("Error in OP_TributeItem. Expected size of: %zu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||
else {
|
||||
TributeItem_Struct* t = (TributeItem_Struct*)app->pBuffer;
|
||||
|
||||
@@ -8397,7 +8397,7 @@ void Client::Handle_OP_TributeMoney(const EQApplicationPacket *app)
|
||||
|
||||
//player donates money
|
||||
if(app->size != sizeof(TributeMoney_Struct))
|
||||
printf("Error in OP_TributeMoney. Expected size of: %i, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||
printf("Error in OP_TributeMoney. Expected size of: %zu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||
else {
|
||||
TributeMoney_Struct* t = (TributeMoney_Struct*)app->pBuffer;
|
||||
|
||||
@@ -8545,7 +8545,7 @@ void Client::Handle_OP_Ignore(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
|
||||
{
|
||||
if(app->size != sizeof(FindPersonRequest_Struct))
|
||||
printf("Error in FindPersonRequest_Struct. Expected size of: %i, but got: %i\n",sizeof(FindPersonRequest_Struct),app->size);
|
||||
printf("Error in FindPersonRequest_Struct. Expected size of: %zu, but got: %i\n",sizeof(FindPersonRequest_Struct),app->size);
|
||||
else {
|
||||
FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer;
|
||||
|
||||
|
||||
+20
-20
@@ -9496,22 +9496,22 @@ void command_object(Client *c, const Seperator *sep)
|
||||
|
||||
od.object_type = atoi(row[col++]);
|
||||
icon = atoi(row[col++]);
|
||||
od.unknown008[0] = atoi(row[col++]);
|
||||
od.unknown008[1] = atoi(row[col++]);
|
||||
od.unknown008 = atoi(row[col++]);
|
||||
od.unknown010 = atoi(row[col++]);
|
||||
od.unknown020 = atoi(row[col++]);
|
||||
|
||||
switch (od.object_type)
|
||||
{
|
||||
case 0: // Static Object
|
||||
case TempStaticType: // Static Object unlocked for changes
|
||||
if (od.unknown008[0] == 0) // Unknown08 field is optional Size parameter for static objects
|
||||
if (od.unknown008 == 0) // Unknown08 field is optional Size parameter for static objects
|
||||
{
|
||||
od.unknown008[0] = 100; // Static object default Size is 100%
|
||||
od.unknown008 = 100; // Static object default Size is 100%
|
||||
}
|
||||
|
||||
c->Message(0,
|
||||
"- STATIC Object (%s): id %u, x %.1f, y %.1f, z %.1f, h %.1f, model %s, size %u, solidtype %u, incline %u",
|
||||
(od.object_type == 0) ? "locked" : "unlocked", id, od.x, od.y, od.z, od.heading, od.object_name, od.unknown008[0], od.unknown008[1], od.unknown020);
|
||||
(od.object_type == 0) ? "locked" : "unlocked", id, od.x, od.y, od.z, od.heading, od.object_name, od.unknown008, od.unknown010, od.unknown020);
|
||||
break;
|
||||
case OT_DROPPEDITEM: // Ground Spawn
|
||||
c->Message(0,
|
||||
@@ -9577,11 +9577,11 @@ void command_object(Client *c, const Seperator *sep)
|
||||
case 0: // Static Object
|
||||
if ((sep->argnum - col) > 3)
|
||||
{
|
||||
od.unknown008[0] = atoi(sep->arg[4 + col]); // Size specified
|
||||
od.unknown008 = atoi(sep->arg[4 + col]); // Size specified
|
||||
|
||||
if ((sep->argnum - col) > 4)
|
||||
{
|
||||
od.unknown008[1] = atoi(sep->arg[5 + col]); // SolidType specified
|
||||
od.unknown010 = atoi(sep->arg[5 + col]); // SolidType specified
|
||||
|
||||
if ((sep->argnum - col) > 5)
|
||||
{
|
||||
@@ -9968,15 +9968,15 @@ void command_object(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
od.unknown008[0] = atoi(sep->arg[4]);
|
||||
od.unknown008 = atoi(sep->arg[4]);
|
||||
o->SetObjectData(&od);
|
||||
|
||||
if (od.unknown008[0] == 0) // 0 == unspecified == 100%
|
||||
if (od.unknown008 == 0) // 0 == unspecified == 100%
|
||||
{
|
||||
od.unknown008[0] = 100;
|
||||
od.unknown008 = 100;
|
||||
}
|
||||
|
||||
c->Message(0, "Static Object %u set to %u%% size. Size will take effect when you commit to the database with '#object Save', after which the object will be unchangeable until you unlock it again with '#object Edit' and zone out and back in.", id, od.unknown008[0]);
|
||||
c->Message(0, "Static Object %u set to %u%% size. Size will take effect when you commit to the database with '#object Save', after which the object will be unchangeable until you unlock it again with '#object Edit' and zone out and back in.", id, od.unknown008);
|
||||
}
|
||||
else if (strcmp(sep->arg[3], "solidtype") == 0)
|
||||
{
|
||||
@@ -9994,10 +9994,10 @@ void command_object(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
od.unknown008[1] = atoi(sep->arg[4]);
|
||||
od.unknown010 = atoi(sep->arg[4]);
|
||||
o->SetObjectData(&od);
|
||||
|
||||
c->Message(0, "Static Object %u set to SolidType %u. Change will take effect when you commit to the database with '#object Save'. Support for this property is on a per-model basis, mostly seen in smaller objects such as chests and tables.", id, od.unknown008[1]);
|
||||
c->Message(0, "Static Object %u set to SolidType %u. Change will take effect when you commit to the database with '#object Save'. Support for this property is on a per-model basis, mostly seen in smaller objects such as chests and tables.", id, od.unknown010);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -10348,7 +10348,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
zone->GetZoneID(), zone->GetInstanceVersion(),
|
||||
od.x, od.y, od.z, od.heading,
|
||||
od.object_name, od.object_type, icon,
|
||||
od.unknown008[0], od.unknown008[1], od.unknown020);
|
||||
od.unknown008, od.unknown010, od.unknown020);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -10358,7 +10358,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
id, zone->GetZoneID(), zone->GetInstanceVersion(),
|
||||
od.x, od.y, od.z, od.heading,
|
||||
od.object_name, od.object_type, icon,
|
||||
od.unknown008[0], od.unknown008[1], od.unknown020);
|
||||
od.unknown008, od.unknown010, od.unknown020);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -10373,7 +10373,7 @@ void command_object(Client *c, const Seperator *sep)
|
||||
zone->GetZoneID(), zone->GetInstanceVersion(),
|
||||
od.x, od.y, od.z, od.heading,
|
||||
od.object_name, od.object_type, icon,
|
||||
od.unknown008[0], od.unknown008[1], od.unknown020,
|
||||
od.unknown008, od.unknown010, od.unknown020,
|
||||
id);
|
||||
}
|
||||
|
||||
@@ -10451,12 +10451,12 @@ void command_object(Client *c, const Seperator *sep)
|
||||
|
||||
memcpy(door.dest_zone, "NONE", 5);
|
||||
|
||||
if ((door.size = od.unknown008[0]) == 0) // unknown08 = optional size percentage
|
||||
if ((door.size = od.unknown008) == 0) // unknown08 = optional size percentage
|
||||
{
|
||||
door.size = 100;
|
||||
}
|
||||
|
||||
switch (door.opentype = od.unknown008[1]) // unknown10 = optional request_nonsolid (0 or 1 or experimental number)
|
||||
switch (door.opentype = od.unknown010) // unknown10 = optional request_nonsolid (0 or 1 or experimental number)
|
||||
{
|
||||
case 0:
|
||||
door.opentype = 31;
|
||||
@@ -10743,8 +10743,8 @@ void command_object(Client *c, const Seperator *sep)
|
||||
strn0cpy(od.object_name, row[col++], sizeof(od.object_name));
|
||||
od.object_type = atoi(row[col++]);
|
||||
icon = atoi(row[col++]);
|
||||
od.unknown008[0] = atoi(row[col++]);
|
||||
od.unknown008[1] = atoi(row[col++]);
|
||||
od.unknown008 = atoi(row[col++]);
|
||||
od.unknown010 = atoi(row[col++]);
|
||||
od.unknown020 = atoi(row[col++]);
|
||||
|
||||
if (od.object_type == 0)
|
||||
|
||||
+1
-1
@@ -5730,7 +5730,7 @@ bool Merc::AddMercToGroup(Merc* merc, Group* group) {
|
||||
|
||||
void Client::InitializeMercInfo() {
|
||||
for(int i=0; i<MAXMERCS; i++) {
|
||||
m_mercinfo[i].mercid = 0;
|
||||
m_mercinfo[i] = {};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -226,7 +226,8 @@ Mob::Mob(const char* in_name,
|
||||
PermaProcs[j].chance = 0;
|
||||
PermaProcs[j].base_spellID = SPELL_UNKNOWN;
|
||||
SpellProcs[j].spellID = SPELL_UNKNOWN;
|
||||
|
||||
SpellProcs[j].chance = 0;
|
||||
SpellProcs[j].base_spellID = SPELL_UNKNOWN;
|
||||
DefensiveProcs[j].spellID = SPELL_UNKNOWN;
|
||||
DefensiveProcs[j].chance = 0;
|
||||
DefensiveProcs[j].base_spellID = SPELL_UNKNOWN;
|
||||
@@ -271,6 +272,7 @@ Mob::Mob(const char* in_name,
|
||||
casting_spell_timer = 0;
|
||||
casting_spell_timer_duration = 0;
|
||||
casting_spell_type = 0;
|
||||
casting_spell_inventory_slot = 0;
|
||||
target = 0;
|
||||
|
||||
memset(&itembonuses, 0, sizeof(StatBonuses));
|
||||
@@ -4938,4 +4940,4 @@ void Mob::ProcessSpecialAbilities(const std::string str) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-9
@@ -73,7 +73,7 @@
|
||||
#undef new
|
||||
#define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include <conio.h>
|
||||
#include <process.h>
|
||||
@@ -143,7 +143,7 @@ int main(int argc, char** argv) {
|
||||
_log(ZONE__INIT, "Loading server configuration..");
|
||||
if (!ZoneConfig::LoadConfig()) {
|
||||
_log(ZONE__INIT_ERR, "Loading server configuration failed.");
|
||||
return(1);
|
||||
return 1;
|
||||
}
|
||||
const ZoneConfig *Config=ZoneConfig::get();
|
||||
|
||||
@@ -162,7 +162,7 @@ int main(int argc, char** argv) {
|
||||
Config->DatabaseDB.c_str(),
|
||||
Config->DatabasePort)) {
|
||||
_log(ZONE__INIT_ERR, "Cannot continue without a database connection.");
|
||||
return(1);
|
||||
return 1;
|
||||
}
|
||||
dbasync = new DBAsync(&database);
|
||||
dbasync->AddFQ(&MTdbafq);
|
||||
@@ -181,16 +181,16 @@ int main(int argc, char** argv) {
|
||||
*/
|
||||
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
|
||||
_log(ZONE__INIT_ERR, "Could not set signal handler");
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
if (signal(SIGTERM, CatchSignal) == SIG_ERR) {
|
||||
_log(ZONE__INIT_ERR, "Could not set signal handler");
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
#ifndef WIN32
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
|
||||
_log(ZONE__INIT_ERR, "Could not set signal handler");
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -216,19 +216,19 @@ int main(int argc, char** argv) {
|
||||
if (!database.LoadNPCFactionLists()) {
|
||||
_log(ZONE__INIT_ERR, "Loading npcs faction lists FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
_log(ZONE__INIT, "Loading loot tables");
|
||||
if (!database.LoadLoot()) {
|
||||
_log(ZONE__INIT_ERR, "Loading loot FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
_log(ZONE__INIT, "Loading skill caps");
|
||||
if (!database.LoadSkillCaps()) {
|
||||
_log(ZONE__INIT_ERR, "Loading skill caps FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
_log(ZONE__INIT, "Loading spells");
|
||||
@@ -479,6 +479,7 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
|
||||
safe_delete(mmf);
|
||||
safe_delete(Config);
|
||||
|
||||
if (zone != 0)
|
||||
Zone::Shutdown(true);
|
||||
|
||||
+23
-18
@@ -245,25 +245,25 @@ bool Zone::LoadZoneObjects() {
|
||||
uint32 idx = 0;
|
||||
int16 charges = 0;
|
||||
|
||||
id = (uint32)atoi(row[idx++]);
|
||||
data.zone_id = atoi(row[idx++]);
|
||||
data.x = atof(row[idx++]);
|
||||
data.y = atof(row[idx++]);
|
||||
data.z = atof(row[idx++]);
|
||||
data.heading = atof(row[idx++]);
|
||||
itemid = (uint32)atoi(row[idx++]);
|
||||
charges = (int16)atoi(row[idx++]);
|
||||
strcpy(data.object_name, row[idx++]);
|
||||
type = (uint8)atoi(row[idx++]);
|
||||
icon = (uint32)atoi(row[idx++]);
|
||||
data.object_type = (uint32)atoi(row[idx++]);
|
||||
id = (uint32)atoi(row[0]);
|
||||
data.zone_id = atoi(row[1]);
|
||||
data.x = atof(row[2]);
|
||||
data.y = atof(row[3]);
|
||||
data.z = atof(row[4]);
|
||||
data.heading = atof(row[5]);
|
||||
itemid = (uint32)atoi(row[6]);
|
||||
charges = (int16)atoi(row[7]);
|
||||
strcpy(data.object_name, row[8]);
|
||||
type = (uint8)atoi(row[9]);
|
||||
icon = (uint32)atoi(row[10]);
|
||||
data.object_type = type;
|
||||
data.linked_list_addr[0] = 0;
|
||||
data.linked_list_addr[1] = 0;
|
||||
data.unknown008[0] = (uint32)atoi(row[idx++]);
|
||||
data.unknown008[1] = (uint32)atoi(row[idx++]);
|
||||
data.unknown020 = (uint32)atoi(row[idx++]);
|
||||
data.unknown024 = (uint32)atoi(row[idx++]);
|
||||
data.unknown076 = (uint32)atoi(row[idx++]);
|
||||
data.unknown008 = (uint32)atoi(row[11]);
|
||||
data.unknown010 = (uint32)atoi(row[12]);
|
||||
data.unknown020 = (uint32)atoi(row[13]);
|
||||
data.unknown024 = (uint32)atoi(row[14]);
|
||||
data.unknown076 = (uint32)atoi(row[15]);
|
||||
data.unknown084 = 0;
|
||||
|
||||
ItemInst* inst = nullptr;
|
||||
@@ -661,7 +661,7 @@ void Zone::LoadLevelEXPMods(){
|
||||
mysql_free_result(DatasetResult);
|
||||
}
|
||||
|
||||
safe_delete(Query);
|
||||
safe_delete_array(Query);
|
||||
Query = 0;
|
||||
|
||||
if(!errorMessage.empty()) {
|
||||
@@ -856,6 +856,11 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
qGlobals = nullptr;
|
||||
default_ruleset = 0;
|
||||
|
||||
loglevelvar = 0;
|
||||
merchantvar = 0;
|
||||
tradevar = 0;
|
||||
lootvar = 0;
|
||||
|
||||
if(RuleB(TaskSystem, EnableTaskSystem)) {
|
||||
taskmanager->LoadProximities(zoneid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user