Merge branch 'master' into base_data

This commit is contained in:
KimLS
2013-11-06 13:18:20 -08:00
91 changed files with 2061 additions and 1561 deletions
+1 -1
View File
@@ -343,7 +343,7 @@ bool valid=false;
uint16 packet_crc=ntohs(*(const uint16 *)(buffer+length-2));
#ifdef EQN_DEBUG
if (packet_crc && comp_crc != packet_crc) {
cout << "CRC mismatch: comp=" << hex << comp_crc << ", packet=" << packet_crc << dec << endl;
std::cout << "CRC mismatch: comp=" << std::hex << comp_crc << ", packet=" << packet_crc << std::dec << std::endl;
}
#endif
valid = (!packet_crc || comp_crc == packet_crc);
+6 -6
View File
@@ -326,7 +326,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
break;
}
#endif
//cout << "Got OP_SessionRequest" << endl;
//std::cout << "Got OP_SessionRequest" << std::endl;
init();
OutboundQueueClear();
SessionRequest *Request=(SessionRequest *)p->pBuffer;
@@ -654,7 +654,7 @@ void EQStream::Write(int eq_fd)
int32 threshold=RateThreshold;
MRate.unlock();
if (BytesWritten > threshold) {
//cout << "Over threshold: " << BytesWritten << " > " << threshold << endl;
//std::cout << "Over threshold: " << BytesWritten << " > " << threshold << std::endl;
return;
}
@@ -848,15 +848,15 @@ sockaddr_in address;
address.sin_port=remote_port;
#ifdef NOWAY
uint32 ip=address.sin_addr.s_addr;
cout << "Sending to: "
std::cout << "Sending to: "
<< (int)*(unsigned char *)&ip
<< "." << (int)*((unsigned char *)&ip+1)
<< "." << (int)*((unsigned char *)&ip+2)
<< "." << (int)*((unsigned char *)&ip+3)
<< "," << (int)ntohs(address.sin_port) << "(" << p->size << ")" << endl;
<< "," << (int)ntohs(address.sin_port) << "(" << p->size << ")" << std::endl;
p->DumpRaw();
cout << "-------------" << endl;
std::cout << "-------------" << std::endl;
#endif
length=p->serialize(buffer);
if (p->opcode!=OP_SessionRequest && p->opcode!=OP_SessionResponse) {
@@ -907,7 +907,7 @@ char temp[15];
*((unsigned char *)&ip+2),
*((unsigned char *)&ip+3),
ntohs(from->sin_port));
//cout << timestamp() << "Data from: " << temp << " OpCode 0x" << hex << setw(2) << setfill('0') << (int)p->opcode << dec << endl;
//std::cout << timestamp() << "Data from: " << temp << " OpCode 0x" << std::hex << std::setw(2) << std::setfill('0') << (int)p->opcode << std::dec << std::endl;
//dump_message(p->pBuffer,p->size,timestamp());
}
+9 -9
View File
@@ -104,8 +104,8 @@ struct sockaddr_in address;
fcntl(sock, F_SETFL, O_NONBLOCK);
#endif
//moved these because on windows the output was delayed and causing the console window to look bad
//cout << "Starting factory Reader" << endl;
//cout << "Starting factory Writer" << endl;
//std::cout << "Starting factory Reader" << std::endl;
//std::cout << "Starting factory Writer" << std::endl;
#ifdef _WINDOWS
_beginthread(EQStreamFactoryReaderLoop,0, this);
_beginthread(EQStreamFactoryWriterLoop,0, this);
@@ -119,7 +119,7 @@ struct sockaddr_in address;
EQStream *EQStreamFactory::Pop()
{
EQStream *s=nullptr;
//cout << "Pop():Locking MNewStreams" << endl;
//std::cout << "Pop():Locking MNewStreams" << std::endl;
MNewStreams.lock();
if (NewStreams.size()) {
s=NewStreams.front();
@@ -127,18 +127,18 @@ EQStream *s=nullptr;
s->PutInUse();
}
MNewStreams.unlock();
//cout << "Pop(): Unlocking MNewStreams" << endl;
//std::cout << "Pop(): Unlocking MNewStreams" << std::endl;
return s;
}
void EQStreamFactory::Push(EQStream *s)
{
//cout << "Push():Locking MNewStreams" << endl;
//std::cout << "Push():Locking MNewStreams" << std::endl;
MNewStreams.lock();
NewStreams.push(s);
MNewStreams.unlock();
//cout << "Push(): Unlocking MNewStreams" << endl;
//std::cout << "Push(): Unlocking MNewStreams" << std::endl;
}
void EQStreamFactory::ReaderLoop()
@@ -240,7 +240,7 @@ void EQStreamFactory::CheckTimeout()
//give it a little time for everybody to finish with it
} else {
//everybody is done, we can delete it now
//cout << "Removing connection" << endl;
//std::cout << "Removing connection" << std::endl;
std::map<std::string,EQStream *>::iterator temp=stream_itr;
stream_itr++;
//let whoever has the stream outside delete it
@@ -318,9 +318,9 @@ Timer DecayTimer(20);
stream_count=Streams.size();
MStreams.unlock();
if (!stream_count) {
//cout << "No streams, waiting on condition" << endl;
//std::cout << "No streams, waiting on condition" << std::endl;
WriterWork.Wait();
//cout << "Awake from condition, must have a stream now" << endl;
//std::cout << "Awake from condition, must have a stream now" << std::endl;
}
}
}
+5 -5
View File
@@ -171,7 +171,7 @@ bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging outgoing TCP OldPacket. OPCode: 0x" << hex << setw(4) << setfill('0') << pack->opcode << dec << ", size: " << setw(5) << setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
std::cout << ": Logging outgoing TCP OldPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
#if TCPN_LOG_PACKETS == 2
if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32);
@@ -198,7 +198,7 @@ bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging outgoing TCP packet. OPCode: 0x" << hex << setw(4) << setfill('0') << pack->opcode << dec << ", size: " << setw(5) << setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
std::cout << ": Logging outgoing TCP packet. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
#if TCPN_LOG_PACKETS == 2
if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32);
@@ -237,7 +237,7 @@ bool EmuTCPConnection::SendPacket(EmuTCPNetPacket_Struct* tnps) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging outgoing TCP NetPacket. OPCode: 0x" << hex << setw(4) << setfill('0') << tnps->opcode << dec << ", size: " << setw(5) << setfill(' ') << tnps->size << " " << inet_ntoa(in) << ":" << GetrPort();
std::cout << ": Logging outgoing TCP NetPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << tnps->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << tnps->size << " " << inet_ntoa(in) << ":" << GetrPort();
if (pOldFormat)
std::cout << " (OldFormat)";
std::cout << std::endl;
@@ -578,7 +578,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsPackets(char* errbuf) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging incoming TCP packet. OPCode: 0x" << hex << setw(4) << setfill('0') << pack->opcode << dec << ", size: " << setw(5) << setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
std::cout << ": Logging incoming TCP packet. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
#if TCPN_LOG_PACKETS == 2
if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32);
@@ -663,7 +663,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsOldPackets(char* errbuf) {
struct in_addr in;
in.s_addr = GetrIP();
CoutTimestamp(true);
std::cout << ": Logging incoming TCP OldPacket. OPCode: 0x" << hex << setw(4) << setfill('0') << pack->opcode << dec << ", size: " << setw(5) << setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
std::cout << ": Logging incoming TCP OldPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
#if TCPN_LOG_PACKETS == 2
if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32);
+29 -29
View File
@@ -54,7 +54,7 @@ static inline int32 GetNextItemInstSerialNumber() {
}
ItemInst::ItemInst(const Item_Struct* item, int16 charges) {
m_use_type = ItemUseNormal;
m_use_type = ItemInstNormal;
m_item = item;
m_charges = charges;
m_price = 0;
@@ -76,7 +76,7 @@ ItemInst::ItemInst(const Item_Struct* item, int16 charges) {
}
ItemInst::ItemInst(SharedDatabase *db, uint32 item_id, int16 charges) {
m_use_type = ItemUseNormal;
m_use_type = ItemInstNormal;
m_item = db->GetItem(item_id);
m_charges = charges;
m_price = 0;
@@ -220,10 +220,10 @@ ItemInst* ItemInst::Clone() const
}
// Query item type
bool ItemInst::IsType(ItemClass item_class) const
bool ItemInst::IsType(ItemClassTypes item_class) const
{
// Check usage type
if ((m_use_type == ItemUseWorldContainer) && (item_class == ItemClassContainer))
if ((m_use_type == ItemInstWorldContainer) && (item_class == ItemClassContainer))
return true;
if (!m_item)
@@ -340,8 +340,8 @@ bool ItemInst::IsAmmo() const {
if(!m_item) return false;
if((m_item->ItemType == ItemTypeArrow) ||
(m_item->ItemType == ItemTypeThrowing) ||
(m_item->ItemType == ItemTypeThrowingv2))
(m_item->ItemType == ItemTypeLargeThrowing) ||
(m_item->ItemType == ItemTypeSmallThrowing))
return true;
return false;
@@ -1201,7 +1201,7 @@ int16 Inventory::FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size, boo
if (inst && inst->IsType(ItemClassContainer)
&& inst->GetItem()->BagSize >= min_size)
{
if(inst->GetItem()->BagType == BagType_Quiver && inst->GetItem()->ItemType != ItemTypeArrow)
if(inst->GetItem()->BagType == BagTypeQuiver && inst->GetItem()->ItemType != ItemTypeArrow)
{
continue;
}
@@ -1790,26 +1790,26 @@ int16 Inventory::CalcSlotFromMaterial(uint8 material)
{
switch(material)
{
case MATERIAL_HEAD:
case MaterialHead:
return SLOT_HEAD;
case MATERIAL_CHEST:
case MaterialChest:
return SLOT_CHEST;
case MATERIAL_ARMS:
case MaterialArms:
return SLOT_ARMS;
case MATERIAL_BRACER:
case MaterialWrist:
return SLOT_BRACER01; // there's 2 bracers, only one bracer material
case MATERIAL_HANDS:
case MaterialHands:
return SLOT_HANDS;
case MATERIAL_LEGS:
case MaterialLegs:
return SLOT_LEGS;
case MATERIAL_FEET:
case MaterialFeet:
return SLOT_FEET;
case MATERIAL_PRIMARY:
case MaterialPrimary:
return SLOT_PRIMARY;
case MATERIAL_SECONDARY:
case MaterialSecondary:
return SLOT_SECONDARY;
default:
return -1;
return SLOT_INVALID;
}
}
@@ -1818,26 +1818,26 @@ uint8 Inventory::CalcMaterialFromSlot(int16 equipslot)
switch(equipslot)
{
case SLOT_HEAD:
return MATERIAL_HEAD;
return MaterialHead;
case SLOT_CHEST:
return MATERIAL_CHEST;
return MaterialChest;
case SLOT_ARMS:
return MATERIAL_ARMS;
return MaterialArms;
case SLOT_BRACER01:
case SLOT_BRACER02:
return MATERIAL_BRACER;
return MaterialWrist;
case SLOT_HANDS:
return MATERIAL_HANDS;
return MaterialHands;
case SLOT_LEGS:
return MATERIAL_LEGS;
return MaterialLegs;
case SLOT_FEET:
return MATERIAL_FEET;
return MaterialFeet;
case SLOT_PRIMARY:
return MATERIAL_PRIMARY;
return MaterialPrimary;
case SLOT_SECONDARY:
return MATERIAL_SECONDARY;
return MaterialSecondary;
default:
return 0xFF;
return _MaterialInvalid;
}
}
@@ -1861,9 +1861,9 @@ bool Inventory::CanItemFitInContainer(const Item_Struct *ItemToTry, const Item_S
if(ItemToTry->Size > Container->BagSize) return false;
if((Container->BagType == BagType_Quiver) && (ItemToTry->ItemType != ItemTypeArrow)) return false;
if((Container->BagType == BagTypeQuiver) && (ItemToTry->ItemType != ItemTypeArrow)) return false;
if((Container->BagType == BagType_Bandolier) && (ItemToTry->ItemType != ItemTypeThrowingv2)) return false;
if((Container->BagType == BagTypeBandolier) && (ItemToTry->ItemType != ItemTypeSmallThrowing)) return false;
return true;
}
+12 -10
View File
@@ -39,13 +39,15 @@ class EvolveInfo; // Stores information about an evolving item family
#include "../common/timer.h"
// Helper typedefs
typedef std::list<ItemInst*>::const_iterator iter_queue;
typedef std::list<ItemInst*>::const_iterator iter_queue;
typedef std::map<int16, ItemInst*>::const_iterator iter_inst;
typedef std::map<uint8, ItemInst*>::const_iterator iter_contents;
namespace ItemField {
enum {
source=0,
namespace ItemField
{
enum
{
source = 0,
#define F(x) x,
#include "item_fieldlist.h"
#undef F
@@ -69,10 +71,10 @@ namespace ItemField {
#define MAX_ITEMS_PER_BAG 10
// Specifies usage type for item inside ItemInst
enum ItemUseType
enum ItemInstTypes
{
ItemUseNormal,
ItemUseWorldContainer
ItemInstNormal = 0,
ItemInstWorldContainer
};
typedef enum {
@@ -263,7 +265,7 @@ public:
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
ItemInst(ItemUseType use_type) {
ItemInst(ItemInstTypes use_type) {
m_use_type = use_type;
m_item = nullptr;
m_charges = 0;
@@ -285,7 +287,7 @@ public:
~ItemInst();
// Query item type
bool IsType(ItemClass item_class) const;
bool IsType(ItemClassTypes item_class) const;
// Can item be stacked?
bool IsStackable() const;
@@ -421,7 +423,7 @@ protected:
void _PutItem(uint8 index, ItemInst* inst) { m_contents[index] = inst; }
ItemUseType m_use_type; // Usage type for item
ItemInstTypes m_use_type; // Usage type for item
const Item_Struct* m_item; // Ptr to item data
int16 m_charges; // # of charges for chargeable items
uint32 m_price; // Bazaar /trader price
+1 -1
View File
@@ -539,7 +539,7 @@ bool TCPConnection::Process() {
if (!RecvData(errbuf)) {
struct in_addr in;
in.s_addr = GetrIP();
//cout << inet_ntoa(in) << ":" << GetrPort() << ": " << errbuf << endl;
//std::cout << inet_ntoa(in) << ":" << GetrPort() << ": " << errbuf << std::endl;
return false;
}
/* we break to do the send */
+1 -1
View File
@@ -91,7 +91,7 @@ protected:
T *data = *cur;
if (data->IsFree() && (!data->CheckNetActive())) {
#if EQN_DEBUG >= 4
cout << "TCPConnection Connection deleted." << endl;
std::cout << "TCPConnection Connection deleted." << std::endl;
#endif
delete data;
cur = m_list.erase(cur);
+3 -3
View File
@@ -199,18 +199,18 @@ bool Database::CheckBannedIPs(const char* loginIP)
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
//cout << "Checking against Banned IPs table."<< endl; //Lieka: Debugging
//std::cout << "Checking against Banned IPs table."<< std::endl; //Lieka: Debugging
if (RunQuery(query, MakeAnyLenString(&query, "SELECT ip_address FROM Banned_IPs WHERE ip_address='%s'", loginIP), errbuf, &result)) {
safe_delete_array(query);
if (mysql_num_rows(result) != 0)
{
//cout << loginIP << " was present in the banned IPs table" << endl; //Lieka: Debugging
//std::cout << loginIP << " was present in the banned IPs table" << std::endl; //Lieka: Debugging
mysql_free_result(result);
return true;
}
else
{
//cout << loginIP << " was not present in the banned IPs table." << endl; //Lieka: Debugging
//std::cout << loginIP << " was not present in the banned IPs table." << std::endl; //Lieka: Debugging
mysql_free_result(result);
return false;
}
+140 -39
View File
@@ -18,48 +18,149 @@
#ifndef DEITY_H
#define DEITY_H
#include "types.h"
#include <string>
// NOTE: This code is not fully implemented since there are no references in the existing code
/*
** Diety List
** Diety types
**
** (ref: eqstr_us.txt)
**
** (Another orphaned enumeration...)
*/
#define DEITY_AGNOSTIC 396 //drop the high bit for 140
#define DEITY_BRELL 202
#define DEITY_CAZIC 203
#define DEITY_EROLLSI 204
#define DEITY_BRISTLE 205
#define DEITY_INNY 206
#define DEITY_KARANA 207
#define DEITY_MITH 208
#define DEITY_PREXUS 209
#define DEITY_QUELLIOUS 210
#define DEITY_RALLOS 211
#define DEITY_SOLUSEK 213
#define DEITY_TRIBUNAL 214
#define DEITY_TUNARE 215
enum DeityTypes
{
/*----*/ DeityUnknown = 0,
/*----*/ DeityAgnostic_LB = 140,
/*3251*/ DeityBertoxxulous = 201,
/*3262*/ DeityBrellSirilis,
/*3253*/ DeityCazicThule,
/*3256*/ DeityErollisiMarr,
/*3252*/ DeityBristlebane,
/*3254*/ DeityInnoruuk,
/*3255*/ DeityKarana,
/*3257*/ DeityMithanielMarr,
/*3259*/ DeityPrexus,
/*3260*/ DeityQuellious,
/*3266*/ DeityRallosZek,
/*3258*/ DeityRodcetNife,
/*3261*/ DeitySolusekRo,
/*3263*/ DeityTheTribunal,
/*3264*/ DeityTunare,
/*3265*/ DeityVeeshan,
/*3250*/ DeityAgnostic = 396
};
//Guessed:
#define DEITY_BERTOX 201
#define DEITY_RODCET 212
#define DEITY_VEESHAN 216
/* on items:
*All 0
AGNOSTIC 1
BERTOX 2
BRELL 4
CAZIC 8
EROLLSI 16
BRISTLE 32
INNY 64
KARANA 128
MITH 256
PREXUS 512
QUELLIOUS 1024
RALLOS 2048
RODCET 4096
SOLUSEK 8192
TRIBUNAL 16384
TUNARE 32768
VEESHAN 65536
/*
** Deity type bits
**
** (New orphan, but make use of it!)
*/
enum DeityTypeBits : uint32
{
BIT_DeityAll = 0x00000000,
BIT_DeityAgnostic = 0x00000001,
BIT_DeityBertoxxulous = 0x00000002,
BIT_DeityBrellSirilis = 0x00000004,
BIT_DeityCazicThule = 0x00000008,
BIT_DeityErollisiMarr = 0x00000010,
BIT_DeityBristlebane = 0x00000020,
BIT_DeityInnoruuk = 0x00000040,
BIT_DeityKarana = 0x00000080,
BIT_DeityMithanielMarr = 0x00000100,
BIT_DeityPrexus = 0x00000200,
BIT_DeityQuellious = 0x00000400,
BIT_DeityRallosZek = 0x00000800,
BIT_DeityRodcetNife = 0x00001000,
BIT_DeitySolusekRo = 0x00002000,
BIT_DeityTheTribunal = 0x00004000,
BIT_DeityTunare = 0x00008000,
BIT_DeityVeeshan = 0x00010000
};
static DeityTypeBits ConvertDeityToBitDeity(DeityTypes deity)
{
switch(deity)
{
case DeityBertoxxulous: { return BIT_DeityBertoxxulous; }
case DeityBrellSirilis: { return BIT_DeityBrellSirilis; }
case DeityCazicThule: { return BIT_DeityCazicThule; }
case DeityErollisiMarr: { return BIT_DeityErollisiMarr; }
case DeityBristlebane: { return BIT_DeityBristlebane; }
case DeityInnoruuk: { return BIT_DeityInnoruuk; }
case DeityKarana: { return BIT_DeityKarana; }
case DeityMithanielMarr: { return BIT_DeityMithanielMarr; }
case DeityPrexus: { return BIT_DeityPrexus; }
case DeityQuellious: { return BIT_DeityQuellious; }
case DeityRallosZek: { return BIT_DeityRallosZek; }
case DeityRodcetNife: { return BIT_DeityRodcetNife; }
case DeitySolusekRo: { return BIT_DeitySolusekRo; }
case DeityTheTribunal: { return BIT_DeityTheTribunal; }
case DeityTunare: { return BIT_DeityTunare; }
case DeityVeeshan: { return BIT_DeityVeeshan; }
case DeityAgnostic_LB:
case DeityAgnostic: { return BIT_DeityAgnostic; }
default: { break; }
};
return BIT_DeityAll;
};
static DeityTypes ConvertBitDeityToDeity(DeityTypeBits deity_bit)
{
switch(deity_bit)
{
case BIT_DeityAgnostic: { return DeityAgnostic; }
case BIT_DeityBertoxxulous: { return DeityBertoxxulous; }
case BIT_DeityBrellSirilis: { return DeityBrellSirilis; }
case BIT_DeityCazicThule: { return DeityCazicThule; }
case BIT_DeityErollisiMarr: { return DeityErollisiMarr; }
case BIT_DeityBristlebane: { return DeityBristlebane; }
case BIT_DeityInnoruuk: { return DeityInnoruuk; }
case BIT_DeityKarana: { return DeityKarana; }
case BIT_DeityMithanielMarr: { return DeityMithanielMarr; }
case BIT_DeityPrexus: { return DeityPrexus; }
case BIT_DeityQuellious: { return DeityQuellious; }
case BIT_DeityRallosZek: { return DeityRallosZek; }
case BIT_DeityRodcetNife: { return DeityRodcetNife; }
case BIT_DeitySolusekRo: { return DeitySolusekRo; }
case BIT_DeityTheTribunal: { return DeityTheTribunal; }
case BIT_DeityTunare: { return DeityTunare; }
case BIT_DeityVeeshan: { return DeityVeeshan; }
default: { break; }
};
return DeityUnknown;
};
static std::string GetDeityName(DeityTypes deity)
{
switch(deity)
{
case DeityBertoxxulous: { return "Bertoxxulous"; }
case DeityBrellSirilis: { return "Brell Serilis"; }
case DeityCazicThule: { return "Cazic-Thule"; }
case DeityErollisiMarr: { return "Erollisi Marr"; }
case DeityBristlebane: { return "Bristlebane"; }
case DeityInnoruuk: { return "Innoruuk"; }
case DeityKarana: { return "Karana"; }
case DeityMithanielMarr: { return "Mithaniel Marr"; }
case DeityPrexus: { return "Prexus"; }
case DeityQuellious: { return "Quellious"; }
case DeityRallosZek: { return "Rallos Zek"; }
case DeityRodcetNife: { return "Rodcet Nife"; }
case DeitySolusekRo: { return "Solusek Ro"; }
case DeityTheTribunal: { return "The Tribunal"; }
case DeityTunare: { return "Tunare"; }
case DeityVeeshan: { return "Veeshan"; }
case DeityAgnostic_LB:
case DeityAgnostic: { return "Agnostic"; }
default: { break; }
};
return "Unknown";
};
#endif
+268 -245
View File
@@ -27,150 +27,186 @@
*/
enum ItemAttributes : uint32
{
ItemAttr_None = 0x00000000,
ItemAttr_Lore = 0x00000001,
ItemAttr_Artifact = 0x00000002,
ItemAttr_Summoned = 0x00000004,
ItemAttr_Magic = 0x00000008,
ItemAttr_Augment = 0x00000010,
ItemAttr_PendingLore = 0x00000020,
ItemAttr_Unknown = 0xFFFFFFFF
ItemAttrNone = 0x00000000,
ItemAttrLore = 0x00000001,
ItemAttrArtifact = 0x00000002,
ItemAttrSummoned = 0x00000004,
ItemAttrMagic = 0x00000008,
ItemAttrAugment = 0x00000010,
ItemAttrPendingLore = 0x00000020,
ItemAttrUnknown = 0xFFFFFFFF
};
/*
** Item types
** Item class types
**
*/
enum ItemClass
enum ItemClassTypes
{
ItemClassCommon = 0,
ItemClassContainer = 1,
ItemClassBook = 2
ItemClassCommon = 0,
ItemClassContainer,
ItemClassBook,
_ItemClassCount
};
/*
** Item uses
** Item use types
**
** (ref: database and eqstr_us.txt)
**
** (Looking at a recent database, it's possible that some of the item values may be off [10-27-2013] -U)
*/
enum ItemTypes
enum ItemUseTypes : uint8
{
ItemType1HS = 0,
ItemType2HS = 1,
ItemTypePierce = 2,
ItemType1HB = 3,
ItemType2HB = 4,
ItemTypeBow = 5,
//6
ItemTypeThrowing = 7,
ItemTypeShield = 8,
//9
ItemTypeArmor = 10,
ItemTypeUnknon = 11, //A lot of random crap has this item use.
ItemTypeLockPick = 12,
ItemTypeFood = 14,
ItemTypeDrink = 15,
ItemTypeLightSource = 16,
ItemTypeStackable = 17, //Not all stackable items are this use...
ItemTypeBandage = 18,
ItemTypeThrowingv2 = 19,
ItemTypeSpell = 20, //spells and tomes
ItemTypePotion = 21,
ItemTypeWindInstr = 23,
ItemTypeStringInstr = 24,
ItemTypeBrassInstr = 25,
ItemTypeDrumInstr = 26,
ItemTypeArrow = 27,
ItemTypeJewlery = 29,
ItemTypeSkull = 30,
ItemTypeTome = 31,
ItemTypeNote = 32,
ItemTypeKey = 33,
ItemTypeCoin = 34,
ItemType2HPierce = 35,
ItemTypeFishingPole = 36,
ItemTypeFishingBait = 37,
ItemTypeAlcohol = 38,
ItemTypeCompass = 40,
ItemTypePoison = 42, //might be wrong, but includes poisons
ItemTypeHand2Hand = 45,
ItemUseSinging = 50,
ItemUseAllInstruments = 51,
ItemTypeCharm = 52,
ItemTypeAugment = 54,
ItemTypeAugmentSolvent = 55,
ItemTypeAugmentDistill = 56
/*9138*/ ItemType1HSlash = 0,
/*9141*/ ItemType2HSlash,
/*9140*/ ItemType1HPiercing,
/*9139*/ ItemType1HBlunt,
/*9142*/ ItemType2HBlunt,
/*5504*/ ItemTypeBow,
/*----*/ ItemTypeUnknown1,
/*----*/ ItemTypeLargeThrowing,
/*5505*/ ItemTypeShield,
/*5506*/ ItemTypeScroll,
/*5507*/ ItemTypeArmor,
/*5508*/ ItemTypeMisc, // a lot of random crap has this item use.
/*7564*/ ItemTypeLockPick,
/*----*/ ItemTypeUnknown2,
/*5509*/ ItemTypeFood,
/*5510*/ ItemTypeDrink,
/*5511*/ ItemTypeLight,
/*5512*/ ItemTypeCombinable, // not all stackable items are this use...
/*5513*/ ItemTypeBandage,
/*----*/ ItemTypeSmallThrowing,
/*----*/ ItemTypeSpell, // spells and tomes
/*5514*/ ItemTypePotion,
/*----*/ ItemTypeUnknown3,
/*0406*/ ItemTypeWindInstrument,
/*0407*/ ItemTypeStringedInstrument,
/*0408*/ ItemTypeBrassInstrument,
/*0405*/ ItemTypePercussionInstrument,
/*5515*/ ItemTypeArrow,
/*----*/ ItemTypeUnknown4,
/*5521*/ ItemTypeJewelry,
/*----*/ ItemTypeSkull,
/*5516*/ ItemTypeBook, // skill-up tomes/books? (would probably need a pp flag if true...)
/*5517*/ ItemTypeNote,
/*5518*/ ItemTypeKey,
/*----*/ ItemTypeCoin,
/*5520*/ ItemType2HPiercing,
/*----*/ ItemTypeFishingPole,
/*----*/ ItemTypeFishingBait,
/*5519*/ ItemTypeAlcohol,
/*----*/ ItemTypeKey2, // keys and satchels?? (questable keys?)
/*----*/ ItemTypeCompass,
/*----*/ ItemTypeUnknown5,
/*----*/ ItemTypePoison, // might be wrong, but includes poisons
/*----*/ ItemTypeUnknown6,
/*----*/ ItemTypeUnknown7,
/*5522*/ ItemTypeMartial,
/*----*/ ItemTypeUnknown8,
/*----*/ ItemTypeUnknown9,
/*----*/ ItemTypeUnknown10,
/*----*/ ItemTypeUnknown11,
/*----*/ ItemTypeSinging,
/*5750*/ ItemTypeAllInstrumentTypes,
/*5776*/ ItemTypeCharm,
/*----*/ ItemTypeDye,
/*----*/ ItemTypeAugmentation,
/*----*/ ItemTypeAugmentationSolvent,
/*----*/ ItemTypeAugmentationDistiller,
/*----*/ ItemTypeUnknown12,
/*----*/ ItemTypeFellowshipKit,
/*----*/ ItemTypeUnknown13,
/*----*/ ItemTypeRecipe,
/*----*/ ItemTypeAdvancedRecipe,
/*----*/ ItemTypeJournal, // only one(1) database entry
/*----*/ ItemTypeAltCurrency, // alt-currency (as opposed to coinage)
/*5881*/ ItemTypePerfectedAugmentationDistiller,
/*----*/ _ItemTypeCount
/*
Unknowns:
Mounts?
Ornamentations?
GuildBanners?
Collectible?
Placeable?
(others?)
*/
};
/*
** Container types
** Container use types
**
** This correlates to world 'object.type' (object.h/Object.cpp) as well as Item_Struct.BagType
**
** (ref: database, web forums and eqstr_us.txt)
*/
enum ContainerTypes : uint8
enum ContainerUseTypes : uint8
{
/*3400*/ BagType_SmallBag = 0,
/*3401*/ BagType_LargeBag,
/*3402*/ BagType_Quiver,
/*3403*/ BagType_BeltPouch,
/*3404*/ BagType_WristPouch,
/*3405*/ BagType_BackPack,
/*3406*/ BagType_SmallChest,
/*3407*/ BagType_LargeChest,
/*----*/ BagType_Bandolier, // <*Database Reference Only>
/*3408*/ BagType_MedicineBag,
/*3409*/ BagType_ToolBox,
/*3410*/ BagType_Lexicon,
/*3411*/ BagType_Mortar,
/*3412*/ BagType_SelfDusting, // Quest container (Auto-clear contents?)
/*3413*/ BagType_MixingBowl,
/*3414*/ BagType_Oven,
/*3415*/ BagType_SewingKit,
/*3416*/ BagType_Forge,
/*3417*/ BagType_FletchingKit,
/*3418*/ BagType_BrewBarrel,
/*3419*/ BagType_JewelersKit,
/*3420*/ BagType_PotteryWheel,
/*3421*/ BagType_Kiln,
/*3422*/ BagType_Keymaker, // (no database entries as of peq rev 69)
/*3423*/ BagType_WizardsLexicon,
/*3424*/ BagType_MagesLexicon,
/*3425*/ BagType_NecromancersLexicon,
/*3426*/ BagType_EnchantersLexicon,
/*----*/ BagType_Unknown01, // (a coin pouch/purse?) (no database entries as of peq rev 69)
/*----*/ BagType_ConcordanceofResearch, // <*Database Reference Only>
/*3427*/ BagType_AlwaysWorks, // Quest container (Never-fail combines?)
/*3428*/ BagType_KoadaDalForge, // High Elf
/*3429*/ BagType_TeirDalForge, // Dark Elf
/*3430*/ BagType_OggokForge, // Ogre
/*3431*/ BagType_StormguardForge, // Dwarf
/*3432*/ BagType_AkanonForge, // Gnome
/*3433*/ BagType_NorthmanForge, // Barbarian
/*----*/ BagType_Unknown02, // (no database entries as of peq rev 69)
/*3434*/ BagType_CabilisForge, // Iksar
/*3435*/ BagType_FreeportForge, // Human 1
/*3436*/ BagType_RoyalQeynosForge, // Human 2
/*3439*/ BagType_HalflingTailoringKit,
/*3438*/ BagType_ErudTailoringKit,
/*3440*/ BagType_FierDalTailoringKit, // Wood Elf
/*3441*/ BagType_FierDalFletchingKit, // Wood Elf
/*3437*/ BagType_IksarPotteryWheel,
/*3442*/ BagType_TackleBox,
/*3443*/ BagType_TrollForge,
/*3445*/ BagType_FierDalForge, // Wood Elf
/*3444*/ BagType_ValeForge, // Halfling
/*3446*/ BagType_ErudForge,
/*----*/ BagType_TradersSatchel, // <*Database Reference Only> (db: Yellow Trader's Satchel Token?)
/*5785*/ BagType_GuktaForge, // Froglok (no database entries as of peq rev 69)
/*3359*/ BagType_AugmentationSealer,
/*----*/ BagType_IceCreamChurn, // <*Database Reference Only>
/*6325*/ BagType_Transformationmold, // Ornamentation
/*6340*/ BagType_Detransformationmold, // Ornamentation Stripper
/*5400*/ BagType_Unattuner,
/*7684*/ BagType_TradeskillBag,
/*7692*/ BagType_CollectibleBag,
/*----*/ BagType_Count
/*3400*/ BagTypeSmallBag = 0,
/*3401*/ BagTypeLargeBag,
/*3402*/ BagTypeQuiver,
/*3403*/ BagTypeBeltPouch,
/*3404*/ BagTypeWristPouch,
/*3405*/ BagTypeBackPack,
/*3406*/ BagTypeSmallChest,
/*3407*/ BagTypeLargeChest,
/*----*/ BagTypeBandolier, // <*Database Reference Only>
/*3408*/ BagTypeMedicineBag,
/*3409*/ BagTypeToolBox,
/*3410*/ BagTypeLexicon,
/*3411*/ BagTypeMortar,
/*3412*/ BagTypeSelfDusting, // Quest container (Auto-clear contents?)
/*3413*/ BagTypeMixingBowl,
/*3414*/ BagTypeOven,
/*3415*/ BagTypeSewingKit,
/*3416*/ BagTypeForge,
/*3417*/ BagTypeFletchingKit,
/*3418*/ BagTypeBrewBarrel,
/*3419*/ BagTypeJewelersKit,
/*3420*/ BagTypePotteryWheel,
/*3421*/ BagTypeKiln,
/*3422*/ BagTypeKeymaker, // (no database entries as of peq rev 69)
/*3423*/ BagTypeWizardsLexicon,
/*3424*/ BagTypeMagesLexicon,
/*3425*/ BagTypeNecromancersLexicon,
/*3426*/ BagTypeEnchantersLexicon,
/*----*/ BagTypeUnknown1, // (a coin pouch/purse?) (no database entries as of peq rev 69)
/*----*/ BagTypeConcordanceofResearch, // <*Database Reference Only>
/*3427*/ BagTypeAlwaysWorks, // Quest container (Never-fail combines?)
/*3428*/ BagTypeKoadaDalForge, // High Elf
/*3429*/ BagTypeTeirDalForge, // Dark Elf
/*3430*/ BagTypeOggokForge, // Ogre
/*3431*/ BagTypeStormguardForge, // Dwarf
/*3432*/ BagTypeAkanonForge, // Gnome
/*3433*/ BagTypeNorthmanForge, // Barbarian
/*----*/ BagTypeUnknown2, // (no database entries as of peq rev 69)
/*3434*/ BagTypeCabilisForge, // Iksar
/*3435*/ BagTypeFreeportForge, // Human 1
/*3436*/ BagTypeRoyalQeynosForge, // Human 2
/*3439*/ BagTypeHalflingTailoringKit,
/*3438*/ BagTypeErudTailoringKit,
/*3440*/ BagTypeFierDalTailoringKit, // Wood Elf
/*3441*/ BagTypeFierDalFletchingKit, // Wood Elf
/*3437*/ BagTypeIksarPotteryWheel,
/*3442*/ BagTypeTackleBox,
/*3443*/ BagTypeTrollForge,
/*3445*/ BagTypeFierDalForge, // Wood Elf
/*3444*/ BagTypeValeForge, // Halfling
/*3446*/ BagTypeErudForge,
/*----*/ BagTypeTradersSatchel, // <*Database Reference Only> (db: Yellow Trader's Satchel Token?)
/*5785*/ BagTypeGuktaForge, // Froglok (no database entries as of peq rev 69)
/*3359*/ BagTypeAugmentationSealer,
/*----*/ BagTypeIceCreamChurn, // <*Database Reference Only>
/*6325*/ BagTypeTransformationmold, // Ornamentation
/*6340*/ BagTypeDetransformationmold, // Ornamentation Stripper
/*5400*/ BagTypeUnattuner,
/*7684*/ BagTypeTradeskillBag,
/*7692*/ BagTypeCollectibleBag,
/*----*/ _BagTypeCount
};
/*
@@ -230,35 +266,6 @@ typedef enum {
_eaMaxAppearance
} EmuAppearance;
/*
** Diety types
**
** (ref: eqstr_us.txt)
**
** (Another orphaned enumeration...)
*/
enum DeityTypes
{
/*----*/ Deity_Unknown = 0,
/*3251*/ Deity_Bertoxxulous = 201,
/*3262*/ Deity_BrellSirilis,
/*3253*/ Deity_CazicThule,
/*3256*/ Deity_ErollisiMarr,
/*3252*/ Deity_Bristlebane,
/*3254*/ Deity_Innoruuk,
/*3255*/ Deity_Karana,
/*3257*/ Deity_MithanielMarr,
/*3259*/ Deity_Prexus,
/*3260*/ Deity_Quellious,
/*3266*/ Deity_RallosZek,
/*3258*/ Deity_RodcetNife,
/*3261*/ Deity_SolusekRo,
/*3263*/ Deity_TheTribunal,
/*3264*/ Deity_Tunare,
/*3265*/ Deity_Veeshan,
/*3250*/ Deity_Agnostic = 396
};
// msg_type's for custom usercolors
#define MT_Say 256
#define MT_Tell 257
@@ -526,7 +533,8 @@ enum RecastTimerTypes
RecTimer_16,
RecTimer_17,
RecTimer_18,
RecTimer_ModRod // 19
RecTimer_ModRod, // 19
_RecTimerCount
};
enum GroupUpdateAction
@@ -539,101 +547,116 @@ enum GroupUpdateAction
GUA_Started = 9
};
//0x1c is something...
static const uint8 FallingDamageType = 0xFC;
static const uint8 SpellDamageType = 0xe7;
static const uint8 DamageTypeUnknown = 0xFF;
static const uint8 DamageTypeSomething = 0x1C; //0x1c is something...
static const uint8 DamageTypeFalling = 0xFC;
static const uint8 DamageTypeSpell = 0xE7;
static const uint8 DamageTypeUnknown = 0xFF;
//indexed by 'SkillType'
static const uint8 SkillDamageTypes[HIGHEST_SKILL+1] = {
/* _1H_BLUNT */ 0,
/* _1H_SLASHING */ 1,
/* _2H_BLUNT */ 0,
/* _2H_SLASHING */ 1,
/* ABJURE */ SpellDamageType,
/* ALTERATION */ SpellDamageType,
/* APPLY_POISON */ DamageTypeUnknown,
/* ARCHERY */ 7,
/* BACKSTAB */ 8,
/* BIND_WOUND */ DamageTypeUnknown,
/* BASH */ 10,
/* BLOCKSKILL */ DamageTypeUnknown,
/* BRASS_INSTRUMENTS */ SpellDamageType,
/* CHANNELING */ DamageTypeUnknown,
/* CONJURATION */ SpellDamageType,
/* DEFENSE */ DamageTypeUnknown,
/* DISARM */ DamageTypeUnknown,
/* DISARM_TRAPS */ DamageTypeUnknown,
/* DIVINATION */ SpellDamageType,
/* DODGE */ DamageTypeUnknown,
/* DOUBLE_ATTACK */ DamageTypeUnknown,
/* DRAGON_PUNCH */ 21,
/* DUAL_WIELD */ DamageTypeUnknown,
/* EAGLE_STRIKE */ 23,
/* EVOCATION */ SpellDamageType,
/* FEIGN_DEATH */ 4,
/* FLYING_KICK */ 30,
/* FORAGE */ DamageTypeUnknown,
/* HAND_TO_HAND */ 4,
/* HIDE */ DamageTypeUnknown,
/* KICK */ 30,
/* MEDITATE */ DamageTypeUnknown,
/* MEND */ DamageTypeUnknown,
/* OFFENSE */ DamageTypeUnknown,
/* PARRY */ DamageTypeUnknown,
/* PICK_LOCK */ DamageTypeUnknown,
/* PIERCING */ 36,
/* RIPOSTE */ DamageTypeUnknown,
/* ROUND_KICK */ 30,
/* SAFE_FALL */ DamageTypeUnknown,
/* SENSE_HEADING */ DamageTypeUnknown,
/* SINGING */ SpellDamageType,
/* SNEAK */ DamageTypeUnknown,
/* SPECIALIZE_ABJURE */ DamageTypeUnknown,
/* SPECIALIZE_ALTERATION */ DamageTypeUnknown,
/* SPECIALIZE_CONJURATION */ DamageTypeUnknown,
/* SPECIALIZE_DIVINATION */ DamageTypeUnknown,
/* SPECIALIZE_EVOCATION */ DamageTypeUnknown,
/* PICK_POCKETS */ DamageTypeUnknown,
/* STRINGED_INSTRUMENTS */ SpellDamageType,
/* SWIMMING */ DamageTypeUnknown,
/* THROWING */ 51,
/* TIGER_CLAW */ 23,
/* TRACKING */ DamageTypeUnknown,
/* WIND_INSTRUMENTS */ SpellDamageType,
/* FISHING */ DamageTypeUnknown,
/* MAKE_POISON */ DamageTypeUnknown,
/* TINKERING */ DamageTypeUnknown,
/* RESEARCH */ DamageTypeUnknown,
/* ALCHEMY */ DamageTypeUnknown,
/* BAKING */ DamageTypeUnknown,
/* TAILORING */ DamageTypeUnknown,
/* SENSE_TRAPS */ DamageTypeUnknown,
/* BLACKSMITHING */ DamageTypeUnknown,
/* FLETCHING */ DamageTypeUnknown,
/* BREWING */ DamageTypeUnknown,
/* ALCOHOL_TOLERANCE */ DamageTypeUnknown,
/* BEGGING */ DamageTypeUnknown,
/* JEWELRY_MAKING */ DamageTypeUnknown,
/* POTTERY */ DamageTypeUnknown,
/* PERCUSSION_INSTRUMENTS */ SpellDamageType,
/* INTIMIDATION */ DamageTypeUnknown,
/* BERSERKING */ DamageTypeUnknown,
/* TAUNT */ DamageTypeUnknown,
/* FRENZY */ 74
/*
** Skill damage types
**
** (indexed by 'Skill' of SkillUseTypes)
*/
static const uint8 SkillDamageTypes[HIGHEST_SKILL + 1] = // change to _SkillServerArraySize once activated
{
/*1HBlunt*/ 0,
/*1HSlashing*/ 1,
/*2HBlunt*/ 0,
/*2HSlashing*/ 1,
/*Abjuration*/ DamageTypeSpell,
/*Alteration*/ DamageTypeSpell,
/*ApplyPoison*/ DamageTypeUnknown,
/*Archery*/ 7,
/*Backstab*/ 8,
/*BindWound*/ DamageTypeUnknown,
/*Bash*/ 10,
/*Block*/ DamageTypeUnknown,
/*BrassInstruments*/ DamageTypeSpell,
/*Channeling*/ DamageTypeUnknown,
/*Conjuration*/ DamageTypeSpell,
/*Defense*/ DamageTypeUnknown,
/*Disarm*/ DamageTypeUnknown,
/*DisarmTraps*/ DamageTypeUnknown,
/*Divination*/ DamageTypeSpell,
/*Dodge*/ DamageTypeUnknown,
/*DoubleAttack*/ DamageTypeUnknown,
/*DragonPunch*/ 21,
/*DualWield*/ DamageTypeUnknown,
/*EagleStrike*/ 23,
/*Evocation*/ DamageTypeSpell,
/*FeignDeath*/ 4,
/*FlyingKick*/ 30,
/*Forage*/ DamageTypeUnknown,
/*HandtoHand*/ 4,
/*Hide*/ DamageTypeUnknown,
/*Kick*/ 30,
/*Meditate*/ DamageTypeUnknown,
/*Mend*/ DamageTypeUnknown,
/*Offense*/ DamageTypeUnknown,
/*Parry*/ DamageTypeUnknown,
/*PickLock*/ DamageTypeUnknown,
/*1HPiercing*/ 36,
/*Riposte*/ DamageTypeUnknown,
/*RoundKick*/ 30,
/*SafeFall*/ DamageTypeUnknown,
/*SsenseHeading*/ DamageTypeUnknown,
/*Singing*/ DamageTypeSpell,
/*Sneak*/ DamageTypeUnknown,
/*SpecializeAbjure*/ DamageTypeUnknown,
/*SpecializeAlteration*/ DamageTypeUnknown,
/*SpecializeConjuration*/ DamageTypeUnknown,
/*SpecializeDivination*/ DamageTypeUnknown,
/*SpecializeEvocation*/ DamageTypeUnknown,
/*PickPockets*/ DamageTypeUnknown,
/*StringedInstruments*/ DamageTypeSpell,
/*Swimming*/ DamageTypeUnknown,
/*Throwing*/ 51,
/*TigerClaw*/ 23,
/*Tracking*/ DamageTypeUnknown,
/*WindInstruments*/ DamageTypeSpell,
/*Fishing*/ DamageTypeUnknown,
/*MakePoison*/ DamageTypeUnknown,
/*Tinkering*/ DamageTypeUnknown,
/*Research*/ DamageTypeUnknown,
/*Alchemy*/ DamageTypeUnknown,
/*Baking*/ DamageTypeUnknown,
/*Tailoring*/ DamageTypeUnknown,
/*SenseTraps*/ DamageTypeUnknown,
/*Blacksmithing*/ DamageTypeUnknown,
/*Fletching*/ DamageTypeUnknown,
/*Brewing*/ DamageTypeUnknown,
/*AlcoholTolerance*/ DamageTypeUnknown,
/*Begging*/ DamageTypeUnknown,
/*JewelryMaking*/ DamageTypeUnknown,
/*Pottery*/ DamageTypeUnknown,
/*PercussionInstruments*/ DamageTypeSpell,
/*Intimidation*/ DamageTypeUnknown,
/*Berserking*/ DamageTypeUnknown,
/*Taunt*/ DamageTypeUnknown,
/*Frenzy*/ 74 //,
// /*RemoveTrap*/ DamageTypeUnknown, // Needs research (set for SenseTrap value)
// /*TripleAttack*/ DamageTypeUnknown, // Needs research (set for DoubleAttack value)
// /*2HPiercing*/ 36 // Needs research (set for 1HPiercing value - similar to slash/blunt)
};
// Indexing positions into item material arrays
#define MATERIAL_HEAD 0
#define MATERIAL_CHEST 1
#define MATERIAL_ARMS 2
#define MATERIAL_BRACER 3
#define MATERIAL_HANDS 4
#define MATERIAL_LEGS 5
#define MATERIAL_FEET 6
#define MATERIAL_PRIMARY 7
#define MATERIAL_SECONDARY 8
#define MAX_MATERIALS 9 //number of equipables
/*
** Material use slots
**
*/
enum MaterialUseSlots : uint8
{
MaterialHead = 0,
MaterialChest,
MaterialArms,
MaterialWrist,
MaterialHands,
MaterialLegs,
MaterialFeet,
MaterialPrimary,
MaterialSecondary,
_MaterialCount,
_MaterialInvalid = 255
};
// Used for worn NPC inventory tracking. NPCs don't use
// augments, so only the basic slots need to be kept track of.
+11 -11
View File
@@ -270,7 +270,7 @@ struct Spawn_Struct {
/*0225*/ uint32 equip_primary; // Equipment: Primary Visual
/*0229*/ uint32 equip_secondary; // Equipment: Secondary Visual
} equip;
/*0197*/ uint32 equipment[MAX_MATERIALS]; // Array elements correspond to struct equipment above
/*0197*/ uint32 equipment[_MaterialCount]; // Array elements correspond to struct equipment above
};
/*0233*/ float runspeed; // Speed when running
/*0036*/ uint8 afk; // 0=no, 1=afk
@@ -316,7 +316,7 @@ union
/*0376*/ Color_Struct color_primary; // Color of primary item
/*0380*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0348*/ Color_Struct colors[MAX_MATERIALS]; // Array elements correspond to struct equipment_colors above
/*0348*/ Color_Struct colors[_MaterialCount]; // Array elements correspond to struct equipment_colors above
};
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
/*0385*/
@@ -787,7 +787,7 @@ struct SuspendedMinion_Struct
/*002*/ uint32 HP;
/*006*/ uint32 Mana;
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
/*510*/ uint32 Items[MAX_MATERIALS];
/*510*/ uint32 Items[_MaterialCount];
/*546*/ char Name[64];
/*610*/
};
@@ -802,7 +802,7 @@ struct SuspendedMinion_Struct
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 480; // Increased to 480 to support SoF
static const uint32 MAX_PP_MEMSPELL = 9;
static const uint32 MAX_PP_SKILL = 75;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 240;
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -892,9 +892,9 @@ struct PlayerProfile_Struct
/*0304*/ uint8 ability_time_minutes;
/*0305*/ uint8 ability_time_hours; //place holder
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
/*0312*/ uint32 item_material[MAX_MATERIALS]; // Item texture/material of worn/held items
/*0312*/ uint32 item_material[_MaterialCount]; // Item texture/material of worn/held items
/*0348*/ uint8 unknown0348[44];
/*0392*/ Color_Struct item_tint[MAX_MATERIALS];
/*0392*/ Color_Struct item_tint[_MaterialCount];
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
/*2348*/ float unknown2384; //seen ~128, ~47
/*2352*/ char servername[32]; // length probably not right
@@ -940,9 +940,9 @@ struct PlayerProfile_Struct
/*4760*/ int32 silver_cursor; // Silver on cursor
/*4764*/ int32 copper_cursor; // Copper on cursor
/*4768*/ int32 platinum_shared; // Platinum shared between characters
/*4772*/ uint8 unknown4808[24]; // @bp unknown skills?
/*4796*/ uint32 skills[MAX_PP_SKILL];
/*5096*/ uint8 unknown5132[284]; // @bp unknown skills?
/*4772*/ uint8 unknown4808[24];
/*4796*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
/*5196*/ uint8 unknown5132[184];
/*5380*/ uint32 pvp2; //
/*5384*/ uint32 unknown5420; //
/*5388*/ uint32 pvptype; //
@@ -2013,7 +2013,7 @@ struct Illusion_Struct { //size: 256 - SoF
/*092*/ uint32 drakkin_heritage; //
/*096*/ uint32 drakkin_tattoo; //
/*100*/ uint32 drakkin_details; //
/*104*/ uint32 armor_tint[MAX_MATERIALS]; //
/*104*/ uint32 armor_tint[_MaterialCount]; //
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
/*142*/ uint8 unknown138[114]; //
@@ -3257,7 +3257,7 @@ struct DyeStruct
struct Color_Struct secondary; // or this
}
dyes;
struct Color_Struct dye[MAX_MATERIALS];
struct Color_Struct dye[_MaterialCount];
};
};
+2 -2
View File
@@ -144,7 +144,7 @@ bool EQTime::saveFile(const char *filename)
return false;
}
//Enable for debugging
//cout << "SAVE: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << endl;
//std::cout << "SAVE: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << std::endl;
of << EQT_VERSION << std::endl;
of << (long)eqTime.start_eqtime.day << std::endl;
of << (long)eqTime.start_eqtime.hour << std::endl;
@@ -194,7 +194,7 @@ bool EQTime::loadFile(const char *filename)
in.ignore(80, '\n');
in >> eqTime.start_realtime;
//Enable for debugging...
//cout << "LOAD: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << endl;
//std::cout << "LOAD: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << std::endl;
in.close();
return true;
}
+1 -1
View File
@@ -41,7 +41,7 @@ struct ExtendedProfile_Struct {
uint16 old_pet_hp;
uint16 old_pet_mana;
SpellBuff_Struct pet_buffs[BUFF_COUNT];
uint32 pet_items[MAX_MATERIALS];
uint32 pet_items[_MaterialCount];
char merc_name[64];
uint32 aa_effects;
+1 -1
View File
@@ -337,7 +337,7 @@ ListElement<TYPE>::ListElement(const TYPE& d)
template<class TYPE>
ListElement<TYPE>::~ListElement()
{
// cout << "ListElement<TYPE>::~ListElement()" << endl;
// std::cout << "ListElement<TYPE>::~ListElement()" << std::endl;
if (data != 0)
safe_delete(data);
+1 -1
View File
@@ -78,7 +78,7 @@ void DumpPacketHex(const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
else {
ascii[j++] = '.';
}
// cout << setfill(0) << setw(2) << hex << (int)buf[i] << " ";
// std::cout << std::setfill(0) << std::setw(2) << std::hex << (int)buf[i] << " "; // unknown intent [CODEBUG]
}
uint32 k = ((i-skip)-1)%cols;
if (k < 8)
+2 -2
View File
@@ -80,7 +80,7 @@ void oldFileDumpPacketHex(const char* filename, const uchar* buf, uint32 size, u
}
sprintf(output, "%02X ",(unsigned char)buf[i]);
logfile << output;
// logfile << setfill(0) << setw(2) << hex << (int)buf[i] << " ";
//logfile << std::setfill(0) << std::setw(2) << std::hex << (int)buf[i] << " "; // unknown intent [CODEBUG]
}
logfile << std::endl << std::endl;
}
@@ -115,7 +115,7 @@ void FileDumpPacketHex(const char* filename, const uchar* buf, uint32 size, uint
else {
ascii[j++] = '.';
}
// logfile << setfill(0) << setw(2) << hex << (int)buf[i] << " ";
//logfile << std::setfill(0) << std::setw(2) << std::hex << (int)buf[i] << " "; // unknown intent [CODEBUG]
}
uint32 k = ((i-skip)-1)%cols;
if (k < 8)
+3 -1
View File
@@ -265,7 +265,9 @@ ENCODE(OP_PlayerProfile) {
OUT(gold_cursor);
OUT(silver_cursor);
OUT(copper_cursor);
OUT_array(skills, structs::MAX_PP_SKILL);
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
OUT(toxicity);
OUT(thirst_level);
OUT(hunger_level);
+4 -4
View File
@@ -626,7 +626,7 @@ struct RaidLeadershipAA_Struct {
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 400;
static const uint32 MAX_PP_MEMSPELL = 9;
static const uint32 MAX_PP_SKILL = 75;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 240;
static const uint32 MAX_GROUP_MEMBERS = 6;
struct PlayerProfile_Struct
@@ -722,9 +722,9 @@ struct PlayerProfile_Struct
/*4760*/ int32 silver_cursor; // Silver on cursor
/*4764*/ int32 copper_cursor; // Copper on cursor
/*4768*/ int32 platinum_shared; // Platinum shared between characters
/*4772*/ uint8 unknown3812[24]; // @bp unknown skills?
/*4796*/ uint32 skills[MAX_PP_SKILL];
/*5096*/ uint8 unknown5096[284]; // @bp unknown skills?
/*4772*/ uint8 unknown3812[24];
/*4796*/ uint32 skills[MAX_PP_SKILL]; // 100 dword buffer
/*5196*/ uint8 unknown5096[184];
/*5380*/ uint32 pvp2; //
/*5384*/ uint32 unknown4420; //
/*5388*/ uint32 pvptype; //
+7 -4
View File
@@ -717,7 +717,7 @@ ENCODE(OP_SendCharInfo) {
eq2->gender = emu->gender[r];
eq2->face = emu->face[r];
int k;
for(k = 0; k < MAX_MATERIALS; k++) {
for(k = 0; k < _MaterialCount; k++) {
eq2->equip[k].equip0 = emu->equip[r][k];
eq2->equip[k].equip1 = 0;
eq2->equip[k].equip2 = 0;
@@ -1020,16 +1020,19 @@ ENCODE(OP_PlayerProfile)
outapp->WriteUInt32(structs::MAX_PP_SKILL);
for(uint32 r = 0; r < MAX_PP_SKILL; r++)
for(uint32 r = 0; r < structs::MAX_PP_SKILL; r++)
{
outapp->WriteUInt32(emu->skills[r]);
}
// deprecated
// Write zeroes for the rest of the skills
/*
for(uint32 r = 0; r < structs::MAX_PP_SKILL - MAX_PP_SKILL; r++)
{
outapp->WriteUInt32(emu->skills[r]);
}
*/
outapp->WriteUInt32(25); // Unknown count
@@ -2015,13 +2018,13 @@ ENCODE(OP_ZoneSpawns)
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MATERIAL_PRIMARY]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MATERIAL_SECONDARY]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
+1 -1
View File
@@ -112,7 +112,7 @@ static const uint32 MAX_NUMBER_GUILDS = 1500;
static const uint32 MAX_PP_LANGUAGE = 32; // was 25
static const uint32 MAX_PP_SPELLBOOK = 720; // was 480
static const uint32 MAX_PP_MEMSPELL = 16; // was 12
static const uint32 MAX_PP_SKILL = 100; // was 75
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 300;
static const uint32 MAX_PP_DISCIPLINES = 200; // was 100
static const uint32 MAX_GROUP_MEMBERS = 6;
+6 -4
View File
@@ -335,7 +335,7 @@ ENCODE(OP_SendCharInfo) {
eq2->haircolor = emu->haircolor[r];
eq2->face = emu->face[r];
int k;
for(k = 0; k < MAX_MATERIALS; k++) {
for(k = 0; k < _MaterialCount; k++) {
eq2->equip[k].equip0 = emu->equip[r][k];
eq2->equip[k].equip1 = 0;
eq2->equip[k].itemid = 0;
@@ -535,7 +535,9 @@ ENCODE(OP_PlayerProfile) {
OUT(gold_cursor);
OUT(silver_cursor);
OUT(copper_cursor);
OUT_array(skills, structs::MAX_PP_SKILL);
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
// OUT(unknown04760[236]);
OUT(toxicity);
OUT(thirst_level);
@@ -1216,11 +1218,11 @@ ENCODE(OP_ZoneSpawns) {
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MATERIAL_PRIMARY]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MATERIAL_SECONDARY]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
}
+3 -3
View File
@@ -740,7 +740,7 @@ struct BindStruct {
static const uint32 MAX_PP_LANGUAGE = 25; //
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
static const uint32 MAX_PP_SKILL = 75;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -860,8 +860,8 @@ struct PlayerProfile_Struct
/*06484*/ uint32 gold_cursor; // Gold Pieces on cursor
/*06488*/ uint32 silver_cursor; // Silver Pieces on cursor
/*06492*/ uint32 copper_cursor; // Copper Pieces on cursor
/*06496*/ uint32 skills[MAX_PP_SKILL]; // [300] List of skills
/*06796*/ uint8 unknown04760[236];
/*06496*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
/*06896*/ uint8 unknown04760[136];
/*07032*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
/*07036*/ uint32 thirst_level; // Drink (ticks till next drink)
/*07040*/ uint32 hunger_level; // Food (ticks till next eat)
+4 -2
View File
@@ -334,7 +334,7 @@ ENCODE(OP_SendCharInfo) {
eq2->haircolor = emu->haircolor[r];
eq2->face = emu->face[r];
int k;
for(k = 0; k < MAX_MATERIALS; k++) {
for(k = 0; k < _MaterialCount; k++) {
eq2->equip[k].equip0 = emu->equip[r][k];
eq2->equip[k].equip1 = 0;
eq2->equip[k].itemid = 0;
@@ -534,7 +534,9 @@ ENCODE(OP_PlayerProfile) {
OUT(gold_cursor);
OUT(silver_cursor);
OUT(copper_cursor);
OUT_array(skills, structs::MAX_PP_SKILL);
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
// OUT(unknown04760[236]);
OUT(toxicity);
OUT(thirst_level);
+3 -3
View File
@@ -718,7 +718,7 @@ struct BindStruct {
static const uint32 MAX_PP_LANGUAGE = 25; //
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
static const uint32 MAX_PP_SKILL = 75;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -837,8 +837,8 @@ struct PlayerProfile_Struct //23576 Octets
/*06484*/ uint32 gold_cursor; // Gold Pieces on cursor
/*06488*/ uint32 silver_cursor; // Silver Pieces on cursor
/*06492*/ uint32 copper_cursor; // Copper Pieces on cursor
/*06496*/ uint32 skills[MAX_PP_SKILL]; // [300] List of skills
/*06796*/ uint8 unknown04760[236];
/*06496*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
/*06896*/ uint8 unknown04760[136];
/*07032*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
/*07036*/ uint32 thirst_level; // Drink (ticks till next drink)
/*07040*/ uint32 hunger_level; // Food (ticks till next eat)
+3 -1
View File
@@ -269,7 +269,9 @@ ENCODE(OP_PlayerProfile) {
OUT(gold_cursor);
OUT(silver_cursor);
OUT(copper_cursor);
OUT_array(skills, structs::MAX_PP_SKILL);
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
// OUT(unknown04760[236]);
OUT(toxicity);
OUT(thirst_level);
+3 -3
View File
@@ -648,7 +648,7 @@ struct BindStruct {
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 400;
static const uint32 MAX_PP_MEMSPELL = 9;
static const uint32 MAX_PP_SKILL = 75;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 240;
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -752,8 +752,8 @@ struct PlayerProfile_Struct
/*04448*/ uint32 gold_cursor; // Gold Pieces on cursor
/*04452*/ uint32 silver_cursor; // Silver Pieces on cursor
/*04456*/ uint32 copper_cursor; // Copper Pieces on cursor
/*04460*/ uint32 skills[MAX_PP_SKILL]; // List of skills
/*04760*/ uint8 unknown04760[236];
/*04460*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
/*04860*/ uint8 unknown04760[136];
/*04996*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
/*05000*/ uint32 thirst_level; // Drink (ticks till next drink)
/*05004*/ uint32 hunger_level; // Food (ticks till next eat)
+6 -4
View File
@@ -336,7 +336,7 @@ ENCODE(OP_SendCharInfo) {
eq2->haircolor = emu->haircolor[r];
eq2->face = emu->face[r];
int k;
for(k = 0; k < MAX_MATERIALS; k++) {
for(k = 0; k < _MaterialCount; k++) {
eq2->equip[k].equip0 = emu->equip[r][k];
eq2->equip[k].equip1 = 0;
eq2->equip[k].itemid = 0;
@@ -549,7 +549,9 @@ ENCODE(OP_PlayerProfile) {
OUT(gold_cursor);
OUT(silver_cursor);
OUT(copper_cursor);
OUT_array(skills, structs::MAX_PP_SKILL);
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
// OUT(unknown04760[236]);
OUT(toxicity);
OUT(thirst_level);
@@ -1228,11 +1230,11 @@ ENCODE(OP_ZoneSpawns) {
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MATERIAL_PRIMARY]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MATERIAL_SECONDARY]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary]);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
}
+3 -3
View File
@@ -764,7 +764,7 @@ struct BindStruct {
static const uint32 MAX_PP_LANGUAGE = 25; //
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Underfoot now
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Underfoot
static const uint32 MAX_PP_SKILL = 75;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -886,8 +886,8 @@ struct PlayerProfile_Struct
/*07332*/ uint32 gold_cursor; // Gold Pieces on cursor
/*07336*/ uint32 silver_cursor; // Silver Pieces on cursor
/*07340*/ uint32 copper_cursor; // Copper Pieces on cursor
/*07344*/ uint32 skills[MAX_PP_SKILL]; // [300] List of skills
/*07644*/ uint8 unknown07644[236];
/*07344*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
/*07744*/ uint8 unknown07644[136];
/*07880*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
/*07884*/ uint32 thirst_level; // Drink (ticks till next drink)
/*07888*/ uint32 hunger_level; // Food (ticks till next eat)
+1 -1
View File
@@ -57,7 +57,7 @@ public:
return;
for (i=0; i<len; i++) {
// cout << i << ": 0x" << hex << (int) message[i] << dec << " " << message[i] << endl;
// std::cout << i << ": 0x" << std::hex << (int) message[i] << std::dec << " " << message[i] << std::endl; // undefined cout [CODEBUG]
if (inarg) {
if ((inquote == false && (message[i] == div || message[i] == div2 || message[i] == div3)) || (inquote && (message[i] == '\'' || message[i] == '\"') && (message[i+1] == div || message[i+1] == div2 || message[i+1] == div3 || message[i+1] == 0))) {
inquote = false;
+4 -4
View File
@@ -1476,7 +1476,7 @@ void SharedDatabase::LoadSkillCaps(void *data) {
}
}
uint16 SharedDatabase::GetSkillCap(uint8 Class_, SkillType Skill, uint8 Level) {
uint16 SharedDatabase::GetSkillCap(uint8 Class_, SkillUseTypes Skill, uint8 Level) {
if(!skill_caps_mmf) {
return 0;
}
@@ -1505,7 +1505,7 @@ uint16 SharedDatabase::GetSkillCap(uint8 Class_, SkillType Skill, uint8 Level) {
return skill_caps_table[index];
}
uint8 SharedDatabase::GetTrainLevel(uint8 Class_, SkillType Skill, uint8 Level) {
uint8 SharedDatabase::GetTrainLevel(uint8 Class_, SkillUseTypes Skill, uint8 Level) {
if(!skill_caps_mmf) {
return 0;
}
@@ -1683,9 +1683,9 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].basediff=atoi(row[99]);
int tmp_skill = atoi(row[100]);;
if(tmp_skill < 0 || tmp_skill > HIGHEST_SKILL)
sp[tempid].skill = BEGGING; /* not much better we can do. */
sp[tempid].skill = SkillBegging; /* not much better we can do. */ // can probably be changed to client-based 'SkillNone' once activated
else
sp[tempid].skill = (SkillType) tmp_skill;
sp[tempid].skill = (SkillUseTypes) tmp_skill;
sp[tempid].zonetype=atoi(row[101]);
sp[tempid].EnvironmentType=atoi(row[102]);
sp[tempid].TimeOfDay=atoi(row[103]);
+2 -2
View File
@@ -104,8 +104,8 @@ public:
void LoadSkillCaps(void *data);
bool LoadSkillCaps();
uint16 GetSkillCap(uint8 Class_, SkillType Skill, uint8 Level);
uint8 GetTrainLevel(uint8 Class_, SkillType Skill, uint8 Level);
uint16 GetSkillCap(uint8 Class_, SkillUseTypes Skill, uint8 Level);
uint8 GetTrainLevel(uint8 Class_, SkillUseTypes Skill, uint8 Level);
int GetMaxSpellID();
void LoadSpells(void *data, int max_spells);
+160 -2
View File
@@ -18,7 +18,165 @@
#ifndef SKILLS_H
#define SKILLS_H
// Correct Skill Numbers as of 4-14-2002
/*
** This is really messed up... Are we using SkillTypes as a pseudo repository? The 76th skill really throws
** things for standardization...
**
** Below is an attempt to clean this up a little...
*/
/*
** Skill use types
**
** (ref: eqstr_us.txt [05-10-2013])
*/
enum SkillUseTypes : uint32
{
/*13855*/ Skill1HBlunt = 0,
/*13856*/ Skill1HSlashing,
/*13857*/ Skill2HBlunt,
/*13858*/ Skill2HSlashing,
/*13859*/ SkillAbjuration,
/*13861*/ SkillAlteration,
/*13862*/ SkillApplyPoison,
/*13863*/ SkillArchery,
/*13864*/ SkillBackstab,
/*13866*/ SkillBindWound,
/*13867*/ SkillBash,
/*13871*/ SkillBlock,
/*13872*/ SkillBrassInstruments,
/*13874*/ SkillChanneling,
/*13875*/ SkillConjuration,
/*13876*/ SkillDefense,
/*13877*/ SkillDisarm,
/*13878*/ SkillDisarmTraps,
/*13879*/ SkillDivination,
/*13880*/ SkillDodge,
/*13881*/ SkillDoubleAttack,
/*13882*/ SkillDragonPunch, /*13924 SkillTailRake*/
/*13883*/ SkillDualWield,
/*13884*/ SkillEagleStrike,
/*13885*/ SkillEvocation,
/*13886*/ SkillFeignDeath,
/*13888*/ SkillFlyingKick,
/*13889*/ SkillForage,
/*13890*/ SkillHandtoHand,
/*13891*/ SkillHide,
/*13893*/ SkillKick,
/*13894*/ SkillMeditate,
/*13895*/ SkillMend,
/*13896*/ SkillOffense,
/*13897*/ SkillParry,
/*13899*/ SkillPickLock,
/*13900*/ Skill1HPiercing, // Changed in RoF2(05-10-2013)
/*13903*/ SkillRiposte,
/*13904*/ SkillRoundKick,
/*13905*/ SkillSafeFall,
/*13906*/ SkillSenseHeading,
/*13908*/ SkillSinging,
/*13909*/ SkillSneak,
/*13910*/ SkillSpecializeAbjure, // No idea why they truncated this one..especially when there are longer ones...
/*13911*/ SkillSpecializeAlteration,
/*13912*/ SkillSpecializeConjuration,
/*13913*/ SkillSpecializeDivination,
/*13914*/ SkillSpecializeEvocation,
/*13915*/ SkillPickPockets,
/*13916*/ SkillStringedInstruments,
/*13917*/ SkillSwimming,
/*13919*/ SkillThrowing,
/*13920*/ SkillTigerClaw,
/*13921*/ SkillTracking,
/*13923*/ SkillWindInstruments,
/*13854*/ SkillFishing,
/*13853*/ SkillMakePoison,
/*13852*/ SkillTinkering,
/*13851*/ SkillResearch,
/*13850*/ SkillAlchemy,
/*13865*/ SkillBaking,
/*13918*/ SkillTailoring,
/*13907*/ SkillSenseTraps,
/*13870*/ SkillBlacksmithing,
/*13887*/ SkillFletching,
/*13873*/ SkillBrewing,
/*13860*/ SkillAlcoholTolerance,
/*13868*/ SkillBegging,
/*13892*/ SkillJewelryMaking,
/*13901*/ SkillPottery,
/*13898*/ SkillPercussionInstruments,
/*13922*/ SkillIntimidation,
/*13869*/ SkillBerserking,
/*13902*/ SkillTaunt,
/*05837*/ SkillFrenzy, // This appears to be the only listed one not grouped with the others
// SoF+ specific skills
// /*03670*/ SkillRemoveTraps,
// /*13049*/ SkillTripleAttack,
// RoF2+ specific skills
// /*00789*/ Skill2HPiercing,
// /*01216*/ SkillNone, // This needs to move down as new skills are added
// Skill Counts
// /*-----*/ _SkillCount_62 = 75, // use for Ti and earlier max skill checks
// /*-----*/ _SkillCount_SoF = 77, // use for SoF thru RoF1 max skill checks
// /*-----*/ _SkillCount_RoF2 = 78, // use for RoF2 max skill checks
// Support values
// /*-----*/ _SkillServerArraySize = _SkillCount_RoF2, // Should reflect last client '_SkillCount'
/*-----*/ _SkillPacketArraySize = 100, // Currently supported clients appear to iterate full 100 dword buffer range
// Superfluous additions to SkillUseTypes..server-use only
// /*-----*/ ExtSkillGenericTradeskill = 100
/* ([EQClientVersion] [0] - Unknown, [3] - SoF, [7] - RoF2[05-10-2013])
[Skill] [index] | [0] [1] [2] [3] [4] [5] [6] [7]
Frenzy (05837) | --- 074 074 074 074 074 074 074
Remove Traps (03670) | --- --- --- 075 075 075 075 075
Triple Attack (13049) | --- --- --- 076 076 076 076 076
2H Piercing (00789) | --- --- --- --- --- --- --- 077
*/
/*
[SkillCaps.txt] (SoF+)
a^b^c^d(^e) (^e is RoF+, but cursory glance appears to be all zeros)
a - Class
b - Skill
c - Level
d - Max Value
(e - Unknown)
*/
/*
NOTE: Disregard this until it is sorted out
I changed (tradeskill==75) to ExtSkillGenericTradeskill in tradeskills.cpp for both instances. If it's a pseudo-enumeration of
an AA ability, then use the 'ExtSkill' ('ExtentedSkill') prefix with a value >= 100. (current implementation)
We probably need to recode ALL of the skill checks to use the new Skill2HPiercing and ensure that the animation value is
properly changed in the patch files. As far as earlier clients using this new skill, it can be done, but we just need to ensure
that skill address is not inadvertently passed to the client..and we can just send an actual message for the skill-up. Use of a
command can tell the player what that particular skill value is.
Nothing on SkillTripleAttack just yet..haven't looked into its current implementation.
In addition to the above re-coding, we're probably going to need to rework the database pp blob to reserve space for the current
100-dword buffer allocation. This way, we can just add new ones without having to rework it each time.
-U
*/
};
// temporary until it can be sorted out...
#define HIGHEST_SKILL SkillFrenzy
// TODO: add string return for skill names
/*
** Old typedef enumeration
**
*/
/* Correct Skill Numbers as of 4-14-2002
typedef enum {
_1H_BLUNT = 0,
_1H_SLASHING = 1,
@@ -99,6 +257,6 @@ typedef enum {
} SkillType;
#define HIGHEST_SKILL FRENZY
*/
#endif
+1 -1
View File
@@ -641,7 +641,7 @@ struct SPDat_Spell_Struct
/* 086 */ int effectid[EFFECT_COUNT]; // Spell's effects
/* 098 */ SpellTargetType targettype; // Spell's Target
/* 099 */ int basediff; // base difficulty fizzle adjustment
/* 100 */ SkillType skill;
/* 100 */ SkillUseTypes skill;
/* 101 */ int8 zonetype; // 01=Outdoors, 02=dungeons, ff=Any
/* 102 */ int8 EnvironmentType;
/* 103 */ int8 TimeOfDay;