Compare commits

...

37 Commits

Author SHA1 Message Date
KimLS 1b44123551 Slight cleanup on recent pull req + changing versions up 2013-02-22 22:31:07 -08:00
Alex 306cf7a5f5 Merge pull request #14 from mackal/xtarget_feign_clear
Mobs will now be removed from XTarget when they clear their feign memory
2013-02-22 22:27:54 -08:00
mackal dd913de1a2 Mobs will now be removed from XTarget when they clear their feign memory aggro 2013-02-22 22:27:03 -05:00
JJ 60172a7801 Merge pull request #10 from addtheice/master
Addtheice: Spelling fixes
2013-02-21 02:28:31 -08:00
Arthur Ice 998cfb6528 fixed miss spelling of 'recieved' to 'received' in ServerStats and in log messages. 2013-02-21 00:07:49 -08:00
Derision e0b38cf3cc World should no longer crash if the start_zone query fails at character creation. 2013-02-19 20:07:53 +00:00
Alex 74194cd38c Update .gitignore 2013-02-18 23:07:32 -08:00
KimLS e36eefc060 EVENT_DEATH changelog 2013-02-18 19:23:27 -08:00
KimLS cb01d245e6 EVENT_DEATH for PlayerQuests 2013-02-18 19:22:07 -08:00
Derision 04bad157f5 Merge pull request #5 from mackal/potionbelt
Potionbelt Tooltip
2013-02-18 11:35:52 -08:00
mackal 357646466a Changelog udpated 2013-02-18 14:22:09 -05:00
mackal 11d9838faa Added the item_name field to potionbelt to give the user the Tool Tip 2013-02-18 14:19:20 -05:00
Derision 9680c039f0 Charmed pets should no longer be targettable with F8. Charmed pets no longer get a surname of Soandso's Pet. 2013-02-18 18:58:26 +00:00
KLS 9f63498a64 Quest Interface wont attempt to keep loading GlobalQuest sub over and over and over... 2013-02-18 09:12:14 -08:00
Alex aa20e5b5e3 Issue where not having a global npc quest file may cause the server to crash on bootup 2013-02-18 09:01:49 -08:00
JJ c9d4816a88 Garble text for drunk characters. 2013-02-18 02:21:34 -05:00
joligario 3feeced884 Chat garbled for drunk characters. 2013-02-18 01:59:43 -05:00
KimLS edc4b4039b Optional Merc Spells fix for violation of commit rules. 2013-02-17 22:57:15 -08:00
badcaptain a41874b6a7 Moved merc save data from extended player profile to new merc table, save merc buffs, added cure and rez spells to healer merc. 2013-02-18 00:50:19 -05:00
KimLS a37211cb83 Forgot to take out my comment code - doh 2013-02-17 15:40:29 -08:00
KimLS 4e802921a5 Fix for sub checking on global npc quests 2013-02-17 15:36:53 -08:00
KimLS c6d8895b70 One fix to QuestParserCollection for global npc quests, HasSub is not working at all right with it. Need to check it out later tonight 2013-02-17 15:22:35 -08:00
Derision 23b2b599a7 Fixed bug where BecomeTrader packets were only being sent to the Trader, not all other clients in the bazaar. 2013-02-17 20:23:34 +00:00
Derision 07979ce2de Client version is now returned by the stream proxy as a number. 2013-02-17 18:09:31 +00:00
Derision d1afad47aa Added optional guildid and minstatus parameters to quest::gmsay(<messsage>, [color], [toworld], [guildid], [minstatus]) 2013-02-17 10:19:12 +00:00
KimLS 15dc9cfaf4 Some warning fixes, unreferenced local variables. 2013-02-16 22:07:32 -08:00
Alex 7c706d9871 Merge pull request #1 from mackal/master
AA reuse timer fix and Update filter system
2013-02-16 20:56:09 -08:00
KimLS 0a9642e776 utils/sql/git added 2013-02-16 18:05:41 -08:00
mackal 20fb899d5d Merge branch 'master' of https://github.com/EQEmu/Server.git 2013-02-16 20:21:53 -05:00
mackal 38d4fbc863 Remove old filters and change all remaining old to new (Also fix Auction filtering out OOC as well due to incorrect define) 2013-02-16 20:14:07 -05:00
KimLS b6010afa9c Ignore all files in dependencies. 2013-02-16 16:55:04 -08:00
mackal 234cd0c4ff Merge remote-tracking branch 'upstream/master' 2013-02-16 19:53:51 -05:00
mackal a510d2593f Update change log 2013-02-16 19:50:19 -05:00
KimLS 0aa958de8f Moved queryserv sql to svn so I can more easily have a git section without confusion 2013-02-16 16:47:28 -08:00
mackal 07950b7a58 Fix calc of resuse timers on multi-rank AAs 2013-02-16 19:47:12 -05:00
Alex 710554efcd Update .gitignore 2013-02-16 16:37:14 -08:00
KimLS b14519b1f5 Derision's revert from svn I missed. 2013-02-16 16:25:57 -08:00
79 changed files with 1817 additions and 478 deletions
+12
View File
@@ -23,3 +23,15 @@ CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
Build/
build/
Build32/
build32/
Build64/
build64/
Build_32/
build_32/
Build_64/
build_64/
log/
logs/
+22 -1
View File
@@ -1,8 +1,29 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 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
== 02/19/2013 ==
Derision: World should no longer crash if the start_zone query fails at character creation.
== 02/18/2013 ==
Bad_Captain: Moved merc save to merc table, save merc buffs, added cure and rez spells to healer merc.
JJ: Chat garbled for drunk characters.
Derision: Charmed pets should no longer be targettable with F8. Charmed pets no longer get a surname of Soandso's Pet.
demonstar55: Added potionbelt tool tip
KLS: Added EVENT_DEATH to Player Quests
REQUIRED SQL: 2013_02_18_Merc_Rules_and_Tables.sql
OPTIONAL SQL: 2013_02_18_Merc_Spells.sql
== 02/17/2013 ==
Derision: Added optional guildid and minstatus parameters to quest::gmsay(<messsage>, [color], [toworld], [guildid], [minstatus])
Derision: Client version is now returned by the stream proxy as a number.
Derision: Fixed bug where BecomeTrader packets were only being sent to the Trader, not all other clients in the bazaar.
== 02/16/2013 ==
Derision: Added optional guildid to quest::gmsay, i.e. quest::gmsay(<messsage>, [color], [toworld], [guildid])
demonstar55: Fix AA reuse timer calc
demonstar55: Remove old filters and change all remaining old to new (Also fix Auction filtering out OOC as well due to incorrect define)
== 02/12/2013 ==
Kayen: AA fix
+3 -3
View File
@@ -438,11 +438,11 @@ if(NextSequencedSend > SequencedQueue.size()) {
#ifndef COLLECTOR
SessionStats *Stats=(SessionStats *)p->pBuffer;
_log(NET__NET_TRACE, _L "Received Stats: %lu packets received, %lu packets sent, Deltas: local %lu, (%lu <- %lu -> %lu) remote %lu" __L,
(unsigned long)ntohl(Stats->packets_recieved), (unsigned long)ntohl(Stats->packets_sent), (unsigned long)ntohl(Stats->last_local_delta),
(unsigned long)ntohl(Stats->packets_received), (unsigned long)ntohl(Stats->packets_sent), (unsigned long)ntohl(Stats->last_local_delta),
(unsigned long)ntohl(Stats->low_delta), (unsigned long)ntohl(Stats->average_delta),
(unsigned long)ntohl(Stats->high_delta), (unsigned long)ntohl(Stats->last_remote_delta));
uint64 x=Stats->packets_recieved;
Stats->packets_recieved=Stats->packets_sent;
uint64 x=Stats->packets_received;
Stats->packets_received=Stats->packets_sent;
Stats->packets_sent=x;
NonSequencedPush(new EQProtocolPacket(OP_SessionStatResponse,p->pBuffer,p->size));
AdjustRates(ntohl(Stats->average_delta));
+1 -1
View File
@@ -52,7 +52,7 @@ struct SessionStats {
/*014*/ uint32 high_delta;
/*018*/ uint32 last_remote_delta;
/*022*/ uint64 packets_sent;
/*030*/ uint64 packets_recieved;
/*030*/ uint64 packets_received;
/*038*/
};
+2
View File
@@ -4,6 +4,7 @@
//this is the only part of an EQStream that is seen by the application.
#include <string>
#include "clientversions.h"
typedef enum {
ESTABLISHED,
@@ -34,6 +35,7 @@ public:
virtual const uint32 GetBytesRecieved() const { return 0; }
virtual const uint32 GetBytesSentPerSecond() const { return 0; }
virtual const uint32 GetBytesRecvPerSecond() const { return 0; }
virtual const EQClientVersion ClientVersion() const { return EQClientUnknown; }
};
#endif /*EQSTREAMINTF_H_*/
+5
View File
@@ -22,6 +22,11 @@ std::string EQStreamProxy::Describe() const {
return(m_structs->Describe());
}
const EQClientVersion EQStreamProxy::ClientVersion() const
{
return m_structs->ClientVersion();
}
void EQStreamProxy::QueuePacket(const EQApplicationPacket *p, bool ack_req) {
if(p == NULL)
return;
+1
View File
@@ -27,6 +27,7 @@ public:
virtual void RemoveData();
virtual bool CheckState(EQStreamState state);
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
virtual const uint32 GetBytesSent() const;
virtual const uint32 GetBytesRecieved() const;
+2 -4
View File
@@ -216,8 +216,6 @@ void HttpdSocket::OnData(const char *p,size_t l)
void HttpdSocket::Send64(const std::string& str64, const std::string& type)
{
Base64 bb;
if (!strcasecmp(m_start.c_str(), m_if_modified_since.c_str()))
{
SetStatus("304");
@@ -226,7 +224,7 @@ void HttpdSocket::Send64(const std::string& str64, const std::string& type)
}
else
{
size_t len = bb.decode_length(str64);
size_t len = Base64::decode_length(str64);
unsigned char *buf = new unsigned char[len];
SetStatus("200");
@@ -237,7 +235,7 @@ void HttpdSocket::Send64(const std::string& str64, const std::string& type)
AddResponseHeader("Last-modified", m_start);
SendResponse();
bb.decode(str64, buf, len);
Base64::decode(str64, buf, len);
SendBuf( (char *)buf, len);
delete[] buf;
}
+2 -4
View File
@@ -37,8 +37,7 @@ namespace SOCKETS_NAMESPACE {
std::string Utility::base64(const std::string& str_in)
{
std::string str;
Base64 m_b;
m_b.encode(str_in, str, false); // , false == do not add cr/lf
Base64::encode(str_in, str, false); // , false == do not add cr/lf
return str;
}
@@ -46,8 +45,7 @@ std::string Utility::base64(const std::string& str_in)
std::string Utility::base64d(const std::string& str_in)
{
std::string str;
Base64 m_b;
m_b.decode(str_in, str);
Base64::decode(str_in, str);
return str;
}
+2
View File
@@ -4,6 +4,7 @@
class EQApplicationPacket;
class EQStream;
#include "emu_opcodes.h"
#include "clientversions.h"
#include <string>
@@ -23,6 +24,7 @@ public:
void Decode(EQApplicationPacket *p) const;
virtual std::string Describe() const = 0;
virtual const EQClientVersion ClientVersion() const = 0;
protected:
//some common coders:
+27
View File
@@ -0,0 +1,27 @@
#ifndef CLIENTVERSIONS_H
#define CLIENTVERSIONS_H
static const uint32 BIT_Client62 = 1;
static const uint32 BIT_Titanium = 2;
static const uint32 BIT_SoF = 4;
static const uint32 BIT_SoD = 8;
static const uint32 BIT_Underfoot = 16;
static const uint32 BIT_RoF = 32;
static const uint32 BIT_TitaniumAndEarlier = 3;
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
static const uint32 BIT_UnderfootAndLater = 0xFFFFFFF0;
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
static const uint32 BIT_AllClients = 0xFFFFFFFF;
typedef enum {
EQClientUnknown = 0,
EQClient62,
EQClientTitanium,
EQClientSoF,
EQClientSoD,
EQClientUnderfoot,
EQClientRoF
} EQClientVersion;
#endif /* CLIENTVERSIONS_H */
+1
View File
@@ -47,6 +47,7 @@ class NPC;
class SpawnGroupList;
class Petition;
class Client;
class Merc;
struct Combine_Struct;
//struct Faction;
//struct FactionMods;
+1 -37
View File
@@ -18,19 +18,6 @@
#ifndef EQ_CONSTANTS_H
#define EQ_CONSTANTS_H
#define BIT_Client62 1
#define BIT_Titanium 2
#define BIT_SoF 4
#define BIT_SoD 8
#define BIT_Underfoot 16
#define BIT_RoF 32
#define BIT_TitaniumAndEarlier 3
#define BIT_SoFAndLater 0xFFFFFFFC
#define BIT_SoDAndLater 0xFFFFFFF8
#define BIT_UnderfootAndLater 0xFFFFFFF0
#define BIT_RoFAndLater 0xFFFFFFE0
#define BIT_AllClients 0xFFFFFFFF
#include "skills.h"
/*
@@ -158,6 +145,7 @@ enum {
#define AT_GuildID 22
#define AT_GuildRank 23 // 0=member, 1=officer, 2=leader
#define AT_AFK 24 // 0 = normal, 1 = afk
#define AT_Pet 25 // Param is EntityID of owner, or 0 for when charm breaks
#define AT_Split 28 // 0 = normal, 1 = autosplit on
#define AT_Size 29 // spawn's size
#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name
@@ -425,30 +413,6 @@ typedef enum {
FilterShowSelfOnly
} eqFilterMode;
//im lazy today, dont wanna find/replace these
#define FILTER_DAMAGESHIELD FilterDamageShields
#define FILTER_NPCSPELLS FilterNPCSpells
#define FILTER_PCSPELLS FilterPCSpells
#define FILTER_BARDSONGS FilterBardSongs
#define FILTER_GUILDSAY FilterGuildChat
#define FILTER_SOCIALS FilterSocials
#define FILTER_GROUP FilterGroupChat
#define FILTER_SHOUT FilterShouts
#define FILTER_AUCTION FilterAuctions
#define FILTER_OOC FilterAuctions
#define FILTER_MYMISSES FilterMyMisses
#define FILTER_OTHERMISSES FilterOthersMiss
#define FILTER_OTHERHITS FilterOthersHit
#define FILTER_ATKMISSESME FilterMissedMe
#define FILTER_CRITSPELLS FilterSpellCrits
#define FILTER_CRITMELEE FilterMeleeCrits
#define FILTER_SPELLDAMAGE FilterSpellDamage
#define FILTER_DOTDAMAGE FilterDOT
#define FILTER_MYPETHITS FilterPetHits
#define FILTER_MYPETMISSES FilterPetMisses
#define STAT_STR 0
#define STAT_STA 1
#define STAT_AGI 2
-1
View File
@@ -1318,7 +1318,6 @@ uint32 BaseGuildManager::DoesAccountContainAGuildLeader(uint32 AccountID)
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
if (!m_db->RunQuery(query,
MakeAnyLenString(&query,
+5
View File
@@ -9,6 +9,7 @@
#include "../eq_packet_structs.h"
#include "../MiscFunctions.h"
#include "../Item.h"
#include "../clientversions.h"
#include "Client62_structs.h"
namespace Client62 {
@@ -93,6 +94,10 @@ std::string Strategy::Describe() const {
return(r);
}
const EQClientVersion Strategy::ClientVersion() const
{
return EQClient62;
}
#include "SSDefine.h"
+1
View File
@@ -24,6 +24,7 @@ namespace Client62 {
protected:
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors
#include "SSDeclare.h"
+5 -2
View File
@@ -98,9 +98,12 @@ std::string Strategy::Describe() const {
r += name;
return(r);
}
const EQClientVersion Strategy::ClientVersion() const
{
return EQClientRoF;
}
#include "SSDefine.h"
// Converts Titanium Slot IDs to RoF Slot IDs for use in Encodes
+1
View File
@@ -23,6 +23,7 @@ namespace RoF {
protected:
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors
#include "SSDeclare.h"
+4 -1
View File
@@ -99,7 +99,10 @@ std::string Strategy::Describe() const {
return(r);
}
const EQClientVersion Strategy::ClientVersion() const
{
return EQClientSoD;
}
#include "SSDefine.h"
+1
View File
@@ -23,6 +23,7 @@ namespace SoD {
protected:
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors
#include "SSDeclare.h"
+4 -1
View File
@@ -99,7 +99,10 @@ std::string Strategy::Describe() const {
return(r);
}
const EQClientVersion Strategy::ClientVersion() const
{
return EQClientSoF;
}
#include "SSDefine.h"
+1
View File
@@ -23,6 +23,7 @@ namespace SoF {
protected:
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors
#include "SSDeclare.h"
+4 -1
View File
@@ -97,7 +97,10 @@ std::string Strategy::Describe() const {
return(r);
}
const EQClientVersion Strategy::ClientVersion() const
{
return EQClientTitanium;
}
#include "SSDefine.h"
+1
View File
@@ -23,6 +23,7 @@ namespace Titanium {
protected:
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors
#include "SSDeclare.h"
+4 -1
View File
@@ -100,7 +100,10 @@ std::string Strategy::Describe() const {
return(r);
}
const EQClientVersion Strategy::ClientVersion() const
{
return EQClientUnderfoot;
}
#include "SSDefine.h"
+1
View File
@@ -23,6 +23,7 @@ namespace Underfoot {
protected:
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors
#include "SSDeclare.h"
+1 -1
View File
@@ -23,7 +23,7 @@ namespace TEMPLATE {
protected:
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcodes
#include "SSDeclare.h"
#include "TEMPLATE_ops.h"
+1
View File
@@ -106,6 +106,7 @@ RULE_INT (Mercs, UpkeepIntervalS, 180)
RULE_BOOL ( Mercs, AllowMercs, false )
RULE_INT (Mercs, AggroRadius, 100) // Determines the distance from which a merc will aggro group member's target(also used to determine the distance at which a healer merc will begin healing a group member)
RULE_INT (Mercs, AggroRadiusPuller, 25) // Determines the distance from which a merc will aggro group member's target, if they have the group role of puller (also used to determine the distance at which a healer merc will begin healing a group member, if they have the group role of puller)
RULE_INT (Mercs, ResurrectRadius, 50) // Determines the distance from which a healer merc will attempt to resurrect a group member's corpse
RULE_INT (Mercs, ScaleRate, 100)
RULE_CATEGORY_END()
-2
View File
@@ -1,8 +1,6 @@
#ifndef EQ_SOPCODES_H
#define EQ_SOPCODES_H
#define EQEMU_PROTOCOL_VERSION "0.3.10"
#include "../common/types.h"
#include "../common/packet_functions.h"
#include "../common/eq_packet_structs.h"
+7 -8
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
Copyright (C) 2001-2013 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,16 +16,15 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef VERSION_H
#define VERSION_H
#ifndef _EQEMU_VERSION_H
#define _EQEMU_VERSION_H
#define CURRENT_VERSION "0.8.0"
#define CURRENT_CHAT_VERSION "EQEmulator " CURRENT_VERSION
#define CURRENT_ZONE_VERSION "EQEmulator " CURRENT_VERSION
#define CURRENT_WORLD_VERSION "EQEmulator " CURRENT_VERSION
#define LOGIN_VERSION "0.8.0"
#define EQEMU_PROTOCOL_VERSION "0.3.10"
#define CURRENT_VERSION "1.0.0"
#define COMPILE_DATE __DATE__
#define COMPILE_TIME __TIME__
#define SVN_REVISION "$Rev: 986 $"
#ifndef WIN32
#define LAST_MODIFIED __TIME__
#else
+1
View File
@@ -0,0 +1 @@
*.*
+10 -10
View File
@@ -41,7 +41,7 @@ bool Client::Process()
{
if(server.options.IsTraceOn())
{
server_log->Log(log_network, "Application packet recieved from client (size %u)", app->Size());
server_log->Log(log_network, "Application packet received from client (size %u)", app->Size());
}
if(server.options.IsDumpInPacketsOn())
@@ -55,7 +55,7 @@ bool Client::Process()
{
if(server.options.IsTraceOn())
{
server_log->Log(log_network, "Session ready recieved from client.");
server_log->Log(log_network, "Session ready received from client.");
}
Handle_SessionReady((const char*)app->pBuffer, app->Size());
break;
@@ -64,13 +64,13 @@ bool Client::Process()
{
if(app->Size() < 20)
{
server_log->Log(log_network_error, "Login recieved but it is too small, discarding.");
server_log->Log(log_network_error, "Login received but it is too small, discarding.");
break;
}
if(server.options.IsTraceOn())
{
server_log->Log(log_network, "Login recieved from client.");
server_log->Log(log_network, "Login received from client.");
}
Handle_Login((const char*)app->pBuffer, app->Size());
@@ -80,7 +80,7 @@ bool Client::Process()
{
if(server.options.IsTraceOn())
{
server_log->Log(log_network, "Server list request recieved from client.");
server_log->Log(log_network, "Server list request received from client.");
}
SendServerListPacket();
@@ -90,7 +90,7 @@ bool Client::Process()
{
if(app->Size() < sizeof(PlayEverquestRequest_Struct))
{
server_log->Log(log_network_error, "Play recieved but it is too small, discarding.");
server_log->Log(log_network_error, "Play received but it is too small, discarding.");
break;
}
@@ -116,7 +116,7 @@ void Client::Handle_SessionReady(const char* data, unsigned int size)
{
if(status != cs_not_sent_session_ready)
{
server_log->Log(log_network_error, "Session ready recieved again after already being recieved.");
server_log->Log(log_network_error, "Session ready received again after already being received.");
return;
}
@@ -177,13 +177,13 @@ void Client::Handle_Login(const char* data, unsigned int size)
{
if(status != cs_waiting_for_login)
{
server_log->Log(log_network_error, "Login recieved after already having logged in.");
server_log->Log(log_network_error, "Login received after already having logged in.");
return;
}
if((size - 12) % 8 != 0)
{
server_log->Log(log_network_error, "Login recieved packet of size: %u, this would cause a block corruption, discarding.", size);
server_log->Log(log_network_error, "Login received packet of size: %u, this would cause a block corruption, discarding.", size);
return;
}
@@ -341,7 +341,7 @@ void Client::Handle_Play(const char* data)
if(server.options.IsTraceOn())
{
server_log->Log(log_network, "Play recieved from client, server number %u sequence %u.", server_id_in, sequence_in);
server_log->Log(log_network, "Play received from client, server number %u sequence %u.", server_id_in, sequence_in);
}
this->play_server_id = (unsigned int)play->ServerNumber;
+4 -4
View File
@@ -64,7 +64,7 @@ bool WorldServer::Process()
{
if(server.options.IsWorldTraceOn())
{
server_log->Log(log_network_trace, "Application packet recieved from server: 0x%.4X, (size %u)", app->opcode, app->size);
server_log->Log(log_network_trace, "Application packet received from server: 0x%.4X, (size %u)", app->opcode, app->size);
}
if(server.options.IsDumpInPacketsOn())
@@ -78,7 +78,7 @@ bool WorldServer::Process()
{
if(app->size < sizeof(ServerNewLSInfo_Struct))
{
server_log->Log(log_network_error, "Recieved application packet from server that had opcode ServerOP_NewLSInfo, "
server_log->Log(log_network_error, "Received application packet from server that had opcode ServerOP_NewLSInfo, "
"but was too small. Discarded to avoid buffer overrun.");
break;
}
@@ -137,7 +137,7 @@ bool WorldServer::Process()
//While keeping world server spam with multiple servers connected almost impossible.
if(server.options.IsTraceOn())
{
server_log->Log(log_network_trace, "User-To-World Response recieved.");
server_log->Log(log_network_trace, "User-To-World Response received.");
}
UsertoWorldResponse_Struct *utwr = (UsertoWorldResponse_Struct*)app->pBuffer;
@@ -201,7 +201,7 @@ bool WorldServer::Process()
}
case ServerOP_LSAccountUpdate:
{
server_log->Log(log_network_trace, "ServerOP_LSAccountUpdate packet recieved from: %s", short_name.c_str());
server_log->Log(log_network_trace, "ServerOP_LSAccountUpdate packet received from: %s", short_name.c_str());
ServerLSAccountUpdate_Struct *lsau = (ServerLSAccountUpdate_Struct*)app->pBuffer;
if(trusted)
{
+2 -2
View File
@@ -121,12 +121,12 @@ public:
unsigned int GetPlayersOnline() const { return players_online; }
/**
* Takes the info struct we recieved from world and processes it.
* Takes the info struct we received from world and processes it.
*/
void Handle_NewLSInfo(ServerNewLSInfo_Struct* i);
/**
* Takes the status struct we recieved from world and processes it.
* Takes the status struct we received from world and processes it.
*/
void Handle_LSStatus(ServerLSStatus_Struct *s);
+12
View File
@@ -0,0 +1,12 @@
On the move from svn -> git we lost the ability to track revision numbers on the repo.
No big deal!
What we'll do instead as follows:
-Optional SQL updates go in optional/
-Required SQL updates go in required/
All updates will follow a specific format of YYYY_MM_DD_Desc.sql, this is so it's easy to sort.
So the following is a good example of what I expect to see
2013_02_16_GitConversion.sql
View File
@@ -0,0 +1,301 @@
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Mercenary Taunt' ORDER BY id DESC LIMIT 1), 1, 0, 1, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Provoke' ORDER BY id DESC LIMIT 1), 1, 0, 20, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bellow' ORDER BY id DESC LIMIT 1), 1, 0, 52, 55, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Berate' ORDER BY id DESC LIMIT 1), 1, 0, 56, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Mercenary Area Taunt' ORDER BY id DESC LIMIT 1), 1, 0, 59, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Incite' ORDER BY id DESC LIMIT 1), 1, 0, 63, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bellow of the Mastruq' ORDER BY id DESC LIMIT 1), 1, 0, 65, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bazu Bellow' ORDER BY id DESC LIMIT 1), 1, 0, 69, 80, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Mock' ORDER BY id DESC LIMIT 1), 1, 0, 70, 74, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Scowl' ORDER BY id DESC LIMIT 1), 1, 0, 75, 79, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sneer' ORDER BY id DESC LIMIT 1), 1, 0, 80, 84, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bazu Bluster' ORDER BY id DESC LIMIT 1), 1, 0, 81, 85, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Jeer' ORDER BY id DESC LIMIT 1), 1, 0, 85, 89, 2, 0 );
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Mercenary Taunt' ORDER BY id DESC LIMIT 1), 1, 0, 1, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Provoke' ORDER BY id DESC LIMIT 1), 1, 0, 20, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bellow' ORDER BY id DESC LIMIT 1), 1, 0, 52, 55, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Berate' ORDER BY id DESC LIMIT 1), 1, 0, 56, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Mercenary Area Taunt' ORDER BY id DESC LIMIT 1), 1, 0, 59, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Incite' ORDER BY id DESC LIMIT 1), 1, 0, 63, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ancient: Chaos Cry' ORDER BY id DESC LIMIT 1), 1, 0, 65, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bazu Bellow' ORDER BY id DESC LIMIT 1), 1, 0, 69, 80, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Mock' ORDER BY id DESC LIMIT 1), 1, 0, 70, 74, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Scowl Rk. II' ORDER BY id DESC LIMIT 1), 1, 0, 75, 79, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sneer Rk. II' ORDER BY id DESC LIMIT 1), 1, 0, 80, 84, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bazu Bluster Rk. II' ORDER BY id DESC LIMIT 1), 1, 0, 81, 85, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 1 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Jeer Rk. II' ORDER BY id DESC LIMIT 1), 1, 0, 85, 89, 2, 0 );
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Minor Healing' ORDER BY id DESC LIMIT 1), 2, 0, 1, 3, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Courage' ORDER BY id DESC LIMIT 1), 8, 0, 1, 6, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Cure Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 1, 21, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Light Healing' ORDER BY id DESC LIMIT 1), 2, 0, 4, 9, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Cure Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 4, 27, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Center' ORDER BY id DESC LIMIT 1), 8, 0, 7, 21, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Minor Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 8, 22, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Healing' ORDER BY id DESC LIMIT 1), 2, 0, 10, 19, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Transal' ORDER BY id DESC LIMIT 1), 8, 0, 11, 20, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reanimation' ORDER BY id DESC LIMIT 1), 65536, 0, 12, 17, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Piety' ORDER BY id DESC LIMIT 1), 8, 0, 15, 34, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Daring' ORDER BY id DESC LIMIT 1), 8, 0, 17, 20, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reconstitution' ORDER BY id DESC LIMIT 1), 65536, 0, 18, 21, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 19, 28, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Greater Healing' ORDER BY id DESC LIMIT 1), 2, 0, 20, 29, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ward of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 20, 39, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Ryltan' ORDER BY id DESC LIMIT 1), 8, 0, 21, 30, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bravery' ORDER BY id DESC LIMIT 1), 8, 0, 22, 31, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Counteract Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 22, 47, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reparation' ORDER BY id DESC LIMIT 1), 65536, 0, 22, 26, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Lesser Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 23, 37, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Revive' ORDER BY id DESC LIMIT 1), 65536, 0, 27, 31, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Counteract Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 28, 50, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Health' ORDER BY id DESC LIMIT 1), 2, 0, 29, 43, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Health' ORDER BY id DESC LIMIT 1), 2, 0, 30, 44, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Superior Healing' ORDER BY id DESC LIMIT 1), 2, 0, 30, 52, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Pinzarn' ORDER BY id DESC LIMIT 1), 8, 0, 31, 40, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Valor' ORDER BY id DESC LIMIT 1), 8, 0, 32, 39, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Renewal' ORDER BY id DESC LIMIT 1), 65536, 0, 32, 36, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Faith' ORDER BY id DESC LIMIT 1), 8, 0, 35, 61, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Resuscitate' ORDER BY id DESC LIMIT 1), 65536, 0, 37, 41, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 38, 53, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Complete Healing' ORDER BY id DESC LIMIT 1), 2, 0, 39, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 40, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Guard of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 40, 53, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Naltron' ORDER BY id DESC LIMIT 1), 8, 0, 41, 53, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Restoration' ORDER BY id DESC LIMIT 1), 65536, 0, 42, 46, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Healing' ORDER BY id DESC LIMIT 1), 2, 0, 44, 58, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Healing' ORDER BY id DESC LIMIT 1), 2, 0, 45, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 45, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Resurrection' ORDER BY id DESC LIMIT 1), 65536, 0, 47, 255, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Abolish Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 48, 57, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 51, 58, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pure Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 51, 83, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Vigor' ORDER BY id DESC LIMIT 1), 2, 0, 52, 56, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Divine Light' ORDER BY id DESC LIMIT 1), 2, 0, 53, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Marzin' ORDER BY id DESC LIMIT 1), 8, 0, 54, 60, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Protection of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 54, 61, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Greater Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 54, 93, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 57, 63, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Naltron\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 58, 59, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ethereal Light' ORDER BY id DESC LIMIT 1), 2, 0, 58, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Antidote' ORDER BY id DESC LIMIT 1), 32768, 0, 58, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 59, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ethereal Remedy' ORDER BY id DESC LIMIT 1), 8, 0, 59, 60, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Marzin\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 60, 62, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ancient: Gift of Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ethereal Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 60, 64, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Redemption' ORDER BY id DESC LIMIT 1), 2, 0, 60, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Supernal Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 61, 65, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Kazad' ORDER BY id DESC LIMIT 1), 2, 0, 61, 65, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Supernal Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 62, 64, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Virtue' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Reverence' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bulwark of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Kazad`s Mark' ORDER BY id DESC LIMIT 1), 2, 0, 63, 69, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Supernal Light' ORDER BY id DESC LIMIT 1), 2, 0, 63, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Replenishment' ORDER BY id DESC LIMIT 1), 2, 0, 64, 68, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Reverence' ORDER BY id DESC LIMIT 1), 8, 0, 64, 66, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Virtue' ORDER BY id DESC LIMIT 1), 8, 0, 65, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Holy Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 65, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Holy Light' ORDER BY id DESC LIMIT 1), 2, 0, 65, 67, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Balikor' ORDER BY id DESC LIMIT 1), 2, 0, 66, 71, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pious Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 66, 255, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Conviction' ORDER BY id DESC LIMIT 1), 8, 0, 67, 71, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pious Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 67, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Devotion' ORDER BY id DESC LIMIT 1), 8, 0, 67, 70, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Panoply of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 67, 72, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pious Light' ORDER BY id DESC LIMIT 1), 2, 0, 68, 72, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Devotion' ORDER BY id DESC LIMIT 1), 8, 0, 69, 255, 7, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Vivification' ORDER BY id DESC LIMIT 1), 2, 0, 69, 79, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Conviction' ORDER BY id DESC LIMIT 1), 8, 0, 70, 71, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Balikor\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 70, 74, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elixir of Divinity' ORDER BY id DESC LIMIT 1), 2, 0, 70, 74, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Elushar' ORDER BY id DESC LIMIT 1), 8, 0, 71, 75, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sacred Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 71, 75, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Purpose' ORDER BY id DESC LIMIT 1), 8, 0, 71, 0, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Tenacity' ORDER BY id DESC LIMIT 1), 8, 0, 72, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sacred Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 72, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Purpose' ORDER BY id DESC LIMIT 1), 8, 0, 72, 75, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sacred Light' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Renewal' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aegis of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 73, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Expunge Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 74, 78, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Tenacity' ORDER BY id DESC LIMIT 1), 8, 0, 75, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elushar\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 75, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elixir of Redemption' ORDER BY id DESC LIMIT 1), 2, 0, 75, 79, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Rallied Aegis of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 75, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Solemn Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 76, 80, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Kaerra' ORDER BY id DESC LIMIT 1), 8, 0, 76, 80, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Resolve' ORDER BY id DESC LIMIT 1), 8, 0, 76, 80, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Temerity' ORDER BY id DESC LIMIT 1), 8, 0, 77, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Solemn Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 77, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Eleventh-Hour' ORDER BY id DESC LIMIT 1), 2, 0, 77, 81, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Resolve' ORDER BY id DESC LIMIT 1), 8, 0, 77, 80, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Solemn Light' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Shield of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 78, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Vitiate Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 79, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Temerity' ORDER BY id DESC LIMIT 1), 8, 0, 80, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Kaerra\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elixir of Atonement' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Frantic Renewal' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Rallied Shield of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 80, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Darianna' ORDER BY id DESC LIMIT 1), 8, 0, 81, 85, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Devout Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 81, 85, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Loyalty' ORDER BY id DESC LIMIT 1), 8, 0, 81, 85, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Gallantry' ORDER BY id DESC LIMIT 1), 8, 0, 82, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Devout Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 82, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Twelfth Night' ORDER BY id DESC LIMIT 1), 2, 0, 82, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aura of Loyalty' ORDER BY id DESC LIMIT 1), 8, 0, 82, 85, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Devout Light' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Recuperation' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Palladium of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 83, 87, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Abolish Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Purified Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 88, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Gallantry' ORDER BY id DESC LIMIT 1), 8, 0, 85, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Darianna\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Frenetic Renewal' ORDER BY id DESC LIMIT 1), 2, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Rallied Palladium of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 85, 87, 4, 0);
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Minor Healing' ORDER BY id DESC LIMIT 1), 2, 0, 1, 3, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Courage' ORDER BY id DESC LIMIT 1), 8, 0, 1, 6, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Cure Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 1, 21, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Light Healing' ORDER BY id DESC LIMIT 1), 2, 0, 4, 9, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Cure Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 4, 27, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Center' ORDER BY id DESC LIMIT 1), 8, 0, 7, 21, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Minor Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 8, 22, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Healing' ORDER BY id DESC LIMIT 1), 2, 0, 10, 19, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Transal' ORDER BY id DESC LIMIT 1), 8, 0, 11, 20, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reanimation' ORDER BY id DESC LIMIT 1), 65536, 0, 12, 17, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Piety' ORDER BY id DESC LIMIT 1), 8, 0, 15, 34, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Daring' ORDER BY id DESC LIMIT 1), 8, 0, 17, 20, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reconstitution' ORDER BY id DESC LIMIT 1), 65536, 0, 18, 21, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 19, 28, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Greater Healing' ORDER BY id DESC LIMIT 1), 2, 0, 20, 29, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ward of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 20, 39, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Ryltan' ORDER BY id DESC LIMIT 1), 8, 0, 21, 30, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bravery' ORDER BY id DESC LIMIT 1), 8, 0, 22, 31, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Counteract Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 22, 47, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reparation' ORDER BY id DESC LIMIT 1), 65536, 0, 22, 26, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Lesser Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 23, 37, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Revive' ORDER BY id DESC LIMIT 1), 65536, 0, 27, 31, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Counteract Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 28, 50, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Health' ORDER BY id DESC LIMIT 1), 2, 0, 29, 43, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Health' ORDER BY id DESC LIMIT 1), 2, 0, 30, 44, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Superior Healing' ORDER BY id DESC LIMIT 1), 2, 0, 30, 52, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Pinzarn' ORDER BY id DESC LIMIT 1), 8, 0, 31, 40, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Valor' ORDER BY id DESC LIMIT 1), 8, 0, 32, 39, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Renewal' ORDER BY id DESC LIMIT 1), 65536, 0, 32, 36, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Faith' ORDER BY id DESC LIMIT 1), 8, 0, 35, 61, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Resuscitate' ORDER BY id DESC LIMIT 1), 65536, 0, 37, 41, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 38, 53, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Complete Healing' ORDER BY id DESC LIMIT 1), 2, 0, 39, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 40, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Guard of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 40, 53, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Naltron' ORDER BY id DESC LIMIT 1), 8, 0, 41, 53, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Restoration' ORDER BY id DESC LIMIT 1), 65536, 0, 42, 46, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Healing' ORDER BY id DESC LIMIT 1), 2, 0, 44, 58, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Healing' ORDER BY id DESC LIMIT 1), 2, 0, 45, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 45, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Resurrection' ORDER BY id DESC LIMIT 1), 65536, 0, 47, 55, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Abolish Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 48, 57, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 51, 58, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pure Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 51, 83, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Vigor' ORDER BY id DESC LIMIT 1), 2, 0, 52, 56, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Divine Light' ORDER BY id DESC LIMIT 1), 2, 0, 53, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Marzin' ORDER BY id DESC LIMIT 1), 8, 0, 54, 60, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Protection of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 54, 61, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Greater Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 54, 93, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reviviscence' ORDER BY id DESC LIMIT 1), 65536, 0, 56, 255, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 57, 63, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Naltron\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 58, 59, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ethereal Light' ORDER BY id DESC LIMIT 1), 2, 0, 58, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Antidote' ORDER BY id DESC LIMIT 1), 32768, 0, 58, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 59, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ethereal Remedy' ORDER BY id DESC LIMIT 1), 8, 0, 59, 60, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Marzin\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 60, 62, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ancient: Gift of Aegolism' ORDER BY id DESC LIMIT 1), 8, 0, 60, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ethereal Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 60, 64, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Redemption' ORDER BY id DESC LIMIT 1), 2, 0, 60, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Supernal Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 61, 65, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Kazad' ORDER BY id DESC LIMIT 1), 2, 0, 61, 65, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Supernal Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 62, 64, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Virtue' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Reverence' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bulwark of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 62, 66, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Kazad`s Mark' ORDER BY id DESC LIMIT 1), 2, 0, 63, 69, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Supernal Light' ORDER BY id DESC LIMIT 1), 2, 0, 63, 64, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Replenishment' ORDER BY id DESC LIMIT 1), 2, 0, 64, 68, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Reverence' ORDER BY id DESC LIMIT 1), 8, 0, 64, 66, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Virtue' ORDER BY id DESC LIMIT 1), 8, 0, 65, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Holy Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 65, 66, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Holy Light' ORDER BY id DESC LIMIT 1), 2, 0, 65, 67, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Balikor' ORDER BY id DESC LIMIT 1), 2, 0, 66, 71, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pious Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 66, 255, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Conviction' ORDER BY id DESC LIMIT 1), 8, 0, 67, 71, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pious Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 67, 255, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Devotion' ORDER BY id DESC LIMIT 1), 8, 0, 67, 70, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Panoply of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 67, 72, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pious Light' ORDER BY id DESC LIMIT 1), 2, 0, 68, 69, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Devotion' ORDER BY id DESC LIMIT 1), 8, 0, 69, 255, 7, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Vivification' ORDER BY id DESC LIMIT 1), 2, 0, 69, 79, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Conviction' ORDER BY id DESC LIMIT 1), 8, 0, 70, 71, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Balikor\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 70, 74, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elixir of Divinity' ORDER BY id DESC LIMIT 1), 2, 0, 70, 74, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ancient: Hallowed Light' ORDER BY id DESC LIMIT 1), 2, 0, 70, 72, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Elushar Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 71, 75, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sacred Remedy Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 71, 75, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Purpose Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 71, 0, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Tenacity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 72, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sacred Elixir Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 72, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Purpose Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 72, 75, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sacred Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Renewal Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aegis of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 73, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Expunge Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 74, 78, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Tenacity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 75, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elushar\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 75, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elixir of Redemption Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 75, 79, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Rallied Aegis of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 75, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Solemn Remedy Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 76, 80, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Kaerra Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 76, 80, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Resolve Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 76, 80, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Temerity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 77, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Solemn Elixir Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 77, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Eleventh-Hour Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 77, 81, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Resolve Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 77, 80, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Solemn Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Restoration Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Shield of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 78, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Vitiate Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 79, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Temerity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 80, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Kaerra\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elixir of Atonement Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Frantic Renewal Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Rallied Shield of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 80, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Darianna Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 81, 85, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Devout Remedy Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 81, 85, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Loyalty Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 81, 85, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Gallantry Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 82, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Devout Elixir Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 82, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Twelfth Night Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 82, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aura of Loyalty Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 82, 85, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Devout Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Recuperation Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Palladium of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 83, 87, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Abolish Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Purified Blood Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 88, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Gallantry Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 85, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Darianna\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Frenetic Renewal Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Rallied Palladium of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 85, 87, 4, 0);
View File
@@ -0,0 +1,53 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Mercs:ResurrectRadius', '50', 'Determines the distance from which a healer merc will attempt to resurrect a corpse');
DROP TABLE IF EXISTS mercsbuffs;
DROP TABLE IF EXISTS mercs;
CREATE TABLE mercs (
MercID int(10) unsigned NOT NULL AUTO_INCREMENT,
OwnerCharacterID int(10) unsigned NOT NULL,
Slot tinyint(1) unsigned NOT NULL DEFAULT '0',
Name varchar(64) NOT NULL,
TemplateID int(10) unsigned NOT NULL DEFAULT '0',
SuspendedTime int(11) unsigned NOT NULL DEFAULT '0',
IsSuspended tinyint(1) unsigned NOT NULL default '0',
TimerRemaining int(11) unsigned NOT NULL DEFAULT '0',
Gender tinyint unsigned NOT NULL DEFAULT '0',
StanceID tinyint unsigned NOT NULL DEFAULT '0',
HP int(11) unsigned NOT NULL DEFAULT '0',
Mana int(11) unsigned NOT NULL DEFAULT '0',
Endurance int(11) unsigned NOT NULL DEFAULT '0',
Face int(10) unsigned NOT NULL DEFAULT '1',
LuclinHairStyle int(10) unsigned NOT NULL DEFAULT '1',
LuclinHairColor int(10) unsigned NOT NULL DEFAULT '1',
LuclinEyeColor int(10) unsigned NOT NULL DEFAULT '1',
LuclinEyeColor2 int(10) unsigned NOT NULL DEFAULT '1',
LuclinBeardColor int(10) unsigned NOT NULL DEFAULT '1',
LuclinBeard int(10) unsigned NOT NULL DEFAULT '0',
DrakkinHeritage int(10) unsigned NOT NULL DEFAULT '0',
DrakkinTattoo int(10) unsigned NOT NULL DEFAULT '0',
DrakkinDetails int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (MercID)
);
CREATE TABLE mercbuffs (
MercBuffId int(10) unsigned NOT NULL auto_increment,
MercId int(10) unsigned NOT NULL default '0',
SpellId int(10) unsigned NOT NULL default '0',
CasterLevel int(10) unsigned NOT NULL default '0',
DurationFormula int(10) unsigned NOT NULL default '0',
TicsRemaining int(11) unsigned NOT NULL default '0',
PoisonCounters int(11) unsigned NOT NULL default '0',
DiseaseCounters int(11) unsigned NOT NULL default '0',
CurseCounters int(11) unsigned NOT NULL default '0',
CorruptionCounters int(11) unsigned NOT NULL default '0',
HitCount int(10) unsigned NOT NULL default '0',
MeleeRune int(10) unsigned NOT NULL default '0',
MagicRune int(10) unsigned NOT NULL default '0',
DeathSaveSuccessChance int(10) unsigned NOT NULL default '0',
CasterAARank int(10) unsigned NOT NULL default '0',
Persistent tinyint(1) NOT NULL default '0',
PRIMARY KEY (MercBuffId),
KEY FK_mercbuff_1 (MercId),
CONSTRAINT FK_mercbuff_1 FOREIGN KEY (MercId) REFERENCES mercs (MercID)
);
+48 -1
View File
@@ -81,7 +81,7 @@ create table merc_spell_list_entries
merc_spell_list_entry_id int UNSIGNED NOT NULL AUTO_INCREMENT,
merc_spell_list_id int UNSIGNED NOT NULL,
spell_id int UNSIGNED NOT NULL,
spell_type tinyint UNSIGNED NOT NULL default '0',
spell_type int UNSIGNED NOT NULL default '0',
stance_id tinyint UNSIGNED NOT NULL default '0',
minlevel tinyint UNSIGNED NOT NULL default '1',
maxlevel tinyint UNSIGNED NOT NULL default '255',
@@ -3707,38 +3707,57 @@ REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type,
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Minor Healing' ORDER BY id DESC LIMIT 1), 2, 0, 1, 3, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Courage' ORDER BY id DESC LIMIT 1), 8, 0, 1, 6, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Cure Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 1, 21, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Light Healing' ORDER BY id DESC LIMIT 1), 2, 0, 4, 9, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Cure Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 4, 27, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Center' ORDER BY id DESC LIMIT 1), 8, 0, 7, 21, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Minor Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 8, 22, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Healing' ORDER BY id DESC LIMIT 1), 2, 0, 10, 19, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Transal' ORDER BY id DESC LIMIT 1), 8, 0, 11, 20, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reanimation' ORDER BY id DESC LIMIT 1), 65536, 0, 12, 17, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Piety' ORDER BY id DESC LIMIT 1), 8, 0, 15, 34, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Daring' ORDER BY id DESC LIMIT 1), 8, 0, 17, 20, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reconstitution' ORDER BY id DESC LIMIT 1), 65536, 0, 18, 21, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 19, 28, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Greater Healing' ORDER BY id DESC LIMIT 1), 2, 0, 20, 29, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ward of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 20, 39, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Ryltan' ORDER BY id DESC LIMIT 1), 8, 0, 21, 30, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Bravery' ORDER BY id DESC LIMIT 1), 8, 0, 22, 31, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Counteract Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 22, 47, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Reparation' ORDER BY id DESC LIMIT 1), 65536, 0, 22, 26, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Lesser Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 23, 37, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Revive' ORDER BY id DESC LIMIT 1), 65536, 0, 27, 31, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Counteract Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 28, 50, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Health' ORDER BY id DESC LIMIT 1), 2, 0, 29, 43, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Health' ORDER BY id DESC LIMIT 1), 2, 0, 30, 44, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Superior Healing' ORDER BY id DESC LIMIT 1), 2, 0, 30, 52, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Pinzarn' ORDER BY id DESC LIMIT 1), 8, 0, 31, 40, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Valor' ORDER BY id DESC LIMIT 1), 8, 0, 32, 39, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Renewal' ORDER BY id DESC LIMIT 1), 65536, 0, 32, 36, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Faith' ORDER BY id DESC LIMIT 1), 8, 0, 35, 61, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Resuscitate' ORDER BY id DESC LIMIT 1), 65536, 0, 37, 41, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 38, 53, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Complete Healing' ORDER BY id DESC LIMIT 1), 2, 0, 39, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 40, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Guard of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 40, 53, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Naltron' ORDER BY id DESC LIMIT 1), 8, 0, 41, 53, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Restoration' ORDER BY id DESC LIMIT 1), 65536, 0, 42, 46, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Healing' ORDER BY id DESC LIMIT 1), 2, 0, 44, 58, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Healing' ORDER BY id DESC LIMIT 1), 2, 0, 45, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Blessing of Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 45, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Resurrection' ORDER BY id DESC LIMIT 1), 65536, 0, 47, 255, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Abolish Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 48, 57, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 51, 58, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Pure Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 51, 83, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Vigor' ORDER BY id DESC LIMIT 1), 2, 0, 52, 56, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Divine Light' ORDER BY id DESC LIMIT 1), 2, 0, 53, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Symbol of Marzin' ORDER BY id DESC LIMIT 1), 8, 0, 54, 60, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Protection of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 54, 61, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Remove Greater Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 54, 93, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Word of Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 57, 63, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Naltron\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 58, 59, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ethereal Light' ORDER BY id DESC LIMIT 1), 2, 0, 58, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Antidote' ORDER BY id DESC LIMIT 1), 32768, 0, 58, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Celestial Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 59, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Ethereal Remedy' ORDER BY id DESC LIMIT 1), 8, 0, 59, 60, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Marzin\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 60, 62, 6, 0 ),
@@ -3781,6 +3800,7 @@ REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type,
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Sacred Light' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Renewal' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Aegis of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 73, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Expunge Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 74, 78, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Tenacity' ORDER BY id DESC LIMIT 1), 8, 0, 75, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elushar\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 75, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elixir of Redemption' ORDER BY id DESC LIMIT 1), 2, 0, 75, 79, 1, 0),
@@ -3795,6 +3815,7 @@ REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type,
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Solemn Light' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Shield of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 78, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Vitiate Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 79, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Temerity' ORDER BY id DESC LIMIT 1), 8, 0, 80, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Kaerra\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Elixir of Atonement' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 1, 0),
@@ -3810,6 +3831,8 @@ REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type,
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Devout Light' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Promised Recuperation' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Palladium of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 83, 87, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Abolish Corruption' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Purified Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 88, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Hand of Gallantry' ORDER BY id DESC LIMIT 1), 8, 0, 85, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Darianna\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 1), (SELECT id FROM spells_new WHERE name = 'Frenetic Renewal' ORDER BY id DESC LIMIT 1), 2, 0, 85, 89, 2, 0),
@@ -3819,38 +3842,58 @@ REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type,
REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type, stance_id, minlevel, maxlevel, slot, procChance) VALUES
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Minor Healing' ORDER BY id DESC LIMIT 1), 2, 0, 1, 3, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Courage' ORDER BY id DESC LIMIT 1), 8, 0, 1, 6, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Cure Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 1, 21, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Light Healing' ORDER BY id DESC LIMIT 1), 2, 0, 4, 9, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Cure Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 4, 27, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Center' ORDER BY id DESC LIMIT 1), 8, 0, 7, 21, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Minor Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 8, 22, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Healing' ORDER BY id DESC LIMIT 1), 2, 0, 10, 19, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Transal' ORDER BY id DESC LIMIT 1), 8, 0, 11, 20, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reanimation' ORDER BY id DESC LIMIT 1), 65536, 0, 12, 17, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Piety' ORDER BY id DESC LIMIT 1), 8, 0, 15, 34, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Daring' ORDER BY id DESC LIMIT 1), 8, 0, 17, 20, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reconstitution' ORDER BY id DESC LIMIT 1), 65536, 0, 18, 21, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 19, 28, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Greater Healing' ORDER BY id DESC LIMIT 1), 2, 0, 20, 29, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ward of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 20, 39, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Ryltan' ORDER BY id DESC LIMIT 1), 8, 0, 21, 30, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Bravery' ORDER BY id DESC LIMIT 1), 8, 0, 22, 31, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Counteract Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 22, 47, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reparation' ORDER BY id DESC LIMIT 1), 65536, 0, 22, 26, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Lesser Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 23, 37, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Revive' ORDER BY id DESC LIMIT 1), 65536, 0, 27, 31, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Counteract Disease' ORDER BY id DESC LIMIT 1), 32768, 0, 28, 50, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Health' ORDER BY id DESC LIMIT 1), 2, 0, 29, 43, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Health' ORDER BY id DESC LIMIT 1), 2, 0, 30, 44, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Superior Healing' ORDER BY id DESC LIMIT 1), 2, 0, 30, 52, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Pinzarn' ORDER BY id DESC LIMIT 1), 8, 0, 31, 40, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Valor' ORDER BY id DESC LIMIT 1), 8, 0, 32, 39, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Renewal' ORDER BY id DESC LIMIT 1), 65536, 0, 32, 36, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Faith' ORDER BY id DESC LIMIT 1), 8, 0, 35, 61, 3, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Resuscitate' ORDER BY id DESC LIMIT 1), 65536, 0, 37, 41, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 38, 53, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Complete Healing' ORDER BY id DESC LIMIT 1), 2, 0, 39, 75, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 40, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Guard of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 40, 53, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Naltron' ORDER BY id DESC LIMIT 1), 8, 0, 41, 53, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Restoration' ORDER BY id DESC LIMIT 1), 65536, 0, 42, 46, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Healing' ORDER BY id DESC LIMIT 1), 2, 0, 44, 58, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Healing' ORDER BY id DESC LIMIT 1), 2, 0, 45, 51, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Blessing of Temperance' ORDER BY id DESC LIMIT 1), 8, 0, 45, 59, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Resurrection' ORDER BY id DESC LIMIT 1), 65536, 0, 47, 55, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Abolish Poison' ORDER BY id DESC LIMIT 1), 32768, 0, 48, 57, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remedy' ORDER BY id DESC LIMIT 1), 2, 0, 51, 58, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Pure Blood' ORDER BY id DESC LIMIT 1), 32768, 0, 51, 83, 3, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Vigor' ORDER BY id DESC LIMIT 1), 2, 0, 52, 56, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Divine Light' ORDER BY id DESC LIMIT 1), 2, 0, 53, 57, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Symbol of Marzin' ORDER BY id DESC LIMIT 1), 8, 0, 54, 60, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Protection of Vie' ORDER BY id DESC LIMIT 1), 8, 0, 54, 61, 4, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Remove Greater Curse' ORDER BY id DESC LIMIT 1), 32768, 0, 54, 93, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Reviviscence' ORDER BY id DESC LIMIT 1), 65536, 0, 56, 255, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Word of Restoration' ORDER BY id DESC LIMIT 1), 2, 0, 57, 63, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Naltron\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 58, 59, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ethereal Light' ORDER BY id DESC LIMIT 1), 2, 0, 58, 62, 2, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Antidote' ORDER BY id DESC LIMIT 1), 32768, 0, 58, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Celestial Elixir' ORDER BY id DESC LIMIT 1), 2, 0, 59, 61, 1, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Ethereal Remedy' ORDER BY id DESC LIMIT 1), 8, 0, 59, 60, 6, 0 ),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Marzin\'s Mark' ORDER BY id DESC LIMIT 1), 8, 0, 60, 62, 6, 0 ),
@@ -3894,6 +3937,7 @@ REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type,
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Sacred Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Renewal Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 73, 77, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Aegis of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 73, 77, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Expunge Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 74, 78, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Tenacity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 75, 76, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elushar\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 75, 79, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elixir of Redemption Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 75, 79, 1, 0),
@@ -3908,6 +3952,7 @@ REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type,
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Solemn Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Restoration Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 78, 82, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Shield of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 78, 82, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Vitiate Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 79, 83, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Temerity Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 80, 81, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Kaerra\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 80, 84, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Elixir of Atonement Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 80, 84, 1, 0),
@@ -3923,6 +3968,8 @@ REPLACE INTO merc_spell_list_entries (merc_spell_list_id, spell_id, spell_type,
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Devout Light Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Promised Recuperation Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 83, 87, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Palladium of Vie Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 83, 87, 4, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Abolish Corruption Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 86, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Purified Blood Rk. II' ORDER BY id DESC LIMIT 1), 32768, 0, 84, 88, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Hand of Gallantry Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 85, 86, 1, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Darianna\'s Mark Rk. II' ORDER BY id DESC LIMIT 1), 8, 0, 85, 89, 2, 0),
((SELECT merc_spell_list_id FROM merc_spell_lists WHERE class_id = 2 AND proficiency_id = 2), (SELECT id FROM spells_new WHERE name = 'Frenetic Renewal Rk. II' ORDER BY id DESC LIMIT 1), 2, 0, 85, 89, 2, 0),
-1
View File
@@ -447,7 +447,6 @@ void EQW::ResolveBug(const char *id) {
vector<string> res;
char errbuf[MYSQL_ERRMSG_SIZE];
char* query = 0;
MYSQL_ROW row;
if(database.RunQuery(query, MakeAnyLenString(&query, "UPDATE bugs SET status=1 WHERE id=%s", id), errbuf)) {
safe_delete_array(query);
}
+2 -2
View File
@@ -268,7 +268,7 @@ void LoginServer::SendInfo() {
memset(pack->pBuffer, 0, pack->size);
ServerLSInfo_Struct* lsi = (ServerLSInfo_Struct*) pack->pBuffer;
strcpy(lsi->protocolversion, EQEMU_PROTOCOL_VERSION);
strcpy(lsi->serverversion, CURRENT_VERSION);
strcpy(lsi->serverversion, LOGIN_VERSION);
strcpy(lsi->name, Config->LongName.c_str());
strcpy(lsi->account, LoginAccount);
strcpy(lsi->password, LoginPassword);
@@ -288,7 +288,7 @@ void LoginServer::SendNewInfo() {
memset(pack->pBuffer, 0, pack->size);
ServerNewLSInfo_Struct* lsi = (ServerNewLSInfo_Struct*) pack->pBuffer;
strcpy(lsi->protocolversion, EQEMU_PROTOCOL_VERSION);
strcpy(lsi->serverversion, CURRENT_VERSION);
strcpy(lsi->serverversion, LOGIN_VERSION);
strcpy(lsi->name, Config->LongName.c_str());
strcpy(lsi->shortname, Config->ShortName.c_str());
strcpy(lsi->account, LoginAccount);
+10 -29
View File
@@ -58,6 +58,7 @@ using namespace std;
#include "wguild_mgr.h"
#include "../common/rulesys.h"
#include "SoFCharCreateData.h"
#include "../common/clientversions.h"
std::vector<RaceClassAllocation> character_create_allocations;
std::vector<RaceClassCombos> character_create_race_class_combos;
@@ -93,32 +94,7 @@ Client::Client(EQStreamInterface* ieqs)
ClientVersionBit = 0;
numclients++;
string StreamDescription = eqs->Describe();
if(StreamDescription == "Patch Titanium")
{
ClientVersionBit = BIT_Titanium;
}
else if(StreamDescription == "Patch 6.2")
{
ClientVersionBit = BIT_Client62;
}
else if(StreamDescription == "Patch SoF")
{
ClientVersionBit = BIT_SoF;
}
else if(StreamDescription == "Patch SoD")
{
ClientVersionBit = BIT_SoD;
}
else if(StreamDescription == "Patch Underfoot")
{
ClientVersionBit = BIT_Underfoot;
}
else if(StreamDescription == "Patch RoF")
{
ClientVersionBit = BIT_RoF;
}
ClientVersionBit = 1 << (eqs->ClientVersion() - 1);
}
Client::~Client() {
@@ -1482,11 +1458,16 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
clog(WORLD__CLIENT_ERR,"Error getting zone id for '%s'", startzone);
}
else // otherwise use normal starting zone logic
{
{
bool ValidStartZone = false;
if(ClientVersionBit & BIT_TitaniumAndEarlier)
database.GetStartZone(&pp, cc);
ValidStartZone = database.GetStartZone(&pp, cc);
else
database.GetStartZoneSoF(&pp, cc);
ValidStartZone = database.GetStartZoneSoF(&pp, cc);
if(!ValidStartZone)
return false;
}
}
+1 -1
View File
@@ -749,7 +749,7 @@ void Console::ProcessCommand(const char* command) {
}
else if (strcasecmp(sep.arg[0], "version") == 0 && admin >= consoleWorldStatus) {
SendMessage(1, "Current version information.");
SendMessage(1, " %s", CURRENT_WORLD_VERSION);
SendMessage(1, " %s", CURRENT_VERSION);
SendMessage(1, " Compiled on: %s at %s", COMPILE_DATE, COMPILE_TIME);
SendMessage(1, " Last modified on: %s", LAST_MODIFIED);
}
+1 -1
View File
@@ -144,7 +144,7 @@ int main(int argc, char** argv) {
_log(WORLD__INIT, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
_log(WORLD__INIT, "CURRENT_WORLD_VERSION:%s", CURRENT_WORLD_VERSION);
_log(WORLD__INIT, "CURRENT_VERSION: %s", CURRENT_VERSION);
#ifdef _DEBUG
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+16 -27
View File
@@ -293,23 +293,18 @@ bool WorldDatabase::GetStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct*
in_pp->x = in_pp->y = in_pp->z = in_pp->heading = in_pp->zone_id = 0;
in_pp->binds[0].x = in_pp->binds[0].y = in_pp->binds[0].z = in_pp->binds[0].zoneId = 0;
RunQuery
(
query,
MakeAnyLenString
(
&query,
"SELECT x,y,z,heading,zone_id,bind_id FROM start_zones "
"WHERE player_choice=%i AND player_class=%i "
if(!RunQuery(query, MakeAnyLenString(&query, "SELECT x,y,z,heading,zone_id,bind_id FROM start_zones WHERE player_choice=%i AND player_class=%i "
"AND player_deity=%i AND player_race=%i",
in_cc->start_zone,
in_cc->class_,
in_cc->deity,
in_cc->race
),
errbuf,
&result
);
in_cc->race), errbuf, &result))
{
LogFile->write(EQEMuLog::Error, "Start zone query failed: %s : %s\n", query, errbuf);
safe_delete_array(query);
return false;
}
LogFile->write(EQEMuLog::Status, "Start zone query: %s\n", query);
safe_delete_array(query);
@@ -450,25 +445,19 @@ bool WorldDatabase::GetStartZoneSoF(PlayerProfile_Struct* in_pp, CharCreate_Stru
in_pp->x = in_pp->y = in_pp->z = in_pp->heading = in_pp->zone_id = 0;
in_pp->binds[0].x = in_pp->binds[0].y = in_pp->binds[0].z = in_pp->binds[0].zoneId = 0;
RunQuery
(
query,
MakeAnyLenString
(
&query,
"SELECT x,y,z,heading,bind_id FROM start_zones "
"WHERE zone_id=%i AND player_class=%i "
if(!RunQuery(query, MakeAnyLenString(&query, "SELECT x,y,z,heading,bind_id FROM start_zones WHERE zone_id=%i AND player_class=%i "
"AND player_deity=%i AND player_race=%i",
in_cc->start_zone,
in_cc->class_,
in_cc->deity,
in_cc->race
),
errbuf,
&result
);
in_cc->race), errbuf, &result))
{
LogFile->write(EQEMuLog::Status, "SoF Start zone query failed: %s : %s\n", query, errbuf);
safe_delete_array(query);
return false;
}
LogFile->write(EQEMuLog::Status, "SoF Start zone query: %s\n", query);
_log(WORLD__CLIENT_TRACE, "SoF Start zone query: %s\n", query);
safe_delete_array(query);
if((rows = mysql_num_rows(result)) > 0)
+3 -2
View File
@@ -1347,7 +1347,8 @@ void Client::SendAA(uint32 id, int seq) {
if(value > 0)
{
const AA_DBAction *caa = &AA_Actions[saa->id][value - 1];
// AA_Action stores the base ID
const AA_DBAction *caa = &AA_Actions[saa->id - value + 1][value - 1];
if(caa && caa->reuse_time > 0)
saa->spell_refresh = CalcAAReuseTimer(caa);
@@ -1965,4 +1966,4 @@ AA_SwarmPetInfo::~AA_SwarmPetInfo()
Mob *AA_SwarmPetInfo::GetOwner()
{
return entity_list.GetMobID(owner_id);
}
}
+33 -23
View File
@@ -15,6 +15,7 @@ extern Zone* zone;
QuestParserCollection::QuestParserCollection() {
_player_quest_status = QuestUnloaded;
_global_player_quest_status = QuestUnloaded;
_global_npc_quest_status = QuestUnloaded;
}
QuestParserCollection::~QuestParserCollection() {
@@ -50,31 +51,41 @@ void QuestParserCollection::ReloadQuests(bool reset_timers) {
bool QuestParserCollection::HasQuestSub(uint32 npcid, const char *subname) {
std::map<uint32, uint32>::iterator iter = _npc_quest_status.find(npcid);
if(_global_npc_quest_status == QuestUnloaded){
QuestInterface *qi = GetQIByGlobalNPCQuest();
if(qi) {
_global_npc_quest_status = qi->GetIdentifier();
return qi->HasGlobalQuestSub(subname);
}
}
if(iter != _npc_quest_status.end()) {
//loaded or failed to load
if(iter->second != QuestFailedToLoad) {
std::map<uint32, QuestInterface*>::iterator qiter = _interfaces.find(iter->second);
return qiter->second->HasQuestSub(npcid, subname) || qiter->second->HasGlobalQuestSub(subname);
if(qiter->second->HasQuestSub(npcid, subname)) {
return true;
}
}
} else {
QuestInterface *qi = GetQIByNPCQuest(npcid);
if(qi) {
_npc_quest_status[npcid] = qi->GetIdentifier();
if(qi->HasQuestSub(npcid, subname)) {
return true;
}
} else {
_npc_quest_status[npcid] = QuestFailedToLoad;
}
}
if(_global_npc_quest_status == QuestUnloaded){
QuestInterface *qi = GetQIByGlobalNPCQuest();
if(qi) {
_global_npc_quest_status = qi->GetIdentifier();
if(qi->HasGlobalQuestSub(subname)) {
return true;
}
}
qi = GetQIByNPCQuest(npcid);
if(qi) {
_npc_quest_status[npcid] = qi->GetIdentifier();
return qi->HasQuestSub(npcid, subname) || qi->HasGlobalQuestSub(subname);
} else {
_npc_quest_status[npcid] = QuestFailedToLoad;
} else {
if(_global_npc_quest_status != QuestFailedToLoad) {
std::map<uint32, QuestInterface*>::iterator qiter = _interfaces.find(_global_npc_quest_status);
if(qiter->second->HasGlobalQuestSub(subname)) {
return true;
}
}
}
return false;
@@ -168,17 +179,16 @@ void QuestParserCollection::EventNPC(QuestEventID evt, NPC* npc, Mob *init, std:
}
// K, lets also parse templates/global_npc.pl
if(_global_npc_quest_status != QuestUnloaded) {
QuestInterface *qi = GetQIByGlobalNPCQuest();
if(_global_npc_quest_status != QuestUnloaded && _global_npc_quest_status != QuestFailedToLoad) {
std::map<uint32, QuestInterface*>::iterator qiter = _interfaces.find(_global_npc_quest_status);
qiter->second->EventGlobalNPC(evt, npc, init, data, extra_data);
} else {
QuestInterface *qi = GetQIByGlobalNPCQuest();
if(qi) {
_global_npc_quest_status = qi->GetIdentifier();
qi->EventGlobalNPC(evt, npc, init, data, extra_data);
}
} else {
if(_global_npc_quest_status != QuestFailedToLoad) {
std::map<uint32, QuestInterface*>::iterator iter = _interfaces.find(_global_npc_quest_status);
if(iter != _interfaces.end())
iter->second->EventGlobalNPC(evt, npc, init, data, extra_data);
} else {
_global_npc_quest_status = QuestFailedToLoad;
}
}
}
+9
View File
@@ -1422,6 +1422,15 @@ void Mob::RemoveFromFeignMemory(Client* attacker) {
}
void Mob::ClearFeignMemory() {
std::set<uint32>::iterator RememberedCharID = feign_memory_list.begin();
while (RememberedCharID != feign_memory_list.end())
{
Client* remember_client = entity_list.GetClientByCharID(*RememberedCharID);
if(remember_client != NULL) //Still in zone
remember_client->RemoveXTarget(this, false);
++RememberedCharID;
}
feign_memory_list.clear();
minLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMin);
maxLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMax);
+7 -6
View File
@@ -1445,6 +1445,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
SetHorseId(0);
dead = true;
parse->EventPlayer(EVENT_DEATH, this, "", 0);
if (killerMob != NULL)
{
@@ -3318,7 +3319,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
int32 origdmg = damage;
damage = AffectMagicalDamage(damage, spell_id, iBuffTic, attacker);
if (origdmg != damage && attacker && attacker->IsClient()) {
if(attacker->CastToClient()->GetFilter(FILTER_DAMAGESHIELD) != FilterHide)
if(attacker->CastToClient()->GetFilter(FilterDamageShields) != FilterHide)
attacker->Message(15, "The Spellshield absorbed %d of %d points of damage", origdmg - damage, origdmg);
}
if (damage == 0 && attacker && origdmg != damage && IsClient()) {
@@ -3505,11 +3506,11 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
if(spell_id != SPELL_UNKNOWN)
filter = iBuffTic ? FilterDOT : FilterSpellDamage;
else
filter = FILTER_MYPETHITS;
filter = FilterPetHits;
} else if(damage == -5)
filter = FilterNone; //cant filter invulnerable
else
filter = FILTER_MYPETMISSES;
filter = FilterPetMisses;
if(!FromDamageShield)
owner->CastToClient()->QueuePacket(outapp,true,CLIENT_CONNECTED,filter);
@@ -3542,7 +3543,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
} else if(damage == -5)
filter = FilterNone; //cant filter invulnerable
else
filter = FILTER_MYMISSES;
filter = FilterMyMisses;
attacker->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
}
@@ -3555,11 +3556,11 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
if(spell_id != SPELL_UNKNOWN)
filter = iBuffTic ? FilterDOT : FilterSpellDamage;
else
filter = FILTER_OTHERHITS;
filter = FilterOthersHit;
} else if(damage == -5)
filter = FilterNone; //cant filter invulnerable
else
filter = FILTER_OTHERMISSES;
filter = FilterOthersMiss;
//make attacker (the attacker) send the packet so we can skip them and the owner
//this call will send the packet to `this` as well (using the wrong filter) (will not happen until PC charm works)
//LogFile->write(EQEMuLog::Debug, "Queue damage to all except %s with filter %d (%d), type %d", skip->GetName(), filter, IsClient()?CastToClient()->GetFilter(filter):-1, a->type);
+49 -32
View File
@@ -258,6 +258,8 @@ Client::Client(EQStreamInterface* ieqs)
keyring.clear();
bind_sight_target = NULL;
mercid = 0;
mercSlot = 0;
InitializeMercInfo();
SetMerc(0);
logging_enabled = CLIENT_DEFAULT_LOGGING_ENABLED;
@@ -557,12 +559,17 @@ bool Client::Save(uint8 iCommitNow) {
m_pp.timePlayedMin = (TotalSecondsPlayed / 60);
m_pp.RestTimer = rest_timer.GetRemainingTime() / 1000;
if(GetEPP().mercTimerRemaining > RuleI(Mercs, UpkeepIntervalMS))
GetEPP().mercTimerRemaining = RuleI(Mercs, UpkeepIntervalMS);
if(GetMercInfo().MercTimerRemaining > RuleI(Mercs, UpkeepIntervalMS))
GetMercInfo().MercTimerRemaining = RuleI(Mercs, UpkeepIntervalMS);
if(merc_timer.Enabled())
{
GetEPP().mercTimerRemaining = merc_timer.GetRemainingTime();
if(merc_timer.Enabled()) {
GetMercInfo().MercTimerRemaining = merc_timer.GetRemainingTime();
}
if (GetMerc() && !dead) {
} else {
memset(&m_mercinfo, 0, sizeof(struct MercInfo));
}
m_pp.lastlogin = time(NULL);
@@ -751,7 +758,11 @@ void Client::FastQueuePacket(EQApplicationPacket** app, bool ack_req, CLIENT_CON
return;
}
void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* message, const char* targetname) {
void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* orig_message, const char* targetname) {
char message[4096];
strn0cpy(message, orig_message, sizeof(message));
#if EQDEBUG >= 11
LogFile->write(EQEMuLog::Debug,"Client::ChannelMessageReceived() Channel:%i message:'%s'", chan_num, message);
#endif
@@ -806,8 +817,8 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
}
if(RuleB(QueryServ, PlayerChatLogging)){
ServerPacket* pack = new ServerPacket(ServerOP_Speech, sizeof(Server_Speech_Struct)+strlen(message)+1);
if(RuleB(QueryServ, PlayerChatLogging)) {
ServerPacket* pack = new ServerPacket(ServerOP_Speech, sizeof(Server_Speech_Struct) + strlen(message) + 1);
Server_Speech_Struct* sem = (Server_Speech_Struct*) pack->pBuffer;
if(chan_num == 0)
@@ -819,17 +830,23 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
sem->minstatus = this->Admin();
sem->type = chan_num;
if(targetname != 0)
strcpy(sem->to,targetname);
strcpy(sem->to, targetname);
if(GetName() != 0)
strcpy(sem->from,GetName());
strcpy(sem->from, GetName());
pack->Deflate();
if(worldserver.Connected())
worldserver.SendPacket(pack);
safe_delete(pack);
}
// Garble the message based on drunkness
if (m_pp.intoxication > 0) {
GarbleMessage(message, (int)(m_pp.intoxication / 3));
language = 0; // No need for language when drunk
}
switch(chan_num)
{
case 0: { // GuildChat
@@ -843,7 +860,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
}
case 2: { // GroupChat
Raid* raid = entity_list.GetRaidByClient(this);
if(raid){
if(raid) {
raid->RaidGroupSay((const char*) message, this);
break;
}
@@ -874,7 +891,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
{
if(!global_channel_timer.Check())
{
if(strlen(targetname)==0)
if(strlen(targetname) == 0)
ChannelMessageReceived(5, language, lang_skill, message, "discard"); //Fast typer or spammer??
else
return;
@@ -898,7 +915,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
if (!worldserver.SendChannelMessage(this, 0, 4, 0, language, message))
Message(0, "Error: World server disconnected");
}
else if(!RuleB(Chat, ServerWideAuction)){
else if(!RuleB(Chat, ServerWideAuction)) {
Mob *sender = this;
if (GetPet() && GetPet()->FindType(SE_VoiceGraft))
@@ -913,8 +930,8 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
{
if(!global_channel_timer.Check())
{
if(strlen(targetname)==0)
ChannelMessageReceived(5, language, lang_skill, message,"discard"); //Fast typer or spammer??
if(strlen(targetname) == 0)
ChannelMessageReceived(5, language, lang_skill, message, "discard"); //Fast typer or spammer??
else
return;
}
@@ -966,7 +983,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
case 7: { // Tell
if(!global_channel_timer.Check())
{
if(strlen(targetname)==0)
if(strlen(targetname) == 0)
ChannelMessageReceived(7, language, lang_skill, message, "discard"); //Fast typer or spammer??
else
return;
@@ -1013,12 +1030,12 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
}
case 8: { // /say
if(message[0] == COMMAND_CHAR) {
if(command_dispatch(this, message) == -2){
if(RuleB(Chat, FlowCommandstoPerl_EVENT_SAY)){
if(parse->PlayerHasQuestSub("EVENT_SAY")) {
if(command_dispatch(this, message) == -2) {
if(RuleB(Chat, FlowCommandstoPerl_EVENT_SAY)) {
if(parse->PlayerHasQuestSub("EVENT_SAY")) {
parse->EventPlayer(EVENT_SAY, this, message, language);
}
}else{
} else {
this->Message(13, "Command '%s' not recognized.", message);
}
}
@@ -1044,9 +1061,9 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
if (GetTarget() != 0 && GetTarget()->IsNPC()) {
if(!GetTarget()->CastToNPC()->IsEngaged()) {
CheckLDoNHail(GetTarget());
CheckEmoteHail(GetTarget(),message);
CheckEmoteHail(GetTarget(), message);
if(parse->HasQuestSub(GetTarget()->GetNPCTypeID(),"EVENT_SAY")){
if(parse->HasQuestSub(GetTarget()->GetNPCTypeID(), "EVENT_SAY")){
if (DistNoRootNoZ(*GetTarget()) <= 200) {
if(GetTarget()->CastToNPC()->IsMoving() && !GetTarget()->CastToNPC()->IsOnHatelist(GetTarget()))
GetTarget()->CastToNPC()->PauseWandering(RuleI(NPC, SayPauseTimeInSec));
@@ -1068,7 +1085,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
}
}
else {
if(parse->HasQuestSub(GetTarget()->GetNPCTypeID(),"EVENT_AGGRO_SAY")) {
if(parse->HasQuestSub(GetTarget()->GetNPCTypeID(), "EVENT_AGGRO_SAY")) {
if (DistNoRootNoZ(*GetTarget()) <= 200) {
parse->EventNPC(EVENT_AGGRO_SAY, GetTarget()->CastToNPC(), this, message, language);
}
@@ -1093,13 +1110,12 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
char *Buffer = (char *)es;
Buffer += 4;
snprintf(Buffer, sizeof(Emote_Struct) - 4, "%s %s", GetName(), message);
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FILTER_SOCIALS);
entity_list.QueueCloseClients(this, outapp, true, 100, 0, true, FilterSocials);
safe_delete(outapp);
break;
}
default: {
Message(0, "Channel (%i) not implemented",(uint16)chan_num);
Message(0, "Channel (%i) not implemented", (uint16)chan_num);
}
}
}
@@ -7127,7 +7143,7 @@ void Client::SendMercPersonalInfo()
{
MercenaryDataUpdate_Struct* mdus = new MercenaryDataUpdate_Struct;
MercTemplate *mercData = &zone->merc_templates[GetEPP().mercTemplateID];
MercTemplate *mercData = &zone->merc_templates[GetMercInfo().MercTemplateID];
if (mercData)
{
@@ -7146,13 +7162,13 @@ void Client::SendMercPersonalInfo()
mdus->MercData[i].AltCurrencyUpkeep = Merc::CalcPurchaseCost(mercData->MercTemplateID, GetLevel(), altCurrentType);
mdus->MercData[i].AltCurrencyType = altCurrentType;
mdus->MercData[i].MercUnk01 = 0;
mdus->MercData[i].TimeLeft = GetEPP().mercTimerRemaining; //GetMercTimer().GetRemainingTime();
mdus->MercData[i].TimeLeft = GetMercInfo().MercTimerRemaining; //GetMercTimer().GetRemainingTime();
mdus->MercData[i].MerchantSlot = i + 1;
mdus->MercData[i].MercUnk02 = 1;
mdus->MercData[i].StanceCount = zone->merc_stance_list[mercData->MercTemplateID].size();
mdus->MercData[i].MercUnk03 = 0;
mdus->MercData[i].MercUnk04 = 1;
strn0cpy(mdus->MercData[i].MercName, GetEPP().merc_name , sizeof(mdus->MercData[i].MercName));
strn0cpy(mdus->MercData[i].MercName, GetMercInfo().merc_name , sizeof(mdus->MercData[i].MercName));
uint32 stanceindex = 0;
if (mdus->MercData[i].StanceCount != 0)
{
@@ -7179,7 +7195,7 @@ void Client::SendMercPersonalInfo()
else
{
MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct;
MercTemplate *mercData = &zone->merc_templates[GetEPP().mercTemplateID];
MercTemplate *mercData = &zone->merc_templates[GetMercInfo().MercTemplateID];
if(mercData)
{
@@ -7202,7 +7218,7 @@ void Client::SendMercPersonalInfo()
mml->Mercs[i].AltCurrencyUpkeep = Merc::CalcPurchaseCost(mercData->MercTemplateID, GetLevel(), altCurrentType);
mml->Mercs[i].AltCurrencyType = altCurrentType;
mml->Mercs[i].MercUnk01 = 0;
mml->Mercs[i].TimeLeft = GetEPP().mercTimerRemaining;
mml->Mercs[i].TimeLeft = GetMercInfo().MercTimerRemaining;
mml->Mercs[i].MerchantSlot = i + 1;
mml->Mercs[i].MercUnk02 = 1;
mml->Mercs[i].StanceCount = zone->merc_stance_list[mercData->MercTemplateID].size();
@@ -7267,6 +7283,7 @@ void Client::DuplicateLoreMessage(uint32 ItemID)
void Client::GarbleMessage(char *message, uint8 variance)
{
// Garble message by variance%
const char alpha_list[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; // only change alpha characters for now
for (size_t i = 0; i < strlen(message); i++) {
+12 -14
View File
@@ -47,6 +47,7 @@ class Client;
#include <set>
#include <string>
#include "../common/item_struct.h"
#include "../common/clientversions.h"
#include "QGlobals.h"
#define CLIENT_TIMEOUT 90000
@@ -120,16 +121,6 @@ typedef enum {
MQGhost
} CheatTypes;
typedef enum {
EQClientUnknown = 0,
EQClient62,
EQClientTitanium,
EQClientSoF,
EQClientSoD,
EQClientUnderfoot,
EQClientRoF
} EQClientVersion;
enum {
HideCorpseNone = 0,
HideCorpseAll = 1,
@@ -265,7 +256,7 @@ public:
void SendPacketQueue(bool Block = true);
void QueuePacket(const EQApplicationPacket* app, bool ack_req = true, CLIENT_CONN_STATUS = CLIENT_CONNECTINGALL, eqFilterType filter=FilterNone);
void FastQueuePacket(EQApplicationPacket** app, bool ack_req = true, CLIENT_CONN_STATUS = CLIENT_CONNECTINGALL);
void ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* message, const char* targetname=NULL);
void ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* orig_message, const char* targetname=NULL);
void ChannelMessageSend(const char* from, const char* to, uint8 chan_num, uint8 language, const char* message, ...);
void ChannelMessageSend(const char* from, const char* to, uint8 chan_num, uint8 language, uint8 lang_skill, const char* message, ...);
void Message(uint32 type, const char* message, ...);
@@ -1104,9 +1095,15 @@ public:
void SendXTargetPacket(uint32 Slot, Mob *m);
void RemoveGroupXTargets();
void ShowXTargets(Client *c);
void InitializeMercInfo();
inline uint32 GetMercID() const { return mercid; }
inline uint8 GetMercSlot() const { return mercSlot; }
void SetMercID( uint32 newmercid) { mercid = newmercid; }
void SetMercSlot( uint8 newmercslot) { mercSlot = newmercslot; }
Merc* GetMerc();
MercInfo& GetMercInfo(uint8 slot) { return m_mercinfo[slot]; }
MercInfo& GetMercInfo() { return m_mercinfo[mercSlot]; }
uint8 GetNumMercs();
void SetMerc(Merc* newmerc);
void SendMercMerchantResponsePacket(int32 response_type);
void SendMercenaryUnknownPacket(uint8 type);
@@ -1118,7 +1115,7 @@ public:
void SendClearMercInfo();
void SuspendMercCommand();
void SpawnMercOnZone();
void SpawnMerc(Merc* merc);
void SpawnMerc(Merc* merc, bool setMaxStats);
void UpdateMercTimer();
void UpdateMercLevel();
void CheckMercSuspendTimer();
@@ -1266,7 +1263,8 @@ private:
uint16 CustomerID;
uint32 account_creation;
uint8 firstlogon;
uint32 mercid;
uint32 mercid; // current merc
uint8 mercSlot; // selected merc slot
bool Trader;
bool Buyer;
string BuyerWelcomeMessage;
@@ -1282,7 +1280,7 @@ private:
Object* m_tradeskill_object;
PetInfo m_petinfo; // current pet data, used while loading from and saving to DB
PetInfo m_suspendedminion; // pet data for our suspended minion.
MercInfo m_mercinfo; // current mercenary
MercInfo m_mercinfo[MAXMERCS]; // current mercenary
InspectMessage_Struct m_inspect_message;
void NPCSpawn(const Seperator* sep);
+15 -42
View File
@@ -517,38 +517,10 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
conn_state = ReceivedZoneEntry;
string StreamDescription = Connection()->Describe();
if(StreamDescription == "Patch Titanium")
{
ClientVersion = EQClientTitanium;
ClientVersionBit = BIT_Titanium;
}
else if(StreamDescription == "Patch 6.2")
{
ClientVersion = EQClient62;
ClientVersionBit = BIT_Client62;
}
else if(StreamDescription == "Patch SoF")
{
ClientVersion = EQClientSoF;
ClientVersionBit = BIT_SoF;
}
else if(StreamDescription == "Patch SoD")
{
ClientVersion = EQClientSoD;
ClientVersionBit = BIT_SoD;
}
else if(StreamDescription == "Patch Underfoot")
{
ClientVersion = EQClientUnderfoot;
ClientVersionBit = BIT_Underfoot;
}
else if(StreamDescription == "Patch RoF")
{
ClientVersion = EQClientRoF;
ClientVersionBit = BIT_RoF;
}
ClientVersion = Connection()->ClientVersion();
ClientVersionBit = 1 << (ClientVersion - 1);
// Antighost code
// tmp var is so the search doesnt find this object
Client* client = entity_list.GetClientByName(cze->char_name);
@@ -2542,7 +2514,7 @@ void Client::Handle_OP_ConsiderCorpse(const EQApplicationPacket *app)
}
}
else if (tcorpse && tcorpse->IsPlayerCorpse()) {
uint32 day, hour, min, sec, ttime, restime;
uint32 day, hour, min, sec, ttime;
if ((ttime = tcorpse->GetDecayTime()) != 0) {
sec = (ttime/1000)%60; // Total seconds
min = (ttime/60000)%60; // Total seconds
@@ -7442,7 +7414,7 @@ void Client::Handle_OP_Emote(const EQApplicationPacket *app)
}
else
*/
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FILTER_SOCIALS);
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FilterSocials);
safe_delete(outapp);
return;
@@ -10665,11 +10637,13 @@ void Client::Handle_OP_PotionBelt(const EQApplicationPacket *app) {
if(BaseItem) {
m_pp.potionbelt.items[mptbs->SlotNumber].item_id = BaseItem->ID;
m_pp.potionbelt.items[mptbs->SlotNumber].icon = BaseItem->Icon;
strn0cpy(m_pp.potionbelt.items[mptbs->SlotNumber].item_name, BaseItem->Name, sizeof(BaseItem->Name));
}
}
else {
m_pp.potionbelt.items[mptbs->SlotNumber].item_id = 0;
m_pp.potionbelt.items[mptbs->SlotNumber].icon = 0;
strncpy(m_pp.potionbelt.items[mptbs->SlotNumber].item_name, "\0", 1);
}
Save();
@@ -13536,8 +13510,6 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
if(tar) {
int mercTypeCount = 0;
int mercCount = 0;
//int mercStanceCount = 2; // Temporarily Hard Set
int packetSize;
MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct;
@@ -13659,11 +13631,12 @@ void Client::Handle_OP_MercenaryHire(const EQApplicationPacket *app)
SendMercMerchantResponsePacket(0);
// Set time remaining to max on Hire
GetEPP().mercTimerRemaining = RuleI(Mercs, UpkeepIntervalMS);
GetMercInfo().MercTimerRemaining = RuleI(Mercs, UpkeepIntervalMS);
// Get merc, assign it to client & spawn
Merc* merc = Merc::LoadMerc(this, merc_template, merchant_id);
SpawnMerc(merc);
Merc* merc = Merc::LoadMerc(this, merc_template, merchant_id, false);
SpawnMerc(merc, true);
merc->Save();
}
}
@@ -13707,7 +13680,7 @@ void Client::Handle_OP_MercenaryCommand(const EQApplicationPacket *app)
if(option >= 0)
{
GetEPP().mercState = option;
GetMercInfo().State = option;
}
DumpPacket(app);
@@ -13807,10 +13780,10 @@ void Client::Handle_OP_MercenaryTimerRequest(const EQApplicationPacket *app)
if(merc) {
entityID = merc->GetID();
if(GetEPP().mercIsSuspended) {
if(GetMercInfo().IsSuspended) {
mercState = 1;
suspendedTime = GetEPP().mercSuspendedTime;
suspendedTime = GetMercInfo().SuspendedTime;
}
}
}
+10 -18
View File
@@ -195,6 +195,7 @@ bool Client::Process() {
LeaveGroup();
if (GetMerc())
{
GetMerc()->Save();
GetMerc()->RemoveMercFromGroup(GetMerc(), GetMerc()->GetGroup());
GetMerc()->Depop();
}
@@ -211,6 +212,7 @@ bool Client::Process() {
Save();
if (GetMerc())
{
GetMerc()->Save();
GetMerc()->RemoveMercFromGroup(GetMerc(), GetMerc()->GetGroup());
GetMerc()->Depop();
}
@@ -251,7 +253,7 @@ bool Client::Process() {
UpdateMercTimer();
}
if(GetEPP().mercTemplateID != 0)
if(GetMercInfo().MercTemplateID != 0)
{
if(p_timers.Expired(&database, pTimerMercSuspend, false)) {
CheckMercSuspendTimer();
@@ -679,6 +681,7 @@ bool Client::Process() {
if (GetGM()) {
if (GetMerc())
{
GetMerc()->Save();
GetMerc()->RemoveMercFromGroup(GetMerc(), GetMerc()->GetGroup());
GetMerc()->Depop();
}
@@ -714,7 +717,7 @@ bool Client::Process() {
#ifdef REVERSE_AGGRO
//At this point, we are still connected, everything important has taken
//place, now check to see if anybody wants to aggro us.
// Everhood 6/15/06 - only if client is not feigned
// only if client is not feigned
if(ret && !GetFeigned() && scanarea_timer.Check()) {
entity_list.CheckClientAggro(this);
}
@@ -772,7 +775,7 @@ bool Client::Process() {
}
OnDisconnect(true);
}
// EverHood Feign Death 2 minutes and zone forgets you
// Feign Death 2 minutes and zone forgets you
if (forget_timer.Check()) {
forget_timer.Disable();
entity_list.ClearZoneFeignAggro(this);
@@ -1336,7 +1339,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
{
case -1: // destroy
{
// solar: I don't think you can move coin from the void,
// I don't think you can move coin from the void,
// but need to check this
break;
}
@@ -1529,7 +1532,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
// don't allow them to go into negatives (from our point of view)
amount_to_take = *from_bucket < mc->amount ? *from_bucket : mc->amount;
// solar: if you move 11 gold into a bank platinum location, the packet
// if you move 11 gold into a bank platinum location, the packet
// will say 11, but the client will have 1 left on their cursor, so we have
// to figure out the conversion ourselves
@@ -1539,14 +1542,10 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
// we have to adjust the amount we take as well
amount_to_take = amount_to_add * ((float)CoinTypeCoppers(mc->cointype2) / (float)CoinTypeCoppers(mc->cointype1));
// solar: now we should have a from_bucket, a to_bucket, an amount_to_take
// now we should have a from_bucket, a to_bucket, an amount_to_take
// and an amount_to_add
#ifdef SOLAR
printf("taking %d coins, adding %d coins\n", amount_to_take, amount_to_add);
#endif
// solar: now we actually take it from the from bucket. if there's an error
// now we actually take it from the from bucket. if there's an error
// with the destination slot, they lose their money
*from_bucket -= amount_to_take;
// why are intentionally inducing a crash here rather than letting the code attempt to stumble on?
@@ -1570,13 +1569,6 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
}
}
#ifdef SOLAR
printf("from bucket = %d ", *from_bucket);
if(to_bucket)
printf("to bucket = %d", *to_bucket);
printf("\n");
#endif
// if this is a trade move, inform the person being traded with
if(mc->to_slot == 3 && trader && trader->IsClient())
{
+1 -3
View File
@@ -943,7 +943,7 @@ void command_help(Client *c, const Seperator *sep)
void command_version(Client *c, const Seperator *sep)
{
c->Message(0, "Current version information.");
c->Message(0, " %s", CURRENT_ZONE_VERSION);
c->Message(0, " %s", CURRENT_VERSION);
c->Message(0, " Compiled on: %s at %s", COMPILE_DATE, COMPILE_TIME);
c->Message(0, " Last modified on: %s", LAST_MODIFIED);
}
@@ -9626,9 +9626,7 @@ void command_object(Client *c, const Seperator *sep)
char errbuf[MYSQL_ERRMSG_SIZE];
char query[512];
char line[256];
uint32 col;
uint32 lastid;
MYSQL_RES *result;
MYSQL_ROW row;
int iObjectsFound = 0;
+22 -4
View File
@@ -1303,9 +1303,9 @@ void EntityList::ChannelMessage(Mob* from, uint8 chan_num, uint8 language, uint8
Client* client = iterator.GetData();
eqFilterType filter = FilterNone;
if(chan_num==3)//shout
filter=FILTER_SHOUT;
filter=FilterShouts;
else if(chan_num==4) //auction
filter=FILTER_AUCTION;
filter=FilterAuctions;
if (chan_num != 8 || client->Dist(*from) < 200) // Only say is limited in range
{
@@ -1987,6 +1987,24 @@ Corpse* EntityList::GetCorpseByOwner(Client* client){
}
return 0;
}
Corpse* EntityList::GetCorpseByOwnerWithinRange(Client* client, Mob* center, int range){
LinkedListIterator<Corpse*> iterator(corpse_list);
iterator.Reset();
while(iterator.MoreElements())
{
if (iterator.GetData()->IsPlayerCorpse())
{
if (center->DistNoRootNoZ(*iterator.GetData()) < range && strcasecmp(iterator.GetData()->GetOwnerName(), client->GetName()) == 0) {
return iterator.GetData();
}
}
iterator.Advance();
}
return 0;
}
Corpse* EntityList::GetCorpseByID(uint16 id){
LinkedListIterator<Corpse*> iterator(corpse_list);
iterator.Reset();
@@ -2258,10 +2276,10 @@ void EntityList::ChannelMessageFromWorld(const char* from, const char* to, uint8
continue;
if(!guild_mgr.CheckPermission(guild_id, client->GuildRank(), GUILD_HEAR))
continue;
if(client->GetFilter(FILTER_GUILDSAY) == FilterHide)
if(client->GetFilter(FilterGuildChat) == FilterHide)
continue;
} else if(chan_num == 5) {
if(client->GetFilter(FILTER_OOC) == FilterHide)
if(client->GetFilter(FilterOOC) == FilterHide)
continue;
}
client->ChannelMessageSend(from, to, chan_num, language, message);
+2 -1
View File
@@ -156,6 +156,7 @@ public:
Raid* GetRaidByLeaderName(const char *leader);
Corpse* GetCorpseByOwner(Client* client);
Corpse* GetCorpseByOwnerWithinRange(Client* client, Mob* center, int range);
Corpse* GetCorpseByID(uint16 id);
Corpse* GetCorpseByDBID(uint32 dbid);
Corpse* GetCorpseByName(const char* name);
@@ -357,7 +358,7 @@ public:
int GetHatedCount(Mob *attacker, Mob *exclude);
void AIYellForHelp(Mob* sender, Mob* attacker);
bool AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float iRange, uint16 iSpellTypes);
bool Merc_AICheckCloseBeneficialSpells(Merc* caster, uint8 iChance, float iRange, uint16 iSpellTypes);
bool Merc_AICheckCloseBeneficialSpells(Merc* caster, uint8 iChance, float iRange, uint32 iSpellTypes);
Mob* GetTargetForMez(Mob* caster);
uint32 CheckNPCsClose(Mob *center);
+1 -1
View File
@@ -752,7 +752,7 @@ void Group::GroupMessage(Mob* sender, uint8 language, uint8 lang_skill, const ch
if(!members[i])
continue;
if (members[i]->IsClient() && members[i]->CastToClient()->GetFilter(FILTER_GROUP)!=0)
if (members[i]->IsClient() && members[i]->CastToClient()->GetFilter(FilterGroupChat)!=0)
members[i]->CastToClient()->ChannelMessageSend(sender->GetName(),members[i]->GetName(),2,language,lang_skill,message);
}
+678 -134
View File
File diff suppressed because it is too large Load Diff
+24 -7
View File
@@ -5,6 +5,7 @@
#include "npc.h"
using namespace std;
#define MAXMERCS 1
#define MERC_DEBUG 0
#define TANK 1
#define HEALER 2
@@ -26,7 +27,7 @@ enum MercStanceType {
struct MercSpell {
uint16 spellid; // <= 0 = no spell
uint16 type; // 0 = never, must be one (and only one) of the defined values
uint32 type; // 0 = never, must be one (and only one) of the defined values
int16 stance; // 0 = all, + = only this stance, - = all except this stance
int16 slot;
uint16 proc_chance;
@@ -60,7 +61,7 @@ public:
virtual void AI_Process();
//virtual bool AICastSpell(Mob* tar, int8 iChance, int16 iSpellTypes);
virtual bool AICastSpell(int8 iChance, int16 iSpellTypes);
virtual bool AICastSpell(int8 iChance, int32 iSpellTypes);
virtual bool AIDoSpellCast(uint16 spellid, Mob* tar, int32 mana_cost, uint32* oDontDoAgainBefore = 0);
virtual bool AI_EngagedCastCheck();
//virtual bool AI_PursueCastCheck();
@@ -73,6 +74,7 @@ public:
static bool RemoveMercFromGroup(Merc* merc, Group* group);
void ProcessClientZoneChange(Client* mercOwner);
static void MercGroupSay(Mob *speaker, const char *msg, ...);
Corpse* GetGroupMemberCorpse();
// Merc Spell Casting Methods
int8 GetChanceToCastBySpellType(int16 spellType);
@@ -100,21 +102,25 @@ public:
static MercSpell GetBestMercSpellForAETaunt(Merc* caster);
static MercSpell GetBestMercSpellForTaunt(Merc* caster);
static MercSpell GetBestMercSpellForHate(Merc* caster);
static MercSpell GetBestMercSpellForCure(Merc* caster, Mob* target);
static bool GetNeedsCured(Mob *tar);
bool UseDiscipline(int32 spell_id, int32 target);
virtual bool IsMerc() const { return true; }
virtual void FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho);
static Merc* LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id);
static Merc* LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id, bool updateFromDB = false);
void UpdateMercInfo(Client *c);
void UpdateMercStats(Client *c);
void UpdateMercAppearance(Client *c);
static const char *GetRandomName();
bool Spawn(Client *owner);
bool Dismiss();
bool Suspend();
bool Unsuspend();
bool Unsuspend(bool setMaxStats);
void Zone();
virtual void Depop();
virtual bool Save();
bool GetDepop() { return p_depop; }
bool IsDead() { return GetHP() < 0;};
@@ -133,10 +139,12 @@ public:
uint32 GetMercTemplateID() { return _MercTemplateID; }
uint32 GetMercType() { return _MercType; }
uint32 GetMercSubType() { return _MercSubType; }
uint32 GetProficiencyID() { return _ProficiencyID; }
uint8 GetProficiencyID() { return _ProficiencyID; }
uint8 GetTierID() { return _TierID; }
uint32 GetCostFormula() { return _CostFormula; }
uint32 GetMercNameType() { return _NameType; }
uint32 GetStance() { return _currentStance; }
int GetHatedCount() { return _hatedCount; }
inline const uint8 GetClientVersion() const { return _OwnerClientVersion; }
@@ -148,9 +156,12 @@ public:
virtual void DoClassAttacks(Mob *target);
bool CheckTaunt();
bool CheckAETaunt();
bool CheckConfidence();
bool TryHide();
// stat functions
virtual void CalcBonuses();
int32 GetEndurance() const {return cur_end;} //This gets our current endurance
inline virtual int16 GetAC() const { return AC; }
inline virtual int16 GetATK() const { return ATK; }
inline virtual int16 GetATKBonus() const { return itembonuses.ATK + spellbonuses.ATK; }
@@ -215,11 +226,13 @@ public:
void SetMercType( uint32 type ) { _MercType = type; }
void SetMercSubType( uint32 subtype ) { _MercSubType = subtype; }
void SetProficiencyID( uint8 proficiency_id ) { _ProficiencyID = proficiency_id; }
void SetTierID( uint8 tier_id ) { _TierID = tier_id; }
void SetCostFormula( uint8 costformula ) { _CostFormula = costformula; }
void SetMercNameType( uint8 nametype ) { _NameType = nametype; }
void SetClientVersion(uint8 clientVersion) { _OwnerClientVersion = clientVersion; }
void SetSuspended(bool suspended) { _suspended = suspended; }
void SetStance( uint32 stance ) { _currentStance = stance; }
void SetHatedCount( uint8 count ) { _hatedCount = count; }
void Sit();
void Stand();
@@ -283,7 +296,6 @@ private:
int32 CalcManaRegenCap();
void CalcMaxEndurance(); //This calculates the maximum endurance we can have
int32 CalcBaseEndurance(); //Calculates Base End
int32 GetEndurance() const {return cur_end;} //This gets our current endurance
int32 GetMaxEndurance() const {return max_end;} //This gets our endurance from the last CalcMaxEndurance() call
int32 CalcEnduranceRegen(); //Calculates endurance regen used in DoEnduranceRegen()
int32 CalcEnduranceRegenCap();
@@ -331,6 +343,7 @@ private:
uint32 _MercType;
uint32 _MercSubType;
uint8 _ProficiencyID;
uint8 _TierID;
uint8 _CostFormula;
uint8 _NameType;
uint8 _OwnerClientVersion;
@@ -342,11 +355,15 @@ private:
bool _medding;
bool _suspended;
bool p_depop;
bool _check_confidence;
bool _lost_confidence;
int _hatedCount;
uint32 owner_char_id;
const NPCType* ourNPCData;
Timer endupkeep_timer;
Timer rest_timer;
Timer confidence_timer;
};
#endif // MERC_H
#endif // MERC_H
+1 -1
View File
@@ -229,7 +229,7 @@ int main(int argc, char** argv) {
// _crtBreakAlloc = 2025;
#endif
_log(ZONE__INIT, "CURRENT_ZONE_VERSION: %s", CURRENT_ZONE_VERSION);
_log(ZONE__INIT, "CURRENT_VERSION: %s", CURRENT_VERSION);
/*
* Setup nice signal handlers
+9 -6
View File
@@ -1737,22 +1737,25 @@ void NPC::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
if (RuleB(Pets, UnTargetableSwarmPet)) {
if(GetOwnerID() || GetSwarmOwner()) {
ns->spawn.is_pet = 1;
if (GetOwnerID()) {
if (!IsCharmed() && GetOwnerID()) {
Client *c = entity_list.GetClientByID(GetOwnerID());
if(c)
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
}
else if (GetSwarmOwner()) {
ns->spawn.bodytype = 11;
Client *c = entity_list.GetClientByID(GetSwarmOwner());
if(c)
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
if(!IsCharmed())
{
Client *c = entity_list.GetClientByID(GetSwarmOwner());
if(c)
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
}
}
}
} else {
if(GetOwnerID()) {
ns->spawn.is_pet = 1;
if (GetOwnerID()) {
if (!IsCharmed() && GetOwnerID()) {
Client *c = entity_list.GetClientByID(GetOwnerID());
if(c)
sprintf(ns->spawn.lastName, "%s's Pet", c->GetName());
@@ -2347,4 +2350,4 @@ void NPC::PrintOutQuestItems(Client* c){
}
c->Message(4,"End of quest items list.");
}
}
-2
View File
@@ -787,7 +787,6 @@ XS(XS_Object_Repop)
Perl_croak(aTHX_ "Usage: Object::Repop(THIS)");
{
Object * THIS;
Const_char * RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "Object")) {
@@ -811,7 +810,6 @@ XS(XS_Object_Depop)
Perl_croak(aTHX_ "Usage: Object::Depop(THIS)");
{
Object * THIS;
Const_char * RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "Object")) {
+8 -5
View File
@@ -644,13 +644,14 @@ XS(XS__gmsay);
XS(XS__gmsay)
{
dXSARGS;
if ((items < 1) || (items > 4))
if ((items < 1) || (items > 5))
Perl_croak(aTHX_ "Usage: gmsay(str, color, send_to_world?)");
char * str = (char *)SvPV_nolen(ST(0));
int color = 7;
bool send_to_world = 0;
uint32 to_guilddbid = 0;
uint16 to_minstatus = 80;
if (items > 1) {
color = (int)SvIV(ST(1));
@@ -660,11 +661,13 @@ XS(XS__gmsay)
send_to_world = ((int)SvIV(ST(2))) == 0?false:true;
}
if (items > 3) {
to_guilddbid = (int)SvIV(ST(3));
}
if (items > 3)
to_guilddbid = (int)SvUV(ST(3));
quest_manager.gmsay(str, color, send_to_world, to_guilddbid);
if (items > 4)
to_minstatus = (int)SvUV(ST(4));
quest_manager.gmsay(str, color, send_to_world, to_guilddbid, to_minstatus);
XSRETURN_EMPTY;
}
+6 -7
View File
@@ -526,13 +526,12 @@ void QuestManager::shout2(const char *str) {
worldserver.SendEmoteMessage(0,0,0,13, "%s shouts, '%s'", owner->GetCleanName(), str);
}
void QuestManager::gmsay(const char *str, uint32 color, bool send_to_world, uint32 to_guilddbid) {
if(send_to_world) {
worldserver.SendEmoteMessage(0, to_guilddbid, 80, color, "%s", str);
}
else {
entity_list.MessageStatus(to_guilddbid, 80, color, "%s", str);
}
void QuestManager::gmsay(const char *str, uint32 color, bool send_to_world, uint32 to_guilddbid, uint32 to_minstatus)
{
if(send_to_world)
worldserver.SendEmoteMessage(0, to_guilddbid, to_minstatus, color, "%s", str);
else
entity_list.MessageStatus(to_guilddbid, to_minstatus, color, "%s", str);
}
void QuestManager::depop(int npc_type) { // depop NPC and don't start spawn timer
+1 -1
View File
@@ -68,7 +68,7 @@ public:
void emote(const char *str);
void shout(const char *str);
void shout2(const char *str);
void gmsay(const char *str, uint32 color, bool send_to_world, uint32 to_guilddbid);
void gmsay(const char *str, uint32 color, bool send_to_world, uint32 to_guilddbid, uint32 to_minstatus);
void depop(int npc_type = 0); // depop NPC and don't start spawn timer
void depop_withtimer(int npc_type = 0); // depop NPC and start spawn timer
void depopall(int npc_type = 0);
+1
View File
@@ -65,6 +65,7 @@ const int SpellType_Charm=4096;
const int SpellType_Slow = 8192;
const int SpellType_Debuff = 16384;
const int SpellType_Cure = 32768;
const int SpellType_Resurrect = 65536;
const int SpellTypes_Detrimental = SpellType_Nuke|SpellType_Root|SpellType_Lifetap|SpellType_Snare|SpellType_DOT|SpellType_Dispel|SpellType_Mez|SpellType_Charm|SpellType_Debuff|SpellType_Slow;
const int SpellTypes_Beneficial = SpellType_Heal|SpellType_Buff|SpellType_Escape|SpellType_Pet|SpellType_InCombatBuff|SpellType_Cure;
+2
View File
@@ -732,6 +732,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
entity_list.QueueClients(this, app);
safe_delete(app);
SendPetBuffsToClient();
SendAppearancePacket(AT_Pet, caster->GetID(), true, true);
}
if (IsClient())
@@ -3499,6 +3500,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
if(IsNPC())
{
CastToNPC()->RestoreGuardSpotCharm();
SendAppearancePacket(AT_Pet, 0, true, true);
}
Mob* tempmob = GetOwner();
+7 -7
View File
@@ -776,7 +776,7 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
ic->messageid = message_other;
ic->spawnid = GetID();
strcpy(ic->message, GetCleanName());
entity_list.QueueCloseClients(this, outapp, true, 200, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
entity_list.QueueCloseClients(this, outapp, true, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
safe_delete(outapp);
}
@@ -1952,7 +1952,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
}
}
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
// Set and send the nimbus effect if this spell has one
int NimbusEffect = GetNimbusEffect(spell_id);
@@ -2171,7 +2171,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, uint16 slot) {
}
//do we need to do this???
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
DoAnim(spells[spell_id].CastingAnim, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
if(IsClient())
CastToClient()->CheckSongSkillIncrease(spell_id);
@@ -2209,7 +2209,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
action->buff_unknown = 0;
action->level = buffs[buffs_i].casterlevel;
action->type = SpellDamageType;
entity_list.QueueCloseClients(this, packet, false, 200, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
entity_list.QueueCloseClients(this, packet, false, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
action->buff_unknown = 4;
@@ -2280,7 +2280,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
cd->damage = 0;
if(!IsEffectInSpell(spell_id, SE_BindAffinity))
{
entity_list.QueueCloseClients(this, message_packet, false, 200, 0, true, IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
entity_list.QueueCloseClients(this, message_packet, false, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
}
safe_delete(message_packet);
safe_delete(packet);
@@ -3010,7 +3010,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
if(IsClient()) // send to caster
CastToClient()->QueuePacket(action_packet);
// send to people in the area, ignoring caster and target
entity_list.QueueCloseClients(spelltar, action_packet, true, 200, this, true, spelltar->IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
entity_list.QueueCloseClients(spelltar, action_packet, true, 200, this, true, spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells);
/* Send the EVENT_CAST_ON event */
@@ -3521,7 +3521,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
cd->damage = 0;
if(!IsEffectInSpell(spell_id, SE_BindAffinity))
{
entity_list.QueueCloseClients(spelltar, message_packet, false, 200, 0, true, spelltar->IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
entity_list.QueueCloseClients(spelltar, message_packet, false, 200, 0, true, spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells);
}
safe_delete(action_packet);
safe_delete(message_packet);
-1
View File
@@ -395,7 +395,6 @@ bool Client::CheckTitle(int titleset) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
if (database.RunQuery(query, MakeAnyLenString(&query, "SELECT `id` FROM player_titlesets WHERE `title_set`=%i AND `char_id`=%i LIMIT 1", titleset, CharacterID()), errbuf, &result)) {
safe_delete_array(query);
+16 -1
View File
@@ -769,7 +769,22 @@ void Client::Trader_StartTrader() {
safe_delete(outapp);
// Notify other clients we are now in trader mode
SendTraderPacket(this, 0);
outapp= new EQApplicationPacket(OP_BecomeTrader, sizeof(BecomeTrader_Struct));
BecomeTrader_Struct* bts = (BecomeTrader_Struct*)outapp->pBuffer;
bts->Code = 1;
bts->ID = this->GetID();
strn0cpy(bts->Name, GetName(), sizeof(bts->Name));
entity_list.QueueClients(this, outapp, false);
_pkt(TRADING__PACKETS, outapp);
safe_delete(outapp);
}
void Client::Trader_EndTrader() {
+2 -2
View File
@@ -1344,7 +1344,7 @@ void WorldServer::Process() {
if(strcmp(rmsg->from, r->members[x].member->GetName()) != 0)
{
if(r->members[x].GroupNumber == rmsg->gid){
if(r->members[x].member->GetFilter(FILTER_GROUP)!=0)
if(r->members[x].member->GetFilter(FilterGroupChat)!=0)
{
r->members[x].member->ChannelMessageSend(rmsg->from, r->members[x].member->GetName(), 2, 0, rmsg->message);
}
@@ -1369,7 +1369,7 @@ void WorldServer::Process() {
if(r->members[x].member){
if(strcmp(rmsg->from, r->members[x].member->GetName()) != 0)
{
if(r->members[x].member->GetFilter(FILTER_GROUP)!=0)
if(r->members[x].member->GetFilter(FilterGroupChat)!=0)
{
r->members[x].member->ChannelMessageSend(rmsg->from, r->members[x].member->GetName(), 15, 0, rmsg->message);
}
+8 -7
View File
@@ -660,7 +660,7 @@ void Zone::LoadMercTemplates(){
mysql_free_result(DatasetResult);
}
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "SELECT DISTINCT MTem.merc_template_id, MTyp.dbstring AS merc_type_id, MTem.dbstring AS merc_subtype_id, MTyp.race_id, MS.class_id, MTyp.proficiency_id, 0 AS CostFormula, MTem.clientversion, MTem.merc_npc_type_id FROM merc_types MTyp, merc_templates MTem, merc_subtypes MS WHERE MTem.merc_type_id = MTyp.merc_type_id AND MTem.merc_subtype_id = MS.merc_subtype_id ORDER BY MTyp.race_id, MS.class_id, MTyp.proficiency_id;"), TempErrorMessageBuffer, &DatasetResult)) {
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "SELECT DISTINCT MTem.merc_template_id, MTyp.dbstring AS merc_type_id, MTem.dbstring AS merc_subtype_id, MTyp.race_id, MS.class_id, MTyp.proficiency_id, MS.tier_id, 0 AS CostFormula, MTem.clientversion, MTem.merc_npc_type_id FROM merc_types MTyp, merc_templates MTem, merc_subtypes MS WHERE MTem.merc_type_id = MTyp.merc_type_id AND MTem.merc_subtype_id = MS.merc_subtype_id ORDER BY MTyp.race_id, MS.class_id, MTyp.proficiency_id;"), TempErrorMessageBuffer, &DatasetResult)) {
errorMessage = std::string(TempErrorMessageBuffer);
}
else {
@@ -673,9 +673,10 @@ void Zone::LoadMercTemplates(){
tempMercTemplate.RaceID = atoi(DataRow[3]);
tempMercTemplate.ClassID = atoi(DataRow[4]);
tempMercTemplate.ProficiencyID = atoi(DataRow[5]);
tempMercTemplate.CostFormula = atoi(DataRow[6]);
tempMercTemplate.ClientVersion = atoi(DataRow[7]);
tempMercTemplate.MercNPCID = atoi(DataRow[8]);
tempMercTemplate.TierID = atoi(DataRow[6]);
tempMercTemplate.CostFormula = atoi(DataRow[7]);
tempMercTemplate.ClientVersion = atoi(DataRow[8]);
tempMercTemplate.MercNPCID = atoi(DataRow[9]);
for(std::list<MercStanceInfo>::iterator mercStanceListItr = merc_stances.begin(); mercStanceListItr != merc_stances.end(); mercStanceListItr++) {
if(mercStanceListItr->ClassID == tempMercTemplate.ClassID && mercStanceListItr->ProficiencyID == tempMercTemplate.ProficiencyID) {
@@ -689,7 +690,7 @@ void Zone::LoadMercTemplates(){
mysql_free_result(DatasetResult);
}
safe_delete(Query);
safe_delete_array(Query);
Query = 0;
if(!errorMessage.empty()) {
@@ -763,7 +764,7 @@ void Zone::LoadMercSpells(){
LogFile->write(EQEMuLog::Debug, "Mercenary Debug: Loaded %i merc spells.", merc_spells_list[1].size() + merc_spells_list[2].size() + merc_spells_list[9].size() + merc_spells_list[12].size());
}
safe_delete(Query);
safe_delete_array(Query);
Query = 0;
if(!errorMessage.empty()) {
@@ -2648,4 +2649,4 @@ void Zone::ReloadWorld(uint32 Option){
zone->Repop(0);
parse->ReloadQuests();
}
}
}
+274 -1
View File
@@ -7,6 +7,7 @@
#include "../common/rulesys.h"
#include "zone.h"
#include "client.h"
#include "merc.h"
#include "groups.h"
#include "raids.h"
#include <iostream>
@@ -1632,6 +1633,279 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
return npc;
}
bool ZoneDatabase::LoadMercInfo(Client *c) {
bool loaded = false;
if(c->GetEPP().merc_name[0] != 0) {
std::string errorMessage;
char* Query = 0;
char TempErrorMessageBuffer[MYSQL_ERRMSG_SIZE];
MYSQL_RES* DatasetResult;
MYSQL_ROW DataRow;
//char name[64];
//CleanMobName(c->GetEPP().merc_name, name);
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "SELECT MercID, Slot, Name, TemplateID, SuspendedTime, IsSuspended, TimerRemaining, Gender, StanceID, HP, Mana, Endurance, Face, LuclinHairStyle, LuclinHairColor, LuclinEyeColor, LuclinEyeColor2, LuclinBeardColor, LuclinBeard, DrakkinHeritage, DrakkinTattoo, DrakkinDetails FROM mercs WHERE OwnerCharacterID = '%i' ORDER BY Slot", c->CharacterID()), TempErrorMessageBuffer, &DatasetResult)) {
errorMessage = std::string(TempErrorMessageBuffer);
}
else {
while(DataRow = mysql_fetch_row(DatasetResult)) {
uint8 slot = atoi(DataRow[1]);
c->GetMercInfo(slot).mercid = atoi(DataRow[0]);
c->GetMercInfo(slot).slot = slot;
snprintf(c->GetMercInfo(slot).merc_name, 64, "%s", std::string(DataRow[2]).c_str());
c->GetMercInfo(slot).MercTemplateID = atoi(DataRow[3]);
c->GetMercInfo(slot).SuspendedTime = atoi(DataRow[4]);
c->GetMercInfo(slot).IsSuspended = atoi(DataRow[5]) == 1 ? true : false;
c->GetMercInfo(slot).MercTimerRemaining = atoi(DataRow[6]);
c->GetMercInfo(slot).Gender = atoi(DataRow[7]);
c->GetMercInfo(slot).State = atoi(DataRow[8]);
c->GetMercInfo(slot).hp = atoi(DataRow[9]);
c->GetMercInfo(slot).mana = atoi(DataRow[10]);
c->GetMercInfo(slot).endurance = atoi(DataRow[11]);
c->GetMercInfo(slot).face = atoi(DataRow[12]);
c->GetMercInfo(slot).luclinHairStyle = atoi(DataRow[13]);
c->GetMercInfo(slot).luclinHairColor = atoi(DataRow[14]);
c->GetMercInfo(slot).luclinEyeColor = atoi(DataRow[15]);
c->GetMercInfo(slot).luclinEyeColor2 = atoi(DataRow[16]);
c->GetMercInfo(slot).luclinBeardColor = atoi(DataRow[17]);
c->GetMercInfo(slot).luclinBeard = atoi(DataRow[18]);
c->GetMercInfo(slot).drakkinHeritage = atoi(DataRow[19]);
c->GetMercInfo(slot).drakkinTattoo = atoi(DataRow[20]);
c->GetMercInfo(slot).drakkinDetails = atoi(DataRow[21]);
loaded = true;
}
mysql_free_result(DatasetResult);
}
safe_delete_array(Query);
}
return loaded;
}
bool ZoneDatabase::SaveMerc(Merc *merc) {
Client *owner = merc->GetMercOwner();
bool Result = false;
std::string errorMessage;
if(!owner) {
return false;
}
char* Query = 0;
char TempErrorMessageBuffer[MYSQL_ERRMSG_SIZE];
uint32 affectedRows = 0;
if(merc->GetMercID() == 0) {
// New merc record
uint32 TempNewMercID = 0;
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "INSERT INTO mercs (OwnerCharacterID, Slot, Name, TemplateID, SuspendedTime, IsSuspended, TimerRemaining, Gender, StanceID, HP, Mana, Endurance, Face, LuclinHairStyle, LuclinHairColor, LuclinEyeColor, LuclinEyeColor2, LuclinBeardColor, LuclinBeard, DrakkinHeritage, DrakkinTattoo, DrakkinDetails) VALUES('%u', '%u', '%s', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i', '%i')", merc->GetMercCharacterID(), owner->GetNumMercs(), merc->GetCleanName(), merc->GetMercTemplateID(), owner->GetMercInfo().SuspendedTime, merc->IsSuspended(), owner->GetMercInfo().MercTimerRemaining, merc->GetGender(), merc->GetStance(), merc->GetHP(), merc->GetMana(), merc->GetEndurance(), merc->GetLuclinFace(), merc->GetHairStyle(), merc->GetHairColor(), merc->GetEyeColor1(), merc->GetEyeColor2(), merc->GetBeardColor(), merc->GetBeard(), merc->GetDrakkinHeritage(), merc->GetDrakkinTattoo(), merc->GetDrakkinDetails() ), TempErrorMessageBuffer, 0, &affectedRows, &TempNewMercID)) {
errorMessage = std::string(TempErrorMessageBuffer);
}
else {
merc->SetMercID(TempNewMercID);
Result = true;
}
}
else {
// Update existing merc record
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "UPDATE mercs SET OwnerCharacterID = '%u', Slot = '%u', Name = '%s', TemplateID = '%u', SuspendedTime = '%u', IsSuspended = '%u', TimerRemaining = '%u', Gender = '%u', StanceID = '%u', HP = '%u', Mana = '%u', Endurance = '%u', Face = '%i', LuclinHairStyle = '%i', LuclinHairColor = '%i', LuclinEyeColor = '%i', LuclinEyeColor2 = '%i', LuclinBeardColor = '%i', LuclinBeard = '%i', DrakkinHeritage = '%i', DrakkinTattoo = '%i', DrakkinDetails = '%i' WHERE MercID = '%u'", merc->GetMercCharacterID(), owner->GetMercSlot(), merc->GetCleanName(), merc->GetMercTemplateID(), owner->GetMercInfo().SuspendedTime, merc->IsSuspended(), owner->GetMercInfo().MercTimerRemaining, merc->GetGender(), merc->GetStance(), merc->GetHP(), merc->GetMana(), merc->GetEndurance(), merc->GetLuclinFace(), merc->GetHairStyle(), merc->GetHairColor(), merc->GetEyeColor1(), merc->GetEyeColor2(), merc->GetBeardColor(), merc->GetBeard(), merc->GetDrakkinHeritage(), merc->GetDrakkinTattoo(), merc->GetDrakkinDetails(), merc->GetMercID()), TempErrorMessageBuffer, 0, &affectedRows)) {
errorMessage = std::string(TempErrorMessageBuffer);
}
else {
Result = true;
//time(&_startTotalPlayTime);
}
}
safe_delete(Query);
if(!errorMessage.empty() || (Result && affectedRows != 1)) {
if(owner && !errorMessage.empty())
owner->Message(13, errorMessage.c_str());
else if(owner)
owner->Message(13, std::string("Unable to save merc to the database.").c_str());
Result = false;
}
else {
merc->UpdateMercInfo(owner);
database.SaveMercBuffs(merc);
//database.SaveMercStance(this);
//database.SaveMercTimers(this);
}
return Result;
}
void ZoneDatabase::SaveMercBuffs(Merc *merc) {
Buffs_Struct *buffs = merc->GetBuffs();
std::string errorMessage;
char* Query = 0;
char TempErrorMessageBuffer[MYSQL_ERRMSG_SIZE];
int BuffCount = 0;
int InsertCount = 0;
uint32 buff_count = merc->GetMaxBuffSlots();
while(BuffCount < BUFF_COUNT) {
if(buffs[BuffCount].spellid > 0 && buffs[BuffCount].spellid != SPELL_UNKNOWN) {
if(InsertCount == 0) {
// Remove any existing buff saves
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "DELETE FROM mercbuffs WHERE MercId = %u", merc->GetMercID()), TempErrorMessageBuffer)) {
errorMessage = std::string(TempErrorMessageBuffer);
safe_delete(Query);
Query = 0;
break;
}
}
int IsPersistent = 0;
if(buffs[BuffCount].persistant_buff)
IsPersistent = 1;
else
IsPersistent = 0;
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "INSERT INTO mercbuffs (MercId, SpellId, CasterLevel, DurationFormula, "
"TicsRemaining, PoisonCounters, DiseaseCounters, CurseCounters, CorruptionCounters, HitCount, MeleeRune, MagicRune, "
"DeathSaveSuccessChance, CasterAARank, Persistent) VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u);",
merc->GetMercID(), buffs[BuffCount].spellid, buffs[BuffCount].casterlevel, spells[buffs[BuffCount].spellid].buffdurationformula,
buffs[BuffCount].ticsremaining,
CalculatePoisonCounters(buffs[BuffCount].spellid) > 0 ? buffs[BuffCount].counters : 0,
CalculateDiseaseCounters(buffs[BuffCount].spellid) > 0 ? buffs[BuffCount].counters : 0,
CalculateCurseCounters(buffs[BuffCount].spellid) > 0 ? buffs[BuffCount].counters : 0,
CalculateCorruptionCounters(buffs[BuffCount].spellid) > 0 ? buffs[BuffCount].counters : 0,
buffs[BuffCount].numhits, buffs[BuffCount].melee_rune, buffs[BuffCount].magic_rune,
buffs[BuffCount].deathSaveSuccessChance,
buffs[BuffCount].deathsaveCasterAARank, IsPersistent), TempErrorMessageBuffer)) {
errorMessage = std::string(TempErrorMessageBuffer);
safe_delete(Query);
Query = 0;
break;
}
else {
safe_delete(Query);
Query = 0;
InsertCount++;
}
}
BuffCount++;
}
if(!errorMessage.empty()) {
LogFile->write(EQEMuLog::Error, "Error Saving Merc Buffs: %s", errorMessage.c_str());
}
}
void ZoneDatabase::LoadMercBuffs(Merc *merc) {
Buffs_Struct *buffs = merc->GetBuffs();
uint32 max_slots = merc->GetMaxBuffSlots();
std::string errorMessage;
char* Query = 0;
char TempErrorMessageBuffer[MYSQL_ERRMSG_SIZE];
MYSQL_RES* DatasetResult;
MYSQL_ROW DataRow;
bool BuffsLoaded = false;
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "SELECT SpellId, CasterLevel, DurationFormula, TicsRemaining, PoisonCounters, DiseaseCounters, CurseCounters, CorruptionCounters, HitCount, MeleeRune, MagicRune, DeathSaveSuccessChance, CasterAARank, Persistent FROM mercbuffs WHERE MercId = %u", merc->GetMercID()), TempErrorMessageBuffer, &DatasetResult)) {
errorMessage = std::string(TempErrorMessageBuffer);
}
else {
int BuffCount = 0;
while(DataRow = mysql_fetch_row(DatasetResult)) {
if(BuffCount == BUFF_COUNT)
break;
buffs[BuffCount].spellid = atoi(DataRow[0]);
buffs[BuffCount].casterlevel = atoi(DataRow[1]);
buffs[BuffCount].ticsremaining = atoi(DataRow[3]);
if(CalculatePoisonCounters(buffs[BuffCount].spellid) > 0) {
buffs[BuffCount].counters = atoi(DataRow[4]);
} else if(CalculateDiseaseCounters(buffs[BuffCount].spellid) > 0) {
buffs[BuffCount].counters = atoi(DataRow[5]);
} else if(CalculateCurseCounters(buffs[BuffCount].spellid) > 0) {
buffs[BuffCount].counters = atoi(DataRow[6]);
} else if(CalculateCorruptionCounters(buffs[BuffCount].spellid) > 0) {
buffs[BuffCount].counters = atoi(DataRow[7]);
}
buffs[BuffCount].numhits = atoi(DataRow[8]);
buffs[BuffCount].melee_rune = atoi(DataRow[9]);
buffs[BuffCount].magic_rune = atoi(DataRow[10]);
buffs[BuffCount].deathSaveSuccessChance = atoi(DataRow[11]);
buffs[BuffCount].deathsaveCasterAARank = atoi(DataRow[12]);
buffs[BuffCount].casterid = 0;
bool IsPersistent = false;
if(atoi(DataRow[13]))
IsPersistent = true;
buffs[BuffCount].persistant_buff = IsPersistent;
BuffCount++;
}
mysql_free_result(DatasetResult);
BuffsLoaded = true;
}
safe_delete(Query);
Query = 0;
if(errorMessage.empty() && BuffsLoaded) {
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "DELETE FROM mercbuffs WHERE MercId = %u", merc->GetMercID()), TempErrorMessageBuffer)) {
errorMessage = std::string(TempErrorMessageBuffer);
safe_delete(Query);
Query = 0;
}
}
if(!errorMessage.empty()) {
LogFile->write(EQEMuLog::Error, "Error Loading Merc Buffs: %s", errorMessage.c_str());
}
}
bool ZoneDatabase::DeleteMerc(uint32 merc_id) {
std::string errorMessage;
bool Result = false;
int TempCounter = 0;
if(merc_id > 0) {
char* Query = 0;
char TempErrorMessageBuffer[MYSQL_ERRMSG_SIZE];
// TODO: These queries need to be ran together as a transaction.. ie, if one or more fail then they all will fail to commit to the database.
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "DELETE FROM mercbuffs WHERE MercID = '%u'", merc_id), TempErrorMessageBuffer)) {
errorMessage = std::string(TempErrorMessageBuffer);
}
else
TempCounter++;
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "DELETE FROM mercs WHERE MercID = '%u'", merc_id), TempErrorMessageBuffer)) {
errorMessage = std::string(TempErrorMessageBuffer);
}
else
TempCounter++;
if(TempCounter == 2)
Result = true;
}
if(!errorMessage.empty()) {
LogFile->write(EQEMuLog::Error, "Error Deleting Merc: %s", errorMessage.c_str());
}
return Result;
}
uint8 ZoneDatabase::GetGridType(uint32 grid, uint32 zoneid ) {
char *query = 0;
@@ -2213,7 +2487,6 @@ void ZoneDatabase::QGlobalPurge()
void ZoneDatabase::InsertDoor(uint32 ddoordbid, uint16 ddoorid, const char* ddoor_name, float dxpos, float dypos, float dzpos, float dheading, uint8 dopentype, uint16 dguildid, uint32 dlockpick, uint32 dkeyitem, uint8 ddoor_param, uint8 dinvert, int dincline, uint16 dsize){
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
uint32 maxid;
if (!RunQuery(query, MakeAnyLenString(&query, "replace into doors (id, doorid,zone,version,name,pos_x,pos_y,pos_z,heading,opentype,guild,lockpick,keyitem,door_param,invert_state,incline,size) values('%i','%i','%s','%i', '%s','%f','%f','%f','%f','%i','%i','%i', '%i','%i','%i','%i','%i')", ddoordbid ,ddoorid ,zone->GetShortName(), zone->GetInstanceVersion(), ddoor_name, dxpos, dypos, dzpos, dheading, dopentype, dguildid, dlockpick, dkeyitem, ddoor_param, dinvert, dincline, dsize), errbuf)) {
cerr << "Error in InsertDoor" << query << "' " << errbuf << endl;
}
+33 -4
View File
@@ -110,6 +110,7 @@ struct MercTemplate {
uint8 ClassID;
uint32 MercNPCID;
uint8 ProficiencyID;
uint8 TierID;
uint8 CostFormula; // To determine cost to client
uint32 ClientVersion; // Only send valid mercs per expansion
uint8 MercNameType; // Determines if merc gets random name or default text
@@ -119,18 +120,35 @@ struct MercTemplate {
};
struct MercInfo {
MercTemplate myTemplate;
uint32 mercid;
uint8 slot;
char merc_name[64];
uint32 MercTemplateID;
const MercTemplate* myTemplate;
uint32 SuspendedTime;
bool IsSuspended;
uint32 MercTimerRemaining;
uint8 Gender;
int32 State;
int32 hp;
int32 mana;
int32 endurance;
uint8 face;
uint8 luclinHairStyle;
uint8 luclinHairColor;
uint8 luclinEyeColor;
uint8 luclinEyeColor2;
uint8 luclinBeardColor;
uint8 luclinBeard;
uint32 drakkinHeritage;
uint32 drakkinTattoo;
uint32 drakkinDetails;
};
struct MercSpellEntry {
uint8 proficiencyid;
uint16 spellid; // <= 0 = no spell
uint16 type; // 0 = never, must be one (and only one) of the defined values
uint32 type; // 0 = never, must be one (and only one) of the defined values
int16 stance; // 0 = all, + = only this stance, - = all except this stance
uint8 minlevel;
uint8 maxlevel;
@@ -325,7 +343,6 @@ public:
* NPCs
*/
const NPCType* GetNPCType(uint32 id);
const NPCType* GetMercType(uint32 id, uint16 raceid, uint32 clientlevel);
uint32 NPCSpawnDB(uint8 command, const char* zone, uint32 zone_version, Client *c, NPC* spawn = 0, uint32 extra = 0); // 0 = Create 1 = Add; 2 = Update; 3 = Remove; 4 = Delete
bool SetSpecialAttkFlag(uint8 id, const char* flag);
bool GetPetEntry(const char *pet_type, PetRecord *into);
@@ -335,7 +352,19 @@ public:
void AddLootDropToNPC(NPC* npc,uint32 lootdrop_id, ItemList* itemlist, uint8 droplimit, uint8 mindrop);
uint32 GetMaxNPCSpellsID();
DBnpcspells_Struct* GetNPCSpells(uint32 iDBSpellsID);
/*
* Mercs
*/
const NPCType* GetMercType(uint32 id, uint16 raceid, uint32 clientlevel);
void SaveMercBuffs(Merc *merc);
void LoadMercBuffs(Merc *merc);
bool LoadMercInfo(Client *c);
bool SaveMerc(Merc *merc);
bool DeleteMerc(uint32 merc_id);
//void LoadMercTypesForMercMerchant(NPC *merchant);
//void LoadMercsForMercMerchant(NPC *merchant);
/*
* Petitions
*/