This commit is contained in:
badcaptain 2013-03-14 20:03:48 -04:00
commit 7109a40637
30 changed files with 1297 additions and 1282 deletions

View File

@ -1,5 +1,16 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50) EQEMu Changelog (Started on Sept 24, 2003 15:50)
------------------------------------------------------- -------------------------------------------------------
== 03/09/2013 ==
Zaela_S: Stop mobs aggroing on dead players when using RespawnFromHover.
Derision: Removed _log message from zone/CatchSignal on Linux as it can deadlock on shutdown if another signal is received while the _log call is being processed.
Derision: Added some error logging into ZoneDatabase::NPCSpawnDB for #npcspawn create.
== 03/07/2013 ==
af4t: Melee tomes with names beginning "Skill:" (e.g. RNG Warder's Wrath, etc) can be memorized now, by hand-in-to-guildmaster or right-click-from-inventory.
== 03/02/2013 ==
af4t: Stop NPCs aggroing each other with buffs/beneficial spells.
== 03/2/2013 == == 03/2/2013 ==
Bad_Captain: Fixed Merc depop bug. Bad_Captain: Fixed Merc depop bug.
Bad_Captain: Added merc rest regen. Bad_Captain: Added merc rest regen.
@ -24,6 +35,9 @@ KLS: Changed how shared memory works:
2) Run the shared_memory executable from the same place you run world/zone (it's basically doing the loading we would do on startup so will take a moment). 2) Run the shared_memory executable from the same place you run world/zone (it's basically doing the loading we would do on startup so will take a moment).
3) Run world/zone/whatever 3) Run world/zone/whatever
== 02/25/2013 ==
af4t: Add Touch of the Wicked AA redux to SK Improved Harm Touch and Leech Touch.
== 02/22/2013 == == 02/22/2013 ==
demonstar55: Mobs will now be removed from XTargets when they get back to their way point, should be last instance of XTarget mobs not clearing when they are not aggroed anymore demonstar55: Mobs will now be removed from XTargets when they get back to their way point, should be last instance of XTarget mobs not clearing when they are not aggroed anymore

View File

@ -20,7 +20,7 @@ public:
EmuTCPConnection *FindConnection(uint32 iID); EmuTCPConnection *FindConnection(uint32 iID);
//exposed for some crap we pull. Do not call from outside this object. //exposed for some crap we pull. Do not call from outside this object.
TCPServer<EmuTCPConnection>::AddConnection; using TCPServer<EmuTCPConnection>::AddConnection;
protected: protected:
virtual void Process(); virtual void Process();

View File

@ -80,7 +80,7 @@ HttpdForm::HttpdForm(IFile *infil) : raw(false)
std::string content_type; std::string content_type;
std::string current_name; std::string current_name;
std::string current_filename; std::string current_filename;
char slask[200]; char slask[2000];
infil -> fgets(slask, 200); infil -> fgets(slask, 200);
while (!infil -> eof()) while (!infil -> eof())
{ {

View File

@ -1450,7 +1450,7 @@ bool Database::CheckNameFilter(const char* name, bool surname)
} }
} }
for (int i = 0; i < str_name.size(); i++) for (size_t i = 0; i < str_name.size(); i++)
{ {
if(!isalpha(str_name[i])) if(!isalpha(str_name[i]))
{ {
@ -1458,14 +1458,14 @@ bool Database::CheckNameFilter(const char* name, bool surname)
} }
} }
for(int x = 0; x < str_name.size(); ++x) for(size_t x = 0; x < str_name.size(); ++x)
{ {
str_name[x] = tolower(str_name[x]); str_name[x] = tolower(str_name[x]);
} }
char c = '\0'; char c = '\0';
uint8 num_c = 0; uint8 num_c = 0;
for(int x = 0; x < str_name.size(); ++x) for(size_t x = 0; x < str_name.size(); ++x)
{ {
if(str_name[x] == c) if(str_name[x] == c)
{ {
@ -1484,10 +1484,10 @@ bool Database::CheckNameFilter(const char* name, bool surname)
if (RunQuery(query, MakeAnyLenString(&query, "SELECT name FROM name_filter"), errbuf, &result)) { if (RunQuery(query, MakeAnyLenString(&query, "SELECT name FROM name_filter"), errbuf, &result)) {
safe_delete_array(query); safe_delete_array(query);
while(row = mysql_fetch_row(result)) while((row = mysql_fetch_row(result)))
{ {
std::string current_row = row[0]; std::string current_row = row[0];
for(int x = 0; x < current_row.size(); ++x) for(size_t x = 0; x < current_row.size(); ++x)
{ {
current_row[x] = tolower(current_row[x]); current_row[x] = tolower(current_row[x]);
} }
@ -2399,8 +2399,8 @@ bool Database::CheckInstanceExpired(uint16 instance_id)
MYSQL_RES *result; MYSQL_RES *result;
MYSQL_ROW row; MYSQL_ROW row;
uint32 start_time = 0; int32 start_time = 0;
uint32 duration = 0; int32 duration = 0;
uint32 never_expires = 0; uint32 never_expires = 0;
if (RunQuery(query, MakeAnyLenString(&query, "SELECT start_time, duration, never_expires FROM instance_lockout WHERE id=%u", if (RunQuery(query, MakeAnyLenString(&query, "SELECT start_time, duration, never_expires FROM instance_lockout WHERE id=%u",
instance_id), errbuf, &result)) instance_id), errbuf, &result))
@ -2591,15 +2591,15 @@ bool Database::GetUnusedInstanceID(uint16 &instance_id)
return false; return false;
} }
uint32 count = RuleI(Zone, ReservedInstances) + 1; int32 count = RuleI(Zone, ReservedInstances) + 1;
uint32 max = 65535; int32 max = 65535;
if (RunQuery(query, MakeAnyLenString(&query, "SELECT id FROM instance_lockout where id >= %i ORDER BY id", count), errbuf, &result)) if (RunQuery(query, MakeAnyLenString(&query, "SELECT id FROM instance_lockout where id >= %i ORDER BY id", count), errbuf, &result))
{ {
safe_delete_array(query); safe_delete_array(query);
if (mysql_num_rows(result) != 0) if (mysql_num_rows(result) != 0)
{ {
while(row = mysql_fetch_row(result)) while((row = mysql_fetch_row(result)))
{ {
if(count < atoi(row[0])) if(count < atoi(row[0]))
{ {

View File

@ -38,6 +38,7 @@ DBcore::DBcore() {
pDatabase = 0; pDatabase = 0;
pCompress = false; pCompress = false;
pSSL = false; pSSL = false;
pStatus = Closed;
} }
DBcore::~DBcore() { DBcore::~DBcore() {
@ -180,9 +181,10 @@ bool DBcore::Open(uint32* errnum, char* errbuf) {
LockMutex lock(&MDatabase); LockMutex lock(&MDatabase);
if (GetStatus() == Connected) if (GetStatus() == Connected)
return true; return true;
if (GetStatus() == Error) if (GetStatus() == Error) {
mysql_close(&mysql); mysql_close(&mysql);
mysql_init(&mysql); // Initialize structure again mysql_init(&mysql); // Initialize structure again
}
if (!pHost) if (!pHost)
return false; return false;
/* /*

View File

@ -23,6 +23,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#endif #endif
#include "types.h" #include "types.h"
#include "eqemu_exception.h" #include "eqemu_exception.h"

View File

@ -554,7 +554,7 @@ void build_hex_line(const char *buffer, unsigned long length, unsigned long offs
char *ptr=out_buffer; char *ptr=out_buffer;
int i; int i;
char printable[17]; char printable[17];
ptr+=sprintf(ptr,"%0*i:",padding,offset); ptr+=sprintf(ptr,"%0*lu:",padding,offset);
for(i=0;i<16; i++) { for(i=0;i<16; i++) {
if (i==8) { if (i==8) {
strcpy(ptr," -"); strcpy(ptr," -");

View File

@ -140,8 +140,8 @@ RegularOpcodeManager::RegularOpcodeManager()
} }
RegularOpcodeManager::~RegularOpcodeManager() { RegularOpcodeManager::~RegularOpcodeManager() {
safe_delete(emu_to_eq); safe_delete_array(emu_to_eq);
safe_delete(eq_to_emu); safe_delete_array(eq_to_emu);
} }
bool RegularOpcodeManager::LoadOpcodes(const char *filename, bool report_errors) { bool RegularOpcodeManager::LoadOpcodes(const char *filename, bool report_errors) {

View File

@ -347,7 +347,7 @@ bool PTimerList::Load(Database *db) {
//if it expired allready, dont bother. //if it expired allready, dont bother.
cur = new PersistentTimer(_char_id, type, start_time, timer_time, enabled); cur = new PersistentTimer(_char_id, type, start_time, timer_time, enabled);
if(!cur->Expired(false)) if(!cur->Expired(NULL))
_list[type] = cur; _list[type] = cur;
else else
delete cur; delete cur;

View File

@ -30,10 +30,6 @@
#ifdef i386 #ifdef i386
#define USE_RDTSC #define USE_RDTSC
#else
#ifndef WIN32
#warning RDTSC_Timer cannot use rdtsc on a non-intel platform, using gettimeofday
#endif
#endif #endif
bool RDTSC_Timer::_inited = false; bool RDTSC_Timer::_inited = false;

View File

@ -292,7 +292,7 @@ bool RuleManager::LoadRules(Database *db, const char *ruleset) {
{ {
safe_delete_array(query); safe_delete_array(query);
while((row = mysql_fetch_row(result))) { while((row = mysql_fetch_row(result))) {
if(!SetRule(row[0], row[1], false)) if(!SetRule(row[0], row[1], NULL, false))
_log(RULES__ERROR, "Unable to interpret rule record for %s", row[0]); _log(RULES__ERROR, "Unable to interpret rule record for %s", row[0]);
} }
mysql_free_result(result); mysql_free_result(result);

View File

@ -215,7 +215,7 @@ bool QTBuilder::build(const char *shortname) {
AddFace(v1, v2, v3); AddFace(v1, v2, v3);
} }
printf("There are %u vertices and %u faces.\n", _FaceList.size()*3, _FaceList.size()); printf("There are %lu vertices and %lu faces.\n", _FaceList.size()*3, _FaceList.size());
if(fileloader->model_data.plac_count) if(fileloader->model_data.plac_count)
{ {
@ -232,7 +232,7 @@ bool QTBuilder::build(const char *shortname) {
else else
printf("No placeable objects (or perhaps %s_obj.s3d not present).\n", shortname); printf("No placeable objects (or perhaps %s_obj.s3d not present).\n", shortname);
printf("After processing placeable objects, there are %u vertices and %u faces.\n", _FaceList.size()*3, _FaceList.size()); printf("After processing placeable objects, there are %lu vertices and %lu faces.\n", _FaceList.size()*3, _FaceList.size());
unsigned long r; unsigned long r;
@ -1262,7 +1262,7 @@ void QTBuilder::AddPlaceableV4(FileLoader *fileloader, char *ZoneFileName, bool
//return; //return;
printf("EQG V4 Placeable Zone Support\n"); printf("EQG V4 Placeable Zone Support\n");
printf("ObjectGroupCount = %i\n", fileloader->model_data.ObjectGroups.size()); printf("ObjectGroupCount = %lu\n", fileloader->model_data.ObjectGroups.size());
vector<ObjectGroupEntry>::iterator Iterator; vector<ObjectGroupEntry>::iterator Iterator;

View File

@ -88,7 +88,7 @@ EQLConfig *EQLConfig::CreateLauncher(const char *name, uint8 dynamic_count) {
namebuf, dynamic_count), errbuf)) { namebuf, dynamic_count), errbuf)) {
LogFile->write(EQEMuLog::Error, "Error in CreateLauncher query: %s", errbuf); LogFile->write(EQEMuLog::Error, "Error in CreateLauncher query: %s", errbuf);
safe_delete_array(query); safe_delete_array(query);
return false; return NULL;
} }
safe_delete_array(query); safe_delete_array(query);

View File

@ -443,7 +443,6 @@ void Client::HandleAAAction(aaID activate) {
} }
break; break;
// seveian 2008-09-23
case aaActionProjectIllusion: case aaActionProjectIllusion:
EnableAAEffect(aaEffectProjectIllusion, 3600); EnableAAEffect(aaEffectProjectIllusion, 3600);
Message(10, "The power of your next illusion spell will flow to your grouped target in your place."); Message(10, "The power of your next illusion spell will flow to your grouped target in your place.");
@ -454,7 +453,8 @@ void Client::HandleAAAction(aaID activate) {
Escape(); Escape();
break; break;
case aaBeastialAlignment: // Don't think this code is used any longer for Bestial Alignment as the AA has a spell_id and no nonspell_action.
case aaActionBeastialAlignment:
switch(GetBaseRace()) { switch(GetBaseRace()) {
case BARBARIAN: case BARBARIAN:
spell_id = AA_Choose3(activate_val, 4521, 4522, 4523); spell_id = AA_Choose3(activate_val, 4521, 4522, 4523);
@ -1038,7 +1038,7 @@ void Client::BuyAA(AA_Action* action)
m_pp.aapoints -= real_cost; m_pp.aapoints -= real_cost;
Save(); Save();
if ((RuleB(AA, Stacking) && (GetClientVersionBit() >= 4) && (aa2->hotkey_sid == 4294967295)) if ((RuleB(AA, Stacking) && (GetClientVersionBit() >= 4) && (aa2->hotkey_sid == 4294967295u))
&& ((aa2->max_level == (cur_level+1)) && aa2->sof_next_id)){ && ((aa2->max_level == (cur_level+1)) && aa2->sof_next_id)){
SendAA(aa2->id); SendAA(aa2->id);
SendAA(aa2->sof_next_id); SendAA(aa2->sof_next_id);
@ -1240,7 +1240,7 @@ void Client::SendAA(uint32 id, int seq) {
3) When you zone/buy your player profile will be checked and determine what AA can be displayed base on what you have already. 3) When you zone/buy your player profile will be checked and determine what AA can be displayed base on what you have already.
*/ */
if (RuleB(AA, Stacking) && (GetClientVersionBit() >= 4) && (saa2->hotkey_sid == 4294967295)) if (RuleB(AA, Stacking) && (GetClientVersionBit() >= 4) && (saa2->hotkey_sid == 4294967295u))
aa_stack = true; aa_stack = true;
if (aa_stack){ if (aa_stack){

View File

@ -249,8 +249,10 @@ bool Mob::CheckWillAggro(Mob *mob) {
//sometimes if a client has some lag while zoning into a dangerous place while either invis or a GM //sometimes if a client has some lag while zoning into a dangerous place while either invis or a GM
//they will aggro mobs even though it's supposed to be impossible, to lets make sure we've finished connecting //they will aggro mobs even though it's supposed to be impossible, to lets make sure we've finished connecting
if(mob->IsClient() && !mob->CastToClient()->ClientFinishedLoading()) if (mob->IsClient()) {
return false; if (!mob->CastToClient()->ClientFinishedLoading() || mob->CastToClient()->IsHoveringForRespawn())
return false;
}
Mob *ownr = mob->GetOwner(); Mob *ownr = mob->GetOwner();
if(ownr && ownr->IsClient() && !ownr->CastToClient()->ClientFinishedLoading()) if(ownr && ownr->IsClient() && !ownr->CastToClient()->ClientFinishedLoading())

View File

@ -3836,7 +3836,7 @@ void Bot::AI_Process() {
if(instweapon) if(instweapon)
weapon = instweapon->GetItem(); weapon = instweapon->GetItem();
int weapontype = NULL; int weapontype = 0; // No weapon type.
bool bIsFist = true; bool bIsFist = true;
if(weapon) { if(weapon) {
@ -17359,8 +17359,8 @@ bool Bot::RemoveHealRotationTarget( int index ) {
} }
void Bot::ClearHealRotationMembers() { void Bot::ClearHealRotationMembers() {
_healRotationMemberPrev = NULL; _healRotationMemberPrev = 0; // No previous member
_healRotationMemberNext = NULL; _healRotationMemberNext = 0; // No next member
} }
void Bot::ClearHealRotationTargets() { void Bot::ClearHealRotationTargets() {

View File

@ -32,7 +32,7 @@ const int MaxSpellTypes = 16;
const int MaxHealRotationMembers = 6; const int MaxHealRotationMembers = 6;
const int MaxHealRotationTargets = 3; const int MaxHealRotationTargets = 3;
typedef enum BotStanceType { enum BotStanceType {
BotStancePassive, BotStancePassive,
BotStanceBalanced, BotStanceBalanced,
BotStanceEfficient, BotStanceEfficient,
@ -42,7 +42,7 @@ typedef enum BotStanceType {
BotStanceBurnAE BotStanceBurnAE
}; };
typedef enum SpellTypeIndex { enum SpellTypeIndex {
SpellType_NukeIndex, SpellType_NukeIndex,
SpellType_HealIndex, SpellType_HealIndex,
SpellType_RootIndex, SpellType_RootIndex,
@ -64,7 +64,7 @@ typedef enum SpellTypeIndex {
class Bot : public NPC { class Bot : public NPC {
public: public:
// Class enums // Class enums
typedef enum BotfocusType { //focus types enum BotfocusType { //focus types
BotfocusSpellHaste = 1, BotfocusSpellHaste = 1,
BotfocusSpellDuration, BotfocusSpellDuration,
BotfocusRange, BotfocusRange,
@ -97,18 +97,18 @@ public:
BotfocusAdditionalHeal, BotfocusAdditionalHeal,
}; };
typedef enum BotTradeType { // types of trades a bot can do enum BotTradeType { // types of trades a bot can do
BotTradeClientNormal, BotTradeClientNormal,
BotTradeClientNoDropNoTrade BotTradeClientNoDropNoTrade
}; };
typedef enum BotRoleType { enum BotRoleType {
BotRoleMainAssist, BotRoleMainAssist,
BotRoleGroupHealer, BotRoleGroupHealer,
BotRoleRaidHealer BotRoleRaidHealer
}; };
typedef enum EqExpansions { enum EqExpansions {
ExpansionNone, ExpansionNone,
ExpansionEQ, ExpansionEQ,
ExpansionRoK, ExpansionRoK,
@ -237,7 +237,7 @@ public:
bool RemoveHealRotationTarget( Mob* target ); bool RemoveHealRotationTarget( Mob* target );
bool RemoveHealRotationTarget( int index); bool RemoveHealRotationTarget( int index);
void NotifyNextHealRotationMember( bool notifyNow = false ); void NotifyNextHealRotationMember( bool notifyNow = false );
void ClearHealRotationLeader() { _healRotationLeader = NULL; } void ClearHealRotationLeader() { _healRotationLeader = 0; }
void ClearHealRotationMembers(); void ClearHealRotationMembers();
void ClearHealRotationTargets(); void ClearHealRotationTargets();
inline virtual int16 GetMaxStat(); inline virtual int16 GetMaxStat();

View File

@ -7036,7 +7036,7 @@ void Client::SetMaxXTargets(uint8 NewMax)
FastQueuePacket(&outapp); FastQueuePacket(&outapp);
} }
char* Client::GetRacePlural(Client* client) { const char* Client::GetRacePlural(Client* client) {
switch (client->CastToMob()->GetRace()) { switch (client->CastToMob()->GetRace()) {
case HUMAN: case HUMAN:
@ -7076,7 +7076,7 @@ char* Client::GetRacePlural(Client* client) {
} }
} }
char* Client::GetClassPlural(Client* client) { const char* Client::GetClassPlural(Client* client) {
switch (client->CastToMob()->GetClass()) { switch (client->CastToMob()->GetClass()) {
case WARRIOR: case WARRIOR:

View File

@ -1124,8 +1124,8 @@ public:
void UpdateMercLevel(); void UpdateMercLevel();
void CheckMercSuspendTimer(); void CheckMercSuspendTimer();
Timer GetMercTimer() { return merc_timer; }; Timer GetMercTimer() { return merc_timer; };
char* GetRacePlural(Client* client); const char* GetRacePlural(Client* client);
char* GetClassPlural(Client* client); const char* GetClassPlural(Client* client);
void SendWebLink(const char* website); void SendWebLink(const char* website);
bool StoreTurnInItems(Mob* with); bool StoreTurnInItems(Mob* with);

View File

@ -2082,7 +2082,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
} }
else if (inst->IsType(ItemClassCommon)) else if (inst->IsType(ItemClassCommon))
{ {
if(item->ItemType == ItemTypeSpell && strstr((const char*)item->Name, "Tome of ")) if(item->ItemType == ItemTypeSpell && (strstr((const char*)item->Name, "Tome of ") || strstr((const char*)item->Name, "Skill: ")))
{ {
DeleteItemInInventory(slot_id, 1, true); DeleteItemInInventory(slot_id, 1, true);
TrainDiscipline(item->ID); TrainDiscipline(item->ID);
@ -3850,7 +3850,7 @@ void Client::Handle_OP_LDoNInspect(const EQApplicationPacket *app)
void Client::Handle_OP_Dye(const EQApplicationPacket *app) void Client::Handle_OP_Dye(const EQApplicationPacket *app)
{ {
if(app->size!=sizeof(DyeStruct)) 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: %lu\n",app->size,sizeof(DyeStruct));
else{ else{
DyeStruct* dye = (DyeStruct*)app->pBuffer; DyeStruct* dye = (DyeStruct*)app->pBuffer;
DyeArmor(dye); DyeArmor(dye);
@ -3921,7 +3921,7 @@ void Client::Handle_OP_GuildPublicNote(const EQApplicationPacket *app)
if (app->size < sizeof(GuildUpdate_PublicNote)) { if (app->size < sizeof(GuildUpdate_PublicNote)) {
// client calls for a motd on login even if they arent in a guild // 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 %lu\n",app->size,sizeof(GuildUpdate_PublicNote));
return; return;
} }
GuildUpdate_PublicNote* gpn=(GuildUpdate_PublicNote*)app->pBuffer; GuildUpdate_PublicNote* gpn=(GuildUpdate_PublicNote*)app->pBuffer;
@ -3979,7 +3979,7 @@ void Client::Handle_OP_SetGuildMOTD(const EQApplicationPacket *app)
if (app->size != sizeof(GuildMOTD_Struct)) { if (app->size != sizeof(GuildMOTD_Struct)) {
// client calls for a motd on login even if they arent in a guild // 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 %lu\n",app->size,sizeof(GuildMOTD_Struct));
return; return;
} }
if(!IsInAGuild()) { if(!IsInAGuild()) {
@ -6876,7 +6876,7 @@ void Client::Handle_OP_DeleteSpell(const EQApplicationPacket *app)
void Client::Handle_OP_LoadSpellSet(const EQApplicationPacket *app) void Client::Handle_OP_LoadSpellSet(const EQApplicationPacket *app)
{ {
if(app->size!=sizeof(LoadSpellSet_Struct)) { 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: %lu, Got: %i\n",sizeof(LoadSpellSet_Struct),app->size);
return; return;
} }
int i; int i;
@ -6891,7 +6891,7 @@ void Client::Handle_OP_LoadSpellSet(const EQApplicationPacket *app)
void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app) void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app)
{ {
if(app->size!=sizeof(PetitionBug_Struct)) 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: %lu, Got: %i\n",sizeof(PetitionBug_Struct),app->size);
else{ else{
Message(0, "Petition Bugs are not supported, please use /bug."); Message(0, "Petition Bugs are not supported, please use /bug.");
} }
@ -6901,7 +6901,7 @@ void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app)
void Client::Handle_OP_Bug(const EQApplicationPacket *app) void Client::Handle_OP_Bug(const EQApplicationPacket *app)
{ {
if(app->size!=sizeof(BugStruct)) if(app->size!=sizeof(BugStruct))
printf("Wrong size of BugStruct got %d expected %d!\n", app->size, sizeof(BugStruct)); printf("Wrong size of BugStruct got %d expected %lu!\n", app->size, sizeof(BugStruct));
else{ else{
BugStruct* bug=(BugStruct*)app->pBuffer; BugStruct* bug=(BugStruct*)app->pBuffer;
database.UpdateBug(bug); database.UpdateBug(bug);
@ -8306,7 +8306,7 @@ void Client::Handle_OP_OpenTributeMaster(const EQApplicationPacket *app)
_pkt(TRIBUTE__IN, app); _pkt(TRIBUTE__IN, app);
if(app->size != sizeof(StartTribute_Struct)) 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: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
else { else {
//Opens the tribute master window //Opens the tribute master window
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer; StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
@ -8331,7 +8331,7 @@ void Client::Handle_OP_OpenGuildTributeMaster(const EQApplicationPacket *app)
_pkt(TRIBUTE__IN, app); _pkt(TRIBUTE__IN, app);
if(app->size != sizeof(StartTribute_Struct)) 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: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
else { else {
//Opens the guild tribute master window //Opens the guild tribute master window
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer; StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
@ -8357,7 +8357,7 @@ void Client::Handle_OP_TributeItem(const EQApplicationPacket *app)
//player donates an item... //player donates an item...
if(app->size != sizeof(TributeItem_Struct)) 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: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
else { else {
TributeItem_Struct* t = (TributeItem_Struct*)app->pBuffer; TributeItem_Struct* t = (TributeItem_Struct*)app->pBuffer;
@ -8386,7 +8386,7 @@ void Client::Handle_OP_TributeMoney(const EQApplicationPacket *app)
//player donates money //player donates money
if(app->size != sizeof(TributeMoney_Struct)) 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: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
else { else {
TributeMoney_Struct* t = (TributeMoney_Struct*)app->pBuffer; TributeMoney_Struct* t = (TributeMoney_Struct*)app->pBuffer;
@ -8534,7 +8534,7 @@ void Client::Handle_OP_Ignore(const EQApplicationPacket *app)
void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app) void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
{ {
if(app->size != sizeof(FindPersonRequest_Struct)) 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: %lu, but got: %i\n",sizeof(FindPersonRequest_Struct),app->size);
else { else {
FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer; FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer;
@ -9393,7 +9393,7 @@ void Client::CompleteConnect()
gender = 0; gender = 0;
else if (gender == 0) else if (gender == 0)
gender = 1; gender = 1;
SendIllusionPacket(GetRace(), gender, 0xFFFF, 0xFFFF); SendIllusionPacket(GetRace(), gender, 0xFF, 0xFF);
} }
else if (spell.base[x1] == -2) else if (spell.base[x1] == -2)
{ {
@ -9406,7 +9406,7 @@ void Client::CompleteConnect()
} }
else else
{ {
SendIllusionPacket(spell.base[x1], 0xFF, 0xFFFF, 0xFFFF); SendIllusionPacket(spell.base[x1], 0xFF, 0xFF, 0xFF);
} }
switch(spell.base[x1]){ switch(spell.base[x1]){
case OGRE: case OGRE:
@ -13406,7 +13406,7 @@ void Client::Handle_OP_ItemPreview(const EQApplicationPacket *app)
for (spacer = 0; spacer < 77; spacer++) { //More Item stats, but some seem to be off based on packet check for (spacer = 0; spacer < 77; spacer++) { //More Item stats, but some seem to be off based on packet check
outapp->WriteUInt8(0); outapp->WriteUInt8(0);
} }
outapp->WriteUInt32(4294967295); //Unknown but always seen as FF FF FF FF outapp->WriteUInt32(0xFFFFFFFF); //Unknown but always seen as FF FF FF FF
outapp->WriteUInt32(0); //Unknown outapp->WriteUInt32(0); //Unknown
for (spacer = 0; spacer < 5; spacer++) { //Augment stuff for (spacer = 0; spacer < 5; spacer++) { //Augment stuff
outapp->WriteUInt32(item->AugSlotType[spacer]); outapp->WriteUInt32(item->AugSlotType[spacer]);
@ -13423,7 +13423,7 @@ void Client::Handle_OP_ItemPreview(const EQApplicationPacket *app)
for (spacer = 0; spacer < 11; spacer++) { //unknowns for (spacer = 0; spacer < 11; spacer++) { //unknowns
outapp->WriteUInt8(0); outapp->WriteUInt8(0);
} }
outapp->WriteUInt32(4294967295); //Unknown but always seen as FF FF FF FF outapp->WriteUInt32(0xFFFFFFFF); //Unknown but always seen as FF FF FF FF
outapp->WriteUInt16(0); //Unknown outapp->WriteUInt16(0); //Unknown
outapp->WriteUInt32(item->Favor); // Tribute outapp->WriteUInt32(item->Favor); // Tribute
for (spacer = 0; spacer < 17; spacer++) { //unknowns for (spacer = 0; spacer < 17; spacer++) { //unknowns
@ -13431,7 +13431,7 @@ void Client::Handle_OP_ItemPreview(const EQApplicationPacket *app)
} }
outapp->WriteUInt32(item->GuildFavor); // Tribute outapp->WriteUInt32(item->GuildFavor); // Tribute
outapp->WriteUInt32(0); //Unknown outapp->WriteUInt32(0); //Unknown
outapp->WriteUInt32(4294967295); //Unknown but always seen as FF FF FF FF outapp->WriteUInt32(0xFFFFFFFF); //Unknown but always seen as FF FF FF FF
for (spacer = 0; spacer < 11; spacer++) { //unknowns for (spacer = 0; spacer < 11; spacer++) { //unknowns
outapp->WriteUInt8(0); outapp->WriteUInt8(0);
} }
@ -13446,13 +13446,13 @@ void Client::Handle_OP_ItemPreview(const EQApplicationPacket *app)
outapp->WriteUInt32(0); //unknown outapp->WriteUInt32(0); //unknown
outapp->WriteUInt32(1); // Always seen as 1 outapp->WriteUInt32(1); // Always seen as 1
outapp->WriteUInt32(0); //unknown outapp->WriteUInt32(0); //unknown
outapp->WriteUInt32(3452750909); //0x3DCCCCCD/3452750909 outapp->WriteUInt32(0xCDCCCC3D); // Unknown
outapp->WriteUInt32(0); outapp->WriteUInt32(0);
outapp->WriteUInt16(8256); //0x4020/8256 outapp->WriteUInt16(8256); //0x4020/8256
outapp->WriteUInt16(0); outapp->WriteUInt16(0);
outapp->WriteUInt32(4294967295); //Unknown but always seen as FF FF FF FF outapp->WriteUInt32(0xFFFFFFFF); //Unknown but always seen as FF FF FF FF
outapp->WriteUInt16(0); outapp->WriteUInt16(0);
outapp->WriteUInt32(4294967295); //Unknown but always seen as FF FF FF FF outapp->WriteUInt32(0xFFFFFFFF); //Unknown but always seen as FF FF FF FF
outapp->WriteUInt32(0); //unknown outapp->WriteUInt32(0); //unknown
outapp->WriteUInt32(0); //unknown outapp->WriteUInt32(0); //unknown
outapp->WriteUInt16(0); //unknown outapp->WriteUInt16(0); //unknown

View File

@ -3919,7 +3919,7 @@ void command_fixmob(Client *c, const Seperator *sep)
uint32 DrakkinTattoo = target->GetDrakkinTattoo(); uint32 DrakkinTattoo = target->GetDrakkinTattoo();
uint32 DrakkinDetails = target->GetDrakkinDetails(); uint32 DrakkinDetails = target->GetDrakkinDetails();
char* ChangeType = NULL; // If it's still NULL after processing, they didn't send a valid command const char* ChangeType = NULL; // If it's still NULL after processing, they didn't send a valid command
uint32 ChangeSetting; uint32 ChangeSetting;
char* command = sep->arg[1]; char* command = sep->arg[1];
@ -9566,7 +9566,7 @@ void command_object(Client *c, const Seperator *sep)
} }
// Save it here. We sometimes have need to refer to it in multiple places. // Save it here. We sometimes have need to refer to it in multiple places.
char* usage_string = "Usage: #object List|Add|Edit|Move|Rotate|Save|Copy|Delete|Undo"; const char* usage_string = "Usage: #object List|Add|Edit|Move|Rotate|Save|Copy|Delete|Undo";
if ((!sep) || (sep->argnum == 0)) if ((!sep) || (sep->argnum == 0))
{ {
@ -11629,5 +11629,5 @@ void command_augmentitem(Client *c, const Seperator *sep)
in_augment->augment_slot = -1; in_augment->augment_slot = -1;
if(c->GetTradeskillObject() != NULL) if(c->GetTradeskillObject() != NULL)
Object::HandleAugmentation(c, in_augment, c->GetTradeskillObject()); Object::HandleAugmentation(c, in_augment, c->GetTradeskillObject());
safe_delete(in_augment); safe_delete_array(in_augment);
} }

View File

@ -110,7 +110,7 @@ Doors::Doors(const char *dmodel, float dx, float dy, float dz, float dheading, u
dest_heading = 0; dest_heading = 0;
is_ldon_door = 0; is_ldon_door = 0;
client_version_mask = 4294967295; client_version_mask = 4294967295u;
} }

View File

@ -5124,7 +5124,7 @@ NPC* EntityList::GetClosestBanker(Mob* sender, uint32 &distance)
if(!sender) if(!sender)
return NULL; return NULL;
distance = 4294967295; distance = 4294967295u;
NPC* nc = NULL; NPC* nc = NULL;
LinkedListIterator<NPC*> iterator(npc_list); LinkedListIterator<NPC*> iterator(npc_list);

View File

@ -1791,7 +1791,7 @@ void Merc::AI_Process() {
//now off hand //now off hand
if(GetTarget() && attack_dw_timer.Check() && CanThisClassDualWield()) { if(GetTarget() && attack_dw_timer.Check() && CanThisClassDualWield()) {
int weapontype = NULL; int weapontype = 0; // No weapon type
bool bIsFist = true; bool bIsFist = true;
if(bIsFist || ((weapontype != ItemType2HS) && (weapontype != ItemType2HPierce) && (weapontype != ItemType2HB))) { if(bIsFist || ((weapontype != ItemType2HS) && (weapontype != ItemType2HPierce) && (weapontype != ItemType2HB))) {
@ -5959,7 +5959,7 @@ void NPC::LoadMercTypes(){
mysql_free_result(DatasetResult); mysql_free_result(DatasetResult);
} }
safe_delete(Query); safe_delete_array(Query);
Query = 0; Query = 0;
if(!errorMessage.empty()) { if(!errorMessage.empty()) {
@ -5995,7 +5995,7 @@ void NPC::LoadMercs(){
mysql_free_result(DatasetResult); mysql_free_result(DatasetResult);
} }
safe_delete(Query); safe_delete_array(Query);
Query = 0; Query = 0;
if(!errorMessage.empty()) { if(!errorMessage.empty()) {

View File

@ -494,8 +494,6 @@ int main(int argc, char** argv) {
void CatchSignal(int sig_num) { void CatchSignal(int sig_num) {
#ifdef _WINDOWS #ifdef _WINDOWS
_log(ZONE__INIT, "Recieved signal: %i", sig_num); _log(ZONE__INIT, "Recieved signal: %i", sig_num);
#else
_log(ZONE__INIT, "Recieved signal: %i in thread %d", sig_num, pthread_self());
#endif #endif
RunLoops = false; RunLoops = false;
} }

View File

@ -1023,6 +1023,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
if (npc_type_id) if (npc_type_id)
{ {
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO npc_types (id, name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) values(%i,\"%s\",%i,%i,%i,%i,%i,%i,%i,%f,%i,%i,%i,%f,%i,%i)", npc_type_id, tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28), errbuf, 0, 0, &npc_type_id)) { if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO npc_types (id, name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) values(%i,\"%s\",%i,%i,%i,%i,%i,%i,%i,%f,%i,%i,%i,%f,%i,%i)", npc_type_id, tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28), errbuf, 0, 0, &npc_type_id)) {
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
safe_delete(query); safe_delete(query);
return false; return false;
} }
@ -1030,6 +1031,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
else else
{ {
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO npc_types (name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) values(\"%s\",%i,%i,%i,%i,%i,%i,%i,%f,%i,%i,%i,%f,%i,%i)", tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28), errbuf, 0, 0, &npc_type_id)) { if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO npc_types (name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) values(\"%s\",%i,%i,%i,%i,%i,%i,%i,%f,%i,%i,%i,%f,%i,%i)", tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28), errbuf, 0, 0, &npc_type_id)) {
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
safe_delete(query); safe_delete(query);
return false; return false;
} }
@ -1038,18 +1040,21 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
safe_delete_array(query); safe_delete_array(query);
snprintf(tmpstr, sizeof(tmpstr), "%s-%s", zone, spawn->GetName()); snprintf(tmpstr, sizeof(tmpstr), "%s-%s", zone, spawn->GetName());
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawngroup (id, name) values(%i, '%s')", tmp, tmpstr), errbuf, 0, 0, &spawngroupid)) { if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawngroup (id, name) values(%i, '%s')", tmp, tmpstr), errbuf, 0, 0, &spawngroupid)) {
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
safe_delete(query); safe_delete(query);
return false; return false;
} }
if(c) c->LogSQL(query); if(c) c->LogSQL(query);
safe_delete_array(query); safe_delete_array(query);
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawn2 (zone, version, x, y, z, respawntime, heading, spawngroupID) values('%s', %u, %f, %f, %f, %i, %f, %i)", zone, zone_version, spawn->GetX(), spawn->GetY(), spawn->GetZ(), 1200, spawn->GetHeading(), spawngroupid), errbuf, 0, 0, &tmp)) { if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawn2 (zone, version, x, y, z, respawntime, heading, spawngroupID) values('%s', %u, %f, %f, %f, %i, %f, %i)", zone, zone_version, spawn->GetX(), spawn->GetY(), spawn->GetZ(), 1200, spawn->GetHeading(), spawngroupid), errbuf, 0, 0, &tmp)) {
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
safe_delete(query); safe_delete(query);
return false; return false;
} }
if(c) c->LogSQL(query); if(c) c->LogSQL(query);
safe_delete_array(query); safe_delete_array(query);
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawnentry (spawngroupID, npcID, chance) values(%i, %i, %i)", spawngroupid, npc_type_id, 100), errbuf, 0)) { if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawnentry (spawngroupID, npcID, chance) values(%i, %i, %i)", spawngroupid, npc_type_id, 100), errbuf, 0)) {
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
safe_delete(query); safe_delete(query);
return false; return false;
} }
@ -1063,7 +1068,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
char tmpstr[64]; char tmpstr[64];
snprintf(tmpstr, sizeof(tmpstr), "%s%s%i", zone, spawn->GetName(),Timer::GetCurrentTime()); snprintf(tmpstr, sizeof(tmpstr), "%s%s%i", zone, spawn->GetName(),Timer::GetCurrentTime());
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawngroup (name) values('%s')", tmpstr), errbuf, 0, 0, &last_insert_id)) { if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawngroup (name) values('%s')", tmpstr), errbuf, 0, 0, &last_insert_id)) {
printf("ReturnFalse: spawngroup query in NPCSpawnDB() (query: %s)\n",query); LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
safe_delete(query); safe_delete(query);
return false; return false;
} }
@ -1079,16 +1084,16 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
else else
respawntime = 1200; respawntime = 1200;
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawn2 (zone, version, x, y, z, respawntime, heading, spawngroupID) values('%s', %u, %f, %f, %f, %i, %f, %i)", zone, zone_version, spawn->GetX(), spawn->GetY(), spawn->GetZ(), respawntime, spawn->GetHeading(), last_insert_id), errbuf, 0, 0, &spawnid)) { if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawn2 (zone, version, x, y, z, respawntime, heading, spawngroupID) values('%s', %u, %f, %f, %f, %i, %f, %i)", zone, zone_version, spawn->GetX(), spawn->GetY(), spawn->GetZ(), respawntime, spawn->GetHeading(), last_insert_id), errbuf, 0, 0, &spawnid)) {
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
safe_delete(query); safe_delete(query);
printf("ReturnFalse: spawn2 query in NPCSpawnDB()\n");
return false; return false;
} }
if(c) c->LogSQL(query); if(c) c->LogSQL(query);
safe_delete_array(query); safe_delete_array(query);
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawnentry (spawngroupID, npcID, chance) values(%i, %i, %i)", last_insert_id, tmp2, 100), errbuf, 0)) { if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO spawnentry (spawngroupID, npcID, chance) values(%i, %i, %i)", last_insert_id, tmp2, 100), errbuf, 0)) {
LogFile->write(EQEMuLog::Error, "NPCSpawnDB Error: %s %s", query, errbuf);
safe_delete(query); safe_delete(query);
printf("ReturnFalse: spawnentry query in NPCSpawnDB()\n");
return false; return false;
} }
if(c) c->LogSQL(query); if(c) c->LogSQL(query);

View File

@ -1094,7 +1094,7 @@ int Parser::LoadScript(int npcid, const char * zone, Mob* activater)
buffer.replace(buffer.length()-1,buffer.length(),""); buffer.replace(buffer.length()-1,buffer.length(),"");
int heh = ParseCommands(buffer,line_num,0,0,0,0,filename); int heh = ParseCommands(buffer,line_num,0,0,0,0,filename);
if (!heh){ if (!heh){
safe_delete_array(NewEventList); safe_delete(NewEventList);
return 0; return 0;
} }
event1->command = buffer; event1->command = buffer;

View File

@ -47,9 +47,9 @@ XS(XS_PerlPacket_new)
if (items < 1 || items > 3) if (items < 1 || items > 3)
Perl_croak(aTHX_ "Usage: PerlPacket::new(CLASS, opcode= \"OP_Unknown\", len= 0)"); Perl_croak(aTHX_ "Usage: PerlPacket::new(CLASS, opcode= \"OP_Unknown\", len= 0)");
{ {
char * CLASS = (char *)SvPV_nolen(ST(0)); char *CLASS = (char *)SvPV_nolen(ST(0));
PerlPacket * RETVAL; PerlPacket *RETVAL;
char * opcode; const char *opcode;
uint32 len; uint32 len;
if (items < 2) if (items < 2)

View File

@ -37,9 +37,6 @@ PerlPacket::~PerlPacket() {
} }
bool PerlPacket::SetOpcode(const char *opcode) { bool PerlPacket::SetOpcode(const char *opcode) {
#ifndef WIN32
#warning Rewrite this!
#endif
op = OP_Unknown; op = OP_Unknown;
// op = ZoneOpcodeManager->NameSearch(opcode); // op = ZoneOpcodeManager->NameSearch(opcode);
return(op != OP_Unknown); return(op != OP_Unknown);
@ -69,9 +66,6 @@ void PerlPacket::SendTo(Client *who) {
if(len > 0) if(len > 0)
memcpy(outapp->pBuffer, packet, len); memcpy(outapp->pBuffer, packet, len);
#ifndef WIN32
#warning Rewrite this!
#endif
// printf("Created this packet with PerlPacket: OP: %s\n", ZoneOpcodeManager->EmuToName(op)); // printf("Created this packet with PerlPacket: OP: %s\n", ZoneOpcodeManager->EmuToName(op));
DumpPacket(outapp); DumpPacket(outapp);

View File

@ -3690,6 +3690,9 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(!IsValidSpell(spell_id)) if(!IsValidSpell(spell_id))
return true; return true;
if(IsBeneficialSpell(spell_id) && (caster->GetNPCTypeID())) //then skip the rest, stop NPCs aggroing each other with buff spells. 2013-03-05
return false;
if(IsMezSpell(spell_id)) if(IsMezSpell(spell_id))
{ {
if(SpecAttacks[UNMEZABLE]) { if(SpecAttacks[UNMEZABLE]) {