mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-28 09:45:45 +00:00
Compare commits
330 Commits
event_loop
...
2002_fixes
| Author | SHA1 | Date | |
|---|---|---|---|
| a3f21cc9ea | |||
| 3c9e6d913a | |||
| 153e587cea | |||
| fbb13ec416 | |||
| e7785d5693 | |||
| 23bc535e23 | |||
| d04d6750a2 | |||
| 9c08d6f25b | |||
| f8d000d660 | |||
| b2c6bb4df5 | |||
| 542d0795c4 | |||
| c3b7f6d0bf | |||
| 21e53a3cd0 | |||
| 2d24237aac | |||
| 750e65f847 | |||
| 3ce99d9f00 | |||
| 598196329d | |||
| 31cc6f63d6 | |||
| bbfacd902c | |||
| 5cfb3111a6 | |||
| 5b674f23bd | |||
| 81cadf3bb2 | |||
| 54c28117a8 | |||
| 79f9433dfa | |||
| 67a95b59a7 | |||
| 09b9d398e2 | |||
| 3dd0d43e96 | |||
| 8d1fe63e77 | |||
| 3fa72218a4 | |||
| f3f034d948 | |||
| bd364a4049 | |||
| 41b1634199 | |||
| 0159e1cc72 | |||
| ab372b0f6b | |||
| 14d09485eb | |||
| 8cd6416754 | |||
| 4fad93824b | |||
| fe70834a6b | |||
| 17b5cc1fa5 | |||
| 04ce4f66ed | |||
| 5b24cbde5d | |||
| 3555791e1f | |||
| 262bcf5c29 | |||
| 226a49cb42 | |||
| bf3d9b2d02 | |||
| 3d229e1da1 | |||
| df5d58f43d | |||
| 37d22e17a3 | |||
| 999650d368 | |||
| 09bbfbcc31 | |||
| f26b7a4adc | |||
| becd7b5c24 | |||
| d559e9da10 | |||
| 2690d8fed8 | |||
| 7d13475bac | |||
| 2ab280bef0 | |||
| 15af28720a | |||
| 5213e4c7d4 | |||
| 12d7f242b4 | |||
| 7ac597270b | |||
| 05ca4669a9 | |||
| a7cbe2f60e | |||
| 52d79f89a9 | |||
| a8a1c3f809 | |||
| 24bae49401 | |||
| bf239f9691 | |||
| 666513c4ab | |||
| 1b2df18cea | |||
| b1be667884 | |||
| 91ae6a6613 | |||
| 303f056075 | |||
| ec9af74dc9 | |||
| a49e3d6471 | |||
| 9ae585dd81 | |||
| 0ee3168241 | |||
| 3fd40e9449 | |||
| c61c275221 | |||
| 7a6d5d46f4 | |||
| 14a5ff399a | |||
| 31907382c8 | |||
| 5c6492bc0f | |||
| 0968ce0d60 | |||
| 171474f1d2 | |||
| 3383f65ff7 | |||
| 7621bf47c8 | |||
| 72ed770037 | |||
| 4e8a03f7b4 | |||
| 602381ebec | |||
| e098836934 | |||
| ce3fc0f2c3 | |||
| 9adfe5b9ff | |||
| b423ad0d80 | |||
| 9a157fa028 | |||
| 7db82a3b14 | |||
| 056725b9bd | |||
| 8bbf099636 | |||
| a884639534 | |||
| 8f67df1f4f | |||
| f851b1a3b4 | |||
| b41bb8e179 | |||
| d9633dfee4 | |||
| 46b19e8e6f | |||
| f0f5c41c30 | |||
| 08c2f73e37 | |||
| 9f4604ec3e | |||
| 8177f7d9bb | |||
| 4ec3fda59d | |||
| e3c8b75259 | |||
| d62a449f9c | |||
| d043c38f71 | |||
| 5b8ad902ce | |||
| ef16522473 | |||
| fe21564659 | |||
| e3173d04d4 | |||
| 92d4468326 | |||
| 0f32f780a9 | |||
| 955514c20f | |||
| ed717add29 | |||
| a7b159fe65 | |||
| 38651258fc | |||
| 4605540955 | |||
| c83bc038f3 | |||
| d3dff3760a | |||
| 9e49b2ae0f | |||
| a81212e1b4 | |||
| 57d75572b2 | |||
| d1abe4a332 | |||
| cd11d7d1af | |||
| 3d1bb6bd08 | |||
| e9c1681e2c | |||
| 5dbbc5f21c | |||
| ef8b4754ea | |||
| a13694c859 | |||
| 51eaf25ea0 | |||
| 592f9a9cb9 | |||
| 409dc3ad35 | |||
| f8f783fa46 | |||
| 1d1382cb12 | |||
| 68680ac9d8 | |||
| df1d499da6 | |||
| a6a056ad0d | |||
| b1f14e1e29 | |||
| 1999982e6a | |||
| b0ad9524bc | |||
| d8519bc270 | |||
| da9792160d | |||
| dc308e2ecb | |||
| 984a009fbb | |||
| 5d61cf5bcf | |||
| 2db6464d14 | |||
| c17ac67296 | |||
| 37e87e8cef | |||
| e300f82c28 | |||
| 05cb9d56c2 | |||
| ac0cba64f9 | |||
| 0b3b3fdc88 | |||
| 104a0998ce | |||
| cdf0d5deb0 | |||
| 36300d6df1 | |||
| 3d54a4edcb | |||
| 31de6a63cc | |||
| ae81ab8a12 | |||
| 7033d9d919 | |||
| 905e3acab3 | |||
| 2c6e11b464 | |||
| 9aba993888 | |||
| f614c35f6e | |||
| 8f21b01b7e | |||
| 591fa003c6 | |||
| f3e09abf22 | |||
| 18e6e5e5e2 | |||
| 698a814fc3 | |||
| fb820f4fec | |||
| 0d84a73e9f | |||
| b92d6c57a1 | |||
| 8c6fefa33e | |||
| e03a90b05d | |||
| c030e1ce8d | |||
| 7e49a21b3b | |||
| 9e824876ba | |||
| 891fa0411c | |||
| a4fda2a951 | |||
| ffdc933ce0 | |||
| e3f15de1f8 | |||
| 6cef5c6beb | |||
| da08a622f1 | |||
| 50a67c76e7 | |||
| 0a4ccb11aa | |||
| af4a432745 | |||
| df86e644f4 | |||
| 80ff535215 | |||
| 30157a37a2 | |||
| f5827174ee | |||
| 1d19bd11d0 | |||
| 6a2be94282 | |||
| 630ea0d3c6 | |||
| 55e78cd8e9 | |||
| a13e32498a | |||
| 18693998b9 | |||
| 908a7061cf | |||
| 648078d76c | |||
| 06279b18a3 | |||
| f53b95d141 | |||
| e680a0f704 | |||
| 019586abbd | |||
| 8f5ba05e75 | |||
| 427fb08561 | |||
| 343c23cc6c | |||
| ac0332c020 | |||
| c1fbfc0f44 | |||
| d305d67279 | |||
| 3cc7d0db63 | |||
| 1b1d8700ae | |||
| 6994157184 | |||
| bf25c65868 | |||
| 6311d82095 | |||
| 491cabfe8b | |||
| fddb6f67ab | |||
| 26985496d1 | |||
| ab0f883191 | |||
| 538ff873ee | |||
| d0e6bb6e07 | |||
| 6cbb4bcf47 | |||
| d99df2540d | |||
| f5a0b994dc | |||
| 246f770e8f | |||
| 95efc3a66c | |||
| baf9336617 | |||
| 0ab0c5c117 | |||
| c482738d79 | |||
| a4c9fa6a65 | |||
| bb8fc17189 | |||
| b61c7d0b14 | |||
| 0d9af27a03 | |||
| 3e50491619 | |||
| de92c277e0 | |||
| ffbc913b9d | |||
| 286bfa7af6 | |||
| b5e324af83 | |||
| d9e0708331 | |||
| a121675161 | |||
| bbd2796ea4 | |||
| 5a08e0ffd9 | |||
| 3dec02881a | |||
| 04c8fe7d2c | |||
| e8d80a436e | |||
| 3447c86562 | |||
| 71e641c882 | |||
| cb1d0a0bef | |||
| 34ffb5b908 | |||
| e7e379c71b | |||
| b3842ba72a | |||
| a3c16ecdbe | |||
| 72e7465e16 | |||
| 4af996e359 | |||
| 462dea67e1 | |||
| e23fd269d5 | |||
| 06e2f76c05 | |||
| b1f97712f1 | |||
| cbe53951f8 | |||
| 66f253553a | |||
| 7f4ce3faf5 | |||
| a29177de9e | |||
| a15df2ec2c | |||
| cbb7090615 | |||
| b9fefc95e8 | |||
| 60406ebcc1 | |||
| a6f5571750 | |||
| aabf7b9b5a | |||
| aa56e8aac4 | |||
| db7f0cc977 | |||
| 95064947b6 | |||
| 714464481f | |||
| 6abed18eb9 | |||
| 752821f22b | |||
| 409bad8108 | |||
| 97999a63b7 | |||
| fe968f83a3 | |||
| 9545684883 | |||
| 6e0cba566f | |||
| 16fa32e65b | |||
| e3e20a947b | |||
| d1f7448b25 | |||
| d62ceaefcc | |||
| ec548874cc | |||
| 9a225bc396 | |||
| 101002d635 | |||
| 04f4fd652b | |||
| 1cb79c8c1f | |||
| 195bc03645 | |||
| 3438247904 | |||
| 9f01d14c64 | |||
| 7071b27183 | |||
| bfd07b1010 | |||
| 8b5dd58e96 | |||
| decaadfe7d | |||
| e29ec16759 | |||
| 16642b7c4c | |||
| 2188be24e4 | |||
| 70b9ff384c | |||
| 56babc1801 | |||
| 3ba199e052 | |||
| 8496bf16ff | |||
| e86fca3aff | |||
| 46cbd147b5 | |||
| 05ed623056 | |||
| c90a436db3 | |||
| 1e865a5246 | |||
| 343c41bb18 | |||
| a5b19d0c0d | |||
| c263c4ef07 | |||
| 7b5ea9e99c | |||
| 013f7cfd21 | |||
| 379ef7eed3 | |||
| 329c9c8d98 | |||
| 4fa8c89e5c | |||
| 19b6a96063 | |||
| 6079b34a2a | |||
| 4cb7d9a352 | |||
| b04844aa94 | |||
| b15ada974f | |||
| e2587b78f5 | |||
| 06dfba3c81 | |||
| 8aa942cd27 | |||
| a9070b1327 | |||
| 745510ea75 | |||
| f6d721dd72 | |||
| 0503e85fd3 | |||
| 0232f4f672 | |||
| 56d355935b |
@@ -1,6 +1,6 @@
|
||||
# EQEmulator Core Server
|
||||
|Travis CI (Linux)|Appveyor (Windows) |
|
||||
|:---:|:---:|
|
||||
|:---:|:---:|
|
||||
|[](https://travis-ci.org/EQEmu/Server) |[](https://ci.appveyor.com/project/KimLS/server/branch/master) |
|
||||
|
||||
***
|
||||
|
||||
+391
-148
File diff suppressed because it is too large
Load Diff
+8
-20
@@ -35,9 +35,11 @@ SET(common_sources
|
||||
faction.cpp
|
||||
guild_base.cpp
|
||||
guilds.cpp
|
||||
inventory_profile.cpp
|
||||
inventory_slot.cpp
|
||||
ipc_mutex.cpp
|
||||
item.cpp
|
||||
item_base.cpp
|
||||
item_data.cpp
|
||||
item_instance.cpp
|
||||
light_source.cpp
|
||||
md5.cpp
|
||||
memory_buffer.cpp
|
||||
@@ -155,10 +157,12 @@ SET(common_headers
|
||||
global_define.h
|
||||
guild_base.h
|
||||
guilds.h
|
||||
inventory_profile.h
|
||||
inventory_slot.h
|
||||
ipc_mutex.h
|
||||
item.h
|
||||
item_base.h
|
||||
item_data.h
|
||||
item_fieldlist.h
|
||||
item_instance.h
|
||||
languages.h
|
||||
light_source.h
|
||||
linked_list.h
|
||||
@@ -212,37 +216,29 @@ SET(common_headers
|
||||
zone_numbers.h
|
||||
patches/patches.h
|
||||
patches/sod.h
|
||||
# patches/sod_itemfields.h
|
||||
patches/sod_limits.h
|
||||
patches/sod_ops.h
|
||||
patches/sod_structs.h
|
||||
patches/sof.h
|
||||
# patches/sof_itemfields.h
|
||||
patches/sof_limits.h
|
||||
# patches/sof_opcode_list.h
|
||||
patches/sof_ops.h
|
||||
patches/sof_structs.h
|
||||
patches/ss_declare.h
|
||||
patches/ss_define.h
|
||||
patches/ss_register.h
|
||||
patches/rof.h
|
||||
# patches/rof_itemfields.h
|
||||
patches/rof_limits.h
|
||||
patches/rof_ops.h
|
||||
patches/rof_structs.h
|
||||
patches/rof2.h
|
||||
# patches/rof2_itemfields.h
|
||||
patches/rof2_limits.h
|
||||
patches/rof2_ops.h
|
||||
patches/rof2_structs.h
|
||||
patches/titanium.h
|
||||
# patches/titanium_itemfields_a.h
|
||||
# patches/titanium_itemfields_b.h
|
||||
patches/titanium_limits.h
|
||||
patches/titanium_ops.h
|
||||
patches/titanium_structs.h
|
||||
patches/uf.h
|
||||
# patches/uf_itemfields.h
|
||||
patches/uf_limits.h
|
||||
patches/uf_ops.h
|
||||
patches/uf_structs.h
|
||||
@@ -266,37 +262,29 @@ SET(common_headers
|
||||
SOURCE_GROUP(Patches FILES
|
||||
patches/patches.h
|
||||
patches/sod.h
|
||||
# patches/sod_itemfields.h
|
||||
patches/sod_limits.h
|
||||
patches/sod_ops.h
|
||||
patches/sod_structs.h
|
||||
patches/sof.h
|
||||
# patches/sof_itemfields.h
|
||||
patches/sof_limits.h
|
||||
# patches/sof_opcode_list.h
|
||||
patches/sof_ops.h
|
||||
patches/sof_structs.h
|
||||
patches/ss_declare.h
|
||||
patches/ss_define.h
|
||||
patches/ss_register.h
|
||||
patches/rof.h
|
||||
# patches/rof_itemfields.h
|
||||
patches/rof_limits.h
|
||||
patches/rof_ops.h
|
||||
patches/rof_structs.h
|
||||
patches/rof2.h
|
||||
# patches/rof2_itemfields.h
|
||||
patches/rof2_limits.h
|
||||
patches/rof2_ops.h
|
||||
patches/rof2_structs.h
|
||||
patches/titanium.h
|
||||
# patches/titanium_itemfields_a.h
|
||||
# patches/titanium_itemfields_b.h
|
||||
patches/titanium_limits.h
|
||||
patches/titanium_ops.h
|
||||
patches/titanium_structs.h
|
||||
patches/uf.h
|
||||
# patches/uf_itemfields.h
|
||||
patches/uf_limits.h
|
||||
patches/uf_ops.h
|
||||
patches/uf_structs.h
|
||||
|
||||
+24
-4
@@ -307,6 +307,7 @@ bool Database::DeleteCharacter(char *name) {
|
||||
query = StringFormat("DELETE FROM `quest_globals` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||
query = StringFormat("DELETE FROM `character_activities` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||
query = StringFormat("DELETE FROM `character_enabledtasks` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||
query = StringFormat("DELETE FROM `character_tasks` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||
query = StringFormat("DELETE FROM `completed_tasks` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||
query = StringFormat("DELETE FROM `friends` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||
query = StringFormat("DELETE FROM `mail` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||
@@ -638,6 +639,13 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe
|
||||
character_id, pp->binds[4].zoneId, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading, 4
|
||||
); results = QueryDatabase(query);
|
||||
|
||||
/* HoTT Ability */
|
||||
if(RuleB(Character, GrantHoTTOnCreate))
|
||||
{
|
||||
query = StringFormat("INSERT INTO `character_leadership_abilities` (id, slot, rank) VALUES (%u, %i, %i)", character_id, 14, 1);
|
||||
results = QueryDatabase(query);
|
||||
}
|
||||
|
||||
/* Save Skills */
|
||||
int firstquery = 0;
|
||||
for (int i = 0; i < MAX_PP_SKILL; i++){
|
||||
@@ -672,7 +680,7 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe
|
||||
}
|
||||
|
||||
/* This only for new Character creation storing */
|
||||
bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv) {
|
||||
bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, EQEmu::InventoryProfile* inv) {
|
||||
uint32 charid = 0;
|
||||
char zone[50];
|
||||
float x, y, z;
|
||||
@@ -701,7 +709,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
||||
/* Insert starting inventory... */
|
||||
std::string invquery;
|
||||
for (int16 i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::BANK_BAGS_END;) {
|
||||
const ItemInst* newinv = inv->GetItem(i);
|
||||
const EQEmu::ItemInstance* newinv = inv->GetItem(i);
|
||||
if (newinv) {
|
||||
invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)",
|
||||
charid, i, newinv->GetItem()->ID, newinv->GetCharges(), newinv->GetColor());
|
||||
@@ -709,7 +717,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
||||
auto results = QueryDatabase(invquery);
|
||||
}
|
||||
|
||||
if (i == EQEmu::legacy::SlotCursor) {
|
||||
if (i == EQEmu::inventory::slotCursor) {
|
||||
i = EQEmu::legacy::GENERAL_BAGS_BEGIN;
|
||||
continue;
|
||||
}
|
||||
@@ -2147,4 +2155,16 @@ int Database::GetIPExemption(std::string account_ip) {
|
||||
}
|
||||
|
||||
return RuleI(World, MaxClientsPerIP);
|
||||
}
|
||||
}
|
||||
|
||||
int Database::GetInstanceID(uint32 char_id, uint32 zone_id) {
|
||||
std::string query = StringFormat("SELECT instance_list.id FROM instance_list INNER JOIN instance_list_player ON instance_list.id = instance_list_player.id WHERE instance_list.zone = '%i' AND instance_list_player.charid = '%i'", zone_id, char_id);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (results.Success() && results.RowCount() > 0) {
|
||||
auto row = results.begin();
|
||||
return atoi(row[0]);;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+8
-2
@@ -37,10 +37,14 @@
|
||||
//atoi is not uint32 or uint32 safe!!!!
|
||||
#define atoul(str) strtoul(str, nullptr, 10)
|
||||
|
||||
class Inventory;
|
||||
class MySQLRequestResult;
|
||||
class Client;
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
class InventoryProfile;
|
||||
}
|
||||
|
||||
struct EventLogDetails_Struct {
|
||||
uint32 id;
|
||||
char accountname[64];
|
||||
@@ -109,7 +113,7 @@ public:
|
||||
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
|
||||
bool SetHackerFlag(const char* accountname, const char* charactername, const char* hacked);
|
||||
bool SetMQDetectionFlag(const char* accountname, const char* charactername, const char* hacked, const char* zone);
|
||||
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv);
|
||||
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, EQEmu::InventoryProfile* inv);
|
||||
bool UpdateName(const char* oldname, const char* newname);
|
||||
|
||||
/* General Information Queries */
|
||||
@@ -189,6 +193,8 @@ public:
|
||||
|
||||
int GetIPExemption(std::string account_ip);
|
||||
|
||||
int GetInstanceID(uint32 char_id, uint32 zone_id);
|
||||
|
||||
|
||||
/* Groups */
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Convert {
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[EQEmu::textures::TextureCount];
|
||||
/*510*/ uint32 Items[EQEmu::textures::materialCount];
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
@@ -227,9 +227,9 @@ namespace Convert {
|
||||
/*0304*/ uint8 ability_time_minutes;
|
||||
/*0305*/ uint8 ability_time_hours; //place holder
|
||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||
/*0312*/ uint32 item_material[EQEmu::textures::TextureCount]; // Item texture/material of worn/held items
|
||||
/*0312*/ uint32 item_material[EQEmu::textures::materialCount]; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ Convert::Color_Struct item_tint[EQEmu::textures::TextureCount];
|
||||
/*0392*/ Convert::Color_Struct item_tint[EQEmu::textures::materialCount];
|
||||
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||
/*2352*/ char servername[32]; // length probably not right
|
||||
@@ -1403,7 +1403,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||
/* Run Material Color Convert */
|
||||
first_entry = 0; rquery = "";
|
||||
for (i = 0; i < EQEmu::textures::TextureCount; i++){
|
||||
for (i = EQEmu::textures::textureBegin; i < EQEmu::textures::materialCount; i++){
|
||||
if (pp->item_tint[i].color > 0){
|
||||
if (first_entry != 1){
|
||||
rquery = StringFormat("REPLACE INTO `character_material` (id, slot, blue, green, red, use_tint, color) VALUES (%u, %u, %u, %u, %u, %u, %u)", character_id, i, pp->item_tint[i].rgb.blue, pp->item_tint[i].rgb.green, pp->item_tint[i].rgb.red, pp->item_tint[i].rgb.use_tint, pp->item_tint[i].color);
|
||||
|
||||
@@ -35,6 +35,79 @@ namespace EQEmu
|
||||
//using namespace RoF2::invbag;
|
||||
//using namespace RoF2::invaug;
|
||||
|
||||
enum : int16 { typeInvalid = -1, slotInvalid = -1, containerInvalid = -1, socketInvalid = -1 }; // temporary
|
||||
enum : int16 { typeBegin = 0, slotBegin = 0, containerBegin = 0, socketBegin = 0 }; // temporary
|
||||
|
||||
enum PossessionsSlots : int16 { // temporary
|
||||
slotCharm = 0,
|
||||
slotEar1,
|
||||
slotHead,
|
||||
slotFace,
|
||||
slotEar2,
|
||||
slotNeck, // 5
|
||||
slotShoulders,
|
||||
slotArms,
|
||||
slotBack,
|
||||
slotWrist1,
|
||||
slotWrist2, // 10
|
||||
slotRange,
|
||||
slotHands,
|
||||
slotPrimary,
|
||||
slotSecondary,
|
||||
slotFinger1, // 15
|
||||
slotFinger2,
|
||||
slotChest,
|
||||
slotLegs,
|
||||
slotFeet,
|
||||
slotWaist, // 20
|
||||
slotPowerSource = 9999,
|
||||
slotAmmo = 21,
|
||||
slotGeneral1,
|
||||
slotGeneral2,
|
||||
slotGeneral3,
|
||||
slotGeneral4, // 25
|
||||
slotGeneral5,
|
||||
slotGeneral6,
|
||||
slotGeneral7,
|
||||
slotGeneral8,
|
||||
slotCursor, // 30
|
||||
slotCount
|
||||
};
|
||||
|
||||
enum InventoryTypes : int16 { // temporary
|
||||
typePossessions = 0,
|
||||
typeBank,
|
||||
typeSharedBank,
|
||||
typeTrade,
|
||||
typeWorld,
|
||||
typeLimbo, // 5
|
||||
typeTribute,
|
||||
typeTrophyTribute,
|
||||
typeGuildTribute,
|
||||
typeMerchant,
|
||||
typeDeleted, // 10
|
||||
typeCorpse,
|
||||
typeBazaar,
|
||||
typeInspect,
|
||||
typeRealEstate,
|
||||
typeViewMODPC, // 15
|
||||
typeViewMODBank,
|
||||
typeViewMODSharedBank,
|
||||
typeViewMODLimbo,
|
||||
typeAltStorage,
|
||||
typeArchived, // 20
|
||||
typeMail,
|
||||
typeGuildTrophyTribute,
|
||||
typeKrono,
|
||||
typeOther,
|
||||
typeCount
|
||||
};
|
||||
|
||||
static int16 SlotCount(int16 type_index) { return 0; } // temporary
|
||||
|
||||
const int16 ContainerCount = 10; // temporary
|
||||
const int16 SocketCount = 6; // temporary
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace constants {
|
||||
@@ -43,7 +116,16 @@ namespace EQEmu
|
||||
|
||||
const size_t SayLinkBodySize = RoF2::constants::SayLinkBodySize;
|
||||
|
||||
const int LongBuffs = RoF2::constants::LongBuffs;
|
||||
const int ShortBuffs = RoF2::constants::ShortBuffs;
|
||||
const int DiscBuffs = RoF2::constants::DiscBuffs;
|
||||
const int TotalBuffs = RoF2::constants::TotalBuffs;
|
||||
const int NPCBuffs = RoF2::constants::NPCBuffs;
|
||||
const int PetBuffs = RoF2::constants::PetBuffs;
|
||||
const int MercBuffs = RoF2::constants::MercBuffs;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
@@ -68,3 +150,9 @@ namespace EQEmu
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_EMU_CONSTANTS_H*/
|
||||
|
||||
/* hack list to prevent circular references
|
||||
|
||||
eq_limits.h:EQEmu::inventory::LookupEntry::InventoryTypeSize[n];
|
||||
|
||||
*/
|
||||
|
||||
+15
-89
@@ -61,8 +61,6 @@ namespace EQEmu
|
||||
SLOT_GENERAL_6 = 27,
|
||||
SLOT_GENERAL_7 = 28,
|
||||
SLOT_GENERAL_8 = 29,
|
||||
//SLOT_GENERAL_9 = not supported
|
||||
//SLOT_GENERAL_10 = not supported
|
||||
SLOT_CURSOR = 30,
|
||||
SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this...
|
||||
SLOT_TRADESKILL = 1000,
|
||||
@@ -96,75 +94,8 @@ namespace EQEmu
|
||||
SLOT_WORLD_END = 4009
|
||||
};
|
||||
|
||||
enum InventoryTypes : int16 {
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo, // 5
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted, // 10
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC, // 15
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived, // 20
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeKrono,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
};
|
||||
|
||||
enum PossessionsSlots : int16 {
|
||||
SlotCharm = 0,
|
||||
SlotEar1,
|
||||
SlotHead,
|
||||
SlotFace,
|
||||
SlotEar2,
|
||||
SlotNeck, // 5
|
||||
SlotShoulders,
|
||||
SlotArms,
|
||||
SlotBack,
|
||||
SlotWrist1,
|
||||
SlotWrist2, // 10
|
||||
SlotRange,
|
||||
SlotHands,
|
||||
SlotPrimary,
|
||||
SlotSecondary,
|
||||
SlotFinger1, // 15
|
||||
SlotFinger2,
|
||||
SlotChest,
|
||||
SlotLegs,
|
||||
SlotFeet,
|
||||
SlotWaist, // 20
|
||||
SlotPowerSource = 9999, // temp
|
||||
SlotAmmo = 21, // temp
|
||||
SlotGeneral1,
|
||||
SlotGeneral2,
|
||||
SlotGeneral3,
|
||||
SlotGeneral4, // 25
|
||||
SlotGeneral5,
|
||||
SlotGeneral6,
|
||||
SlotGeneral7,
|
||||
SlotGeneral8,
|
||||
//SlotGeneral9,
|
||||
//SlotGeneral10,
|
||||
SlotCursor, // 30
|
||||
SlotCount
|
||||
};
|
||||
|
||||
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = SlotCount;
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = 31;
|
||||
static const uint16 TYPE_BANK_SIZE = 24;
|
||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||
@@ -175,14 +106,14 @@ namespace EQEmu
|
||||
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||
static const uint16 TYPE_CORPSE_SIZE = SlotCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
||||
static const uint16 TYPE_CORPSE_SIZE = 31; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||
static const uint16 TYPE_INSPECT_SIZE = 22;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = 0;//NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = 0;//NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = 0;//NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = 0;//NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = 0;
|
||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||
@@ -192,12 +123,12 @@ namespace EQEmu
|
||||
|
||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
|
||||
static const int16 EQUIPMENT_BEGIN = SlotCharm;
|
||||
static const int16 EQUIPMENT_END = SlotAmmo;
|
||||
static const int16 EQUIPMENT_BEGIN = 0;
|
||||
static const int16 EQUIPMENT_END = 21;
|
||||
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
|
||||
|
||||
static const int16 GENERAL_BEGIN = SlotGeneral1;
|
||||
static const int16 GENERAL_END = SlotGeneral8;
|
||||
static const int16 GENERAL_BEGIN = 22;
|
||||
static const int16 GENERAL_END = 29;
|
||||
static const uint16 GENERAL_SIZE = 8;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
@@ -235,22 +166,17 @@ namespace EQEmu
|
||||
static const int16 TRIBUTE_SIZE = TYPE_TRIBUTE_SIZE;
|
||||
|
||||
static const int16 CORPSE_BEGIN = 22;
|
||||
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
|
||||
|
||||
// items
|
||||
// common and container sizes will not increase until the new 'location' struct is implemented
|
||||
static const uint16 ITEM_COMMON_SIZE = 6;//RoF::consts::ITEM_COMMON_SIZE;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;//Titanium::consts::ITEM_CONTAINER_SIZE;
|
||||
|
||||
// BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||
static const size_t BANDOLIERS_SIZE = 20;//RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4;//RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance
|
||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;//RoF2::consts::POTION_BELT_ITEM_COUNT;
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;//RoF2::consts::TEXT_LINK_BODY_LENGTH;
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif /* COMMON_EMU_LEGACY_H */
|
||||
|
||||
@@ -25,6 +25,9 @@ N(OP_AdventureRequest),
|
||||
N(OP_AdventureStatsReply),
|
||||
N(OP_AdventureStatsRequest),
|
||||
N(OP_AdventureUpdate),
|
||||
N(OP_AggroMeterLockTarget),
|
||||
N(OP_AggroMeterTargetInfo),
|
||||
N(OP_AggroMeterUpdate),
|
||||
N(OP_AltCurrency),
|
||||
N(OP_AltCurrencyMerchantReply),
|
||||
N(OP_AltCurrencyMerchantRequest),
|
||||
|
||||
+113
-113
@@ -127,244 +127,244 @@ uint32 EQEmu::versions::ConvertClientVersionToExpansion(ClientVersion client_ver
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::versions::IsValidInventoryVersion(InventoryVersion inventory_version)
|
||||
bool EQEmu::versions::IsValidMobVersion(MobVersion mob_version)
|
||||
{
|
||||
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastInventoryVersion)
|
||||
if (mob_version <= MobVersion::Unknown || mob_version > LastMobVersion)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::versions::IsValidPCInventoryVersion(InventoryVersion inventory_version)
|
||||
bool EQEmu::versions::IsValidPCMobVersion(MobVersion mob_version)
|
||||
{
|
||||
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastPCInventoryVersion)
|
||||
if (mob_version <= MobVersion::Unknown || mob_version > LastPCMobVersion)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::versions::IsValidNonPCInventoryVersion(InventoryVersion inventory_version)
|
||||
bool EQEmu::versions::IsValidNonPCMobVersion(MobVersion mob_version)
|
||||
{
|
||||
if (inventory_version <= LastPCInventoryVersion || inventory_version > LastNonPCInventoryVersion)
|
||||
if (mob_version <= LastPCMobVersion || mob_version > LastNonPCMobVersion)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::versions::IsValidOfflinePCInventoryVersion(InventoryVersion inventory_version)
|
||||
bool EQEmu::versions::IsValidOfflinePCMobVersion(MobVersion mob_version)
|
||||
{
|
||||
if (inventory_version <= LastNonPCInventoryVersion || inventory_version > LastOfflinePCInventoryVersion)
|
||||
if (mob_version <= LastNonPCMobVersion || mob_version > LastOfflinePCMobVersion)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
EQEmu::versions::InventoryVersion EQEmu::versions::ValidateInventoryVersion(InventoryVersion inventory_version)
|
||||
EQEmu::versions::MobVersion EQEmu::versions::ValidateMobVersion(MobVersion mob_version)
|
||||
{
|
||||
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastInventoryVersion)
|
||||
return InventoryVersion::Unknown;
|
||||
if (mob_version <= MobVersion::Unknown || mob_version > LastMobVersion)
|
||||
return MobVersion::Unknown;
|
||||
|
||||
return inventory_version;
|
||||
return mob_version;
|
||||
}
|
||||
|
||||
EQEmu::versions::InventoryVersion EQEmu::versions::ValidatePCInventoryVersion(InventoryVersion inventory_version)
|
||||
EQEmu::versions::MobVersion EQEmu::versions::ValidatePCMobVersion(MobVersion mob_version)
|
||||
{
|
||||
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastPCInventoryVersion)
|
||||
return InventoryVersion::Unknown;
|
||||
if (mob_version <= MobVersion::Unknown || mob_version > LastPCMobVersion)
|
||||
return MobVersion::Unknown;
|
||||
|
||||
return inventory_version;
|
||||
return mob_version;
|
||||
}
|
||||
|
||||
EQEmu::versions::InventoryVersion EQEmu::versions::ValidateNonPCInventoryVersion(InventoryVersion inventory_version)
|
||||
EQEmu::versions::MobVersion EQEmu::versions::ValidateNonPCMobVersion(MobVersion mob_version)
|
||||
{
|
||||
if (inventory_version <= LastPCInventoryVersion || inventory_version > LastNonPCInventoryVersion)
|
||||
return InventoryVersion::Unknown;
|
||||
if (mob_version <= LastPCMobVersion || mob_version > LastNonPCMobVersion)
|
||||
return MobVersion::Unknown;
|
||||
|
||||
return inventory_version;
|
||||
return mob_version;
|
||||
}
|
||||
|
||||
EQEmu::versions::InventoryVersion EQEmu::versions::ValidateOfflinePCInventoryVersion(InventoryVersion inventory_version)
|
||||
EQEmu::versions::MobVersion EQEmu::versions::ValidateOfflinePCMobVersion(MobVersion mob_version)
|
||||
{
|
||||
if (inventory_version <= LastNonPCInventoryVersion || inventory_version > LastOfflinePCInventoryVersion)
|
||||
return InventoryVersion::Unknown;
|
||||
if (mob_version <= LastNonPCMobVersion || mob_version > LastOfflinePCMobVersion)
|
||||
return MobVersion::Unknown;
|
||||
|
||||
return inventory_version;
|
||||
return mob_version;
|
||||
}
|
||||
|
||||
const char* EQEmu::versions::InventoryVersionName(InventoryVersion inventory_version)
|
||||
const char* EQEmu::versions::MobVersionName(MobVersion mob_version)
|
||||
{
|
||||
switch (inventory_version) {
|
||||
case InventoryVersion::Unknown:
|
||||
switch (mob_version) {
|
||||
case MobVersion::Unknown:
|
||||
return "Unknown Version";
|
||||
case InventoryVersion::Client62:
|
||||
case MobVersion::Client62:
|
||||
return "Client 6.2";
|
||||
case InventoryVersion::Titanium:
|
||||
case MobVersion::Titanium:
|
||||
return "Titanium";
|
||||
case InventoryVersion::SoF:
|
||||
case MobVersion::SoF:
|
||||
return "SoF";
|
||||
case InventoryVersion::SoD:
|
||||
case MobVersion::SoD:
|
||||
return "SoD";
|
||||
case InventoryVersion::UF:
|
||||
case MobVersion::UF:
|
||||
return "UF";
|
||||
case InventoryVersion::RoF:
|
||||
case MobVersion::RoF:
|
||||
return "RoF";
|
||||
case InventoryVersion::RoF2:
|
||||
case MobVersion::RoF2:
|
||||
return "RoF2";
|
||||
case InventoryVersion::NPC:
|
||||
case MobVersion::NPC:
|
||||
return "NPC";
|
||||
case InventoryVersion::NPCMerchant:
|
||||
case MobVersion::NPCMerchant:
|
||||
return "NPC Merchant";
|
||||
case InventoryVersion::Merc:
|
||||
case MobVersion::Merc:
|
||||
return "Merc";
|
||||
case InventoryVersion::Bot:
|
||||
case MobVersion::Bot:
|
||||
return "Bot";
|
||||
case InventoryVersion::ClientPet:
|
||||
case MobVersion::ClientPet:
|
||||
return "Client Pet";
|
||||
case InventoryVersion::NPCPet:
|
||||
case MobVersion::NPCPet:
|
||||
return "NPC Pet";
|
||||
case InventoryVersion::MercPet:
|
||||
case MobVersion::MercPet:
|
||||
return "Merc Pet";
|
||||
case InventoryVersion::BotPet:
|
||||
case MobVersion::BotPet:
|
||||
return "Bot Pet";
|
||||
case InventoryVersion::OfflineTitanium:
|
||||
case MobVersion::OfflineTitanium:
|
||||
return "Offline Titanium";
|
||||
case InventoryVersion::OfflineSoF:
|
||||
case MobVersion::OfflineSoF:
|
||||
return "Offline SoF";
|
||||
case InventoryVersion::OfflineSoD:
|
||||
case MobVersion::OfflineSoD:
|
||||
return "Offline SoD";
|
||||
case InventoryVersion::OfflineUF:
|
||||
case MobVersion::OfflineUF:
|
||||
return "Offline UF";
|
||||
case InventoryVersion::OfflineRoF:
|
||||
case MobVersion::OfflineRoF:
|
||||
return "Offline RoF";
|
||||
case InventoryVersion::OfflineRoF2:
|
||||
case MobVersion::OfflineRoF2:
|
||||
return "Offline RoF2";
|
||||
default:
|
||||
return "Invalid Version";
|
||||
};
|
||||
}
|
||||
|
||||
EQEmu::versions::ClientVersion EQEmu::versions::ConvertInventoryVersionToClientVersion(InventoryVersion inventory_version)
|
||||
EQEmu::versions::ClientVersion EQEmu::versions::ConvertMobVersionToClientVersion(MobVersion mob_version)
|
||||
{
|
||||
switch (inventory_version) {
|
||||
case InventoryVersion::Unknown:
|
||||
case InventoryVersion::Client62:
|
||||
switch (mob_version) {
|
||||
case MobVersion::Unknown:
|
||||
case MobVersion::Client62:
|
||||
return ClientVersion::Unknown;
|
||||
case InventoryVersion::Titanium:
|
||||
case MobVersion::Titanium:
|
||||
return ClientVersion::Titanium;
|
||||
case InventoryVersion::SoF:
|
||||
case MobVersion::SoF:
|
||||
return ClientVersion::SoF;
|
||||
case InventoryVersion::SoD:
|
||||
case MobVersion::SoD:
|
||||
return ClientVersion::SoD;
|
||||
case InventoryVersion::UF:
|
||||
case MobVersion::UF:
|
||||
return ClientVersion::UF;
|
||||
case InventoryVersion::RoF:
|
||||
case MobVersion::RoF:
|
||||
return ClientVersion::RoF;
|
||||
case InventoryVersion::RoF2:
|
||||
case MobVersion::RoF2:
|
||||
return ClientVersion::RoF2;
|
||||
default:
|
||||
return ClientVersion::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertClientVersionToInventoryVersion(ClientVersion client_version)
|
||||
EQEmu::versions::MobVersion EQEmu::versions::ConvertClientVersionToMobVersion(ClientVersion client_version)
|
||||
{
|
||||
switch (client_version) {
|
||||
case ClientVersion::Unknown:
|
||||
case ClientVersion::Client62:
|
||||
return InventoryVersion::Unknown;
|
||||
return MobVersion::Unknown;
|
||||
case ClientVersion::Titanium:
|
||||
return InventoryVersion::Titanium;
|
||||
return MobVersion::Titanium;
|
||||
case ClientVersion::SoF:
|
||||
return InventoryVersion::SoF;
|
||||
return MobVersion::SoF;
|
||||
case ClientVersion::SoD:
|
||||
return InventoryVersion::SoD;
|
||||
return MobVersion::SoD;
|
||||
case ClientVersion::UF:
|
||||
return InventoryVersion::UF;
|
||||
return MobVersion::UF;
|
||||
case ClientVersion::RoF:
|
||||
return InventoryVersion::RoF;
|
||||
return MobVersion::RoF;
|
||||
case ClientVersion::RoF2:
|
||||
return InventoryVersion::RoF2;
|
||||
return MobVersion::RoF2;
|
||||
default:
|
||||
return InventoryVersion::Unknown;
|
||||
return MobVersion::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertPCInventoryVersionToOfflinePCInventoryVersion(InventoryVersion inventory_version)
|
||||
EQEmu::versions::MobVersion EQEmu::versions::ConvertPCMobVersionToOfflinePCMobVersion(MobVersion mob_version)
|
||||
{
|
||||
switch (inventory_version) {
|
||||
case InventoryVersion::Titanium:
|
||||
return InventoryVersion::OfflineTitanium;
|
||||
case InventoryVersion::SoF:
|
||||
return InventoryVersion::OfflineSoF;
|
||||
case InventoryVersion::SoD:
|
||||
return InventoryVersion::OfflineSoD;
|
||||
case InventoryVersion::UF:
|
||||
return InventoryVersion::OfflineUF;
|
||||
case InventoryVersion::RoF:
|
||||
return InventoryVersion::OfflineRoF;
|
||||
case InventoryVersion::RoF2:
|
||||
return InventoryVersion::OfflineRoF2;
|
||||
switch (mob_version) {
|
||||
case MobVersion::Titanium:
|
||||
return MobVersion::OfflineTitanium;
|
||||
case MobVersion::SoF:
|
||||
return MobVersion::OfflineSoF;
|
||||
case MobVersion::SoD:
|
||||
return MobVersion::OfflineSoD;
|
||||
case MobVersion::UF:
|
||||
return MobVersion::OfflineUF;
|
||||
case MobVersion::RoF:
|
||||
return MobVersion::OfflineRoF;
|
||||
case MobVersion::RoF2:
|
||||
return MobVersion::OfflineRoF2;
|
||||
default:
|
||||
return InventoryVersion::Unknown;
|
||||
return MobVersion::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertOfflinePCInventoryVersionToPCInventoryVersion(InventoryVersion inventory_version)
|
||||
EQEmu::versions::MobVersion EQEmu::versions::ConvertOfflinePCMobVersionToPCMobVersion(MobVersion mob_version)
|
||||
{
|
||||
switch (inventory_version) {
|
||||
case InventoryVersion::OfflineTitanium:
|
||||
return InventoryVersion::Titanium;
|
||||
case InventoryVersion::OfflineSoF:
|
||||
return InventoryVersion::SoF;
|
||||
case InventoryVersion::OfflineSoD:
|
||||
return InventoryVersion::SoD;
|
||||
case InventoryVersion::OfflineUF:
|
||||
return InventoryVersion::UF;
|
||||
case InventoryVersion::OfflineRoF:
|
||||
return InventoryVersion::RoF;
|
||||
case InventoryVersion::OfflineRoF2:
|
||||
return InventoryVersion::RoF2;
|
||||
switch (mob_version) {
|
||||
case MobVersion::OfflineTitanium:
|
||||
return MobVersion::Titanium;
|
||||
case MobVersion::OfflineSoF:
|
||||
return MobVersion::SoF;
|
||||
case MobVersion::OfflineSoD:
|
||||
return MobVersion::SoD;
|
||||
case MobVersion::OfflineUF:
|
||||
return MobVersion::UF;
|
||||
case MobVersion::OfflineRoF:
|
||||
return MobVersion::RoF;
|
||||
case MobVersion::OfflineRoF2:
|
||||
return MobVersion::RoF2;
|
||||
default:
|
||||
return InventoryVersion::Unknown;
|
||||
return MobVersion::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::versions::ClientVersion EQEmu::versions::ConvertOfflinePCInventoryVersionToClientVersion(InventoryVersion inventory_version)
|
||||
EQEmu::versions::ClientVersion EQEmu::versions::ConvertOfflinePCMobVersionToClientVersion(MobVersion mob_version)
|
||||
{
|
||||
switch (inventory_version) {
|
||||
case InventoryVersion::OfflineTitanium:
|
||||
switch (mob_version) {
|
||||
case MobVersion::OfflineTitanium:
|
||||
return ClientVersion::Titanium;
|
||||
case InventoryVersion::OfflineSoF:
|
||||
case MobVersion::OfflineSoF:
|
||||
return ClientVersion::SoF;
|
||||
case InventoryVersion::OfflineSoD:
|
||||
case MobVersion::OfflineSoD:
|
||||
return ClientVersion::SoD;
|
||||
case InventoryVersion::OfflineUF:
|
||||
case MobVersion::OfflineUF:
|
||||
return ClientVersion::UF;
|
||||
case InventoryVersion::OfflineRoF:
|
||||
case MobVersion::OfflineRoF:
|
||||
return ClientVersion::RoF;
|
||||
case InventoryVersion::OfflineRoF2:
|
||||
case MobVersion::OfflineRoF2:
|
||||
return ClientVersion::RoF2;
|
||||
default:
|
||||
return ClientVersion::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertClientVersionToOfflinePCInventoryVersion(ClientVersion client_version)
|
||||
EQEmu::versions::MobVersion EQEmu::versions::ConvertClientVersionToOfflinePCMobVersion(ClientVersion client_version)
|
||||
{
|
||||
switch (client_version) {
|
||||
case ClientVersion::Titanium:
|
||||
return InventoryVersion::OfflineTitanium;
|
||||
return MobVersion::OfflineTitanium;
|
||||
case ClientVersion::SoF:
|
||||
return InventoryVersion::OfflineSoF;
|
||||
return MobVersion::OfflineSoF;
|
||||
case ClientVersion::SoD:
|
||||
return InventoryVersion::OfflineSoD;
|
||||
return MobVersion::OfflineSoD;
|
||||
case ClientVersion::UF:
|
||||
return InventoryVersion::OfflineUF;
|
||||
return MobVersion::OfflineUF;
|
||||
case ClientVersion::RoF:
|
||||
return InventoryVersion::OfflineRoF;
|
||||
return MobVersion::OfflineRoF;
|
||||
case ClientVersion::RoF2:
|
||||
return InventoryVersion::OfflineRoF2;
|
||||
return MobVersion::OfflineRoF2;
|
||||
default:
|
||||
return InventoryVersion::Unknown;
|
||||
return MobVersion::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
+27
-29
@@ -64,17 +64,15 @@ namespace EQEmu
|
||||
const ClientVersion LastClientVersion = ClientVersion::RoF2;
|
||||
const size_t ClientVersionCount = (static_cast<size_t>(LastClientVersion) + 1);
|
||||
|
||||
extern bool IsValidClientVersion(ClientVersion client_version);
|
||||
extern ClientVersion ValidateClientVersion(ClientVersion client_version);
|
||||
extern const char* ClientVersionName(ClientVersion client_version);
|
||||
extern uint32 ConvertClientVersionToClientVersionBit(ClientVersion client_version);
|
||||
extern ClientVersion ConvertClientVersionBitToClientVersion(uint32 client_version_bit);
|
||||
extern uint32 ConvertClientVersionToExpansion(ClientVersion client_version);
|
||||
bool IsValidClientVersion(ClientVersion client_version);
|
||||
ClientVersion ValidateClientVersion(ClientVersion client_version);
|
||||
const char* ClientVersionName(ClientVersion client_version);
|
||||
uint32 ConvertClientVersionToClientVersionBit(ClientVersion client_version);
|
||||
ClientVersion ConvertClientVersionBitToClientVersion(uint32 client_version_bit);
|
||||
uint32 ConvertClientVersionToExpansion(ClientVersion client_version);
|
||||
|
||||
} /*versions*/
|
||||
|
||||
namespace versions {
|
||||
enum class InventoryVersion {
|
||||
enum class MobVersion {
|
||||
Unknown = 0,
|
||||
Client62,
|
||||
Titanium,
|
||||
@@ -99,29 +97,29 @@ namespace EQEmu
|
||||
OfflineRoF2
|
||||
};
|
||||
|
||||
const InventoryVersion LastInventoryVersion = InventoryVersion::OfflineRoF2;
|
||||
const InventoryVersion LastPCInventoryVersion = InventoryVersion::RoF2;
|
||||
const InventoryVersion LastNonPCInventoryVersion = InventoryVersion::BotPet;
|
||||
const InventoryVersion LastOfflinePCInventoryVersion = InventoryVersion::OfflineRoF2;
|
||||
const size_t InventoryVersionCount = (static_cast<size_t>(LastInventoryVersion) + 1);
|
||||
const MobVersion LastMobVersion = MobVersion::OfflineRoF2;
|
||||
const MobVersion LastPCMobVersion = MobVersion::RoF2;
|
||||
const MobVersion LastNonPCMobVersion = MobVersion::BotPet;
|
||||
const MobVersion LastOfflinePCMobVersion = MobVersion::OfflineRoF2;
|
||||
const size_t MobVersionCount = (static_cast<size_t>(LastMobVersion) + 1);
|
||||
|
||||
extern bool IsValidInventoryVersion(InventoryVersion inventory_version);
|
||||
extern bool IsValidPCInventoryVersion(InventoryVersion inventory_version);
|
||||
extern bool IsValidNonPCInventoryVersion(InventoryVersion inventory_version);
|
||||
extern bool IsValidOfflinePCInventoryVersion(InventoryVersion inventory_version);
|
||||
bool IsValidMobVersion(MobVersion mob_version);
|
||||
bool IsValidPCMobVersion(MobVersion mob_version);
|
||||
bool IsValidNonPCMobVersion(MobVersion mob_version);
|
||||
bool IsValidOfflinePCMobVersion(MobVersion mob_version);
|
||||
|
||||
extern InventoryVersion ValidateInventoryVersion(InventoryVersion inventory_version);
|
||||
extern InventoryVersion ValidatePCInventoryVersion(InventoryVersion inventory_version);
|
||||
extern InventoryVersion ValidateNonPCInventoryVersion(InventoryVersion inventory_version);
|
||||
extern InventoryVersion ValidateOfflinePCInventoryVersion(InventoryVersion inventory_version);
|
||||
MobVersion ValidateMobVersion(MobVersion mob_version);
|
||||
MobVersion ValidatePCMobVersion(MobVersion mob_version);
|
||||
MobVersion ValidateNonPCMobVersion(MobVersion mob_version);
|
||||
MobVersion ValidateOfflinePCMobVersion(MobVersion mob_version);
|
||||
|
||||
extern const char* InventoryVersionName(InventoryVersion inventory_version);
|
||||
extern ClientVersion ConvertInventoryVersionToClientVersion(InventoryVersion inventory_version);
|
||||
extern InventoryVersion ConvertClientVersionToInventoryVersion(ClientVersion client_version);
|
||||
extern InventoryVersion ConvertPCInventoryVersionToOfflinePCInventoryVersion(InventoryVersion inventory_version);
|
||||
extern InventoryVersion ConvertOfflinePCInventoryVersionToPCInventoryVersion(InventoryVersion inventory_version);
|
||||
extern ClientVersion ConvertOfflinePCInventoryVersionToClientVersion(InventoryVersion inventory_version);
|
||||
extern InventoryVersion ConvertClientVersionToOfflinePCInventoryVersion(ClientVersion client_version);
|
||||
const char* MobVersionName(MobVersion mob_version);
|
||||
ClientVersion ConvertMobVersionToClientVersion(MobVersion mob_version);
|
||||
MobVersion ConvertClientVersionToMobVersion(ClientVersion client_version);
|
||||
MobVersion ConvertPCMobVersionToOfflinePCMobVersion(MobVersion mob_version);
|
||||
MobVersion ConvertOfflinePCMobVersionToPCMobVersion(MobVersion mob_version);
|
||||
ClientVersion ConvertOfflinePCMobVersionToClientVersion(MobVersion mob_version);
|
||||
MobVersion ConvertClientVersionToOfflinePCMobVersion(ClientVersion client_version);
|
||||
|
||||
} /*versions*/
|
||||
|
||||
|
||||
@@ -516,14 +516,6 @@ static const uint8 SkillDamageTypes[EQEmu::skills::HIGHEST_SKILL + 1] = // chang
|
||||
*/
|
||||
|
||||
#define INVALID_INDEX -1
|
||||
#define NO_ITEM 0
|
||||
|
||||
// yes..these are redundant... but, they help to identify and define what is actually being performed
|
||||
// plus, since they're pre-op's, they don't affect the actual binary size
|
||||
#define TYPE_BEGIN 0
|
||||
#define SLOT_BEGIN 0
|
||||
#define SUB_INDEX_BEGIN 0
|
||||
#define AUG_INDEX_BEGIN 0
|
||||
|
||||
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
||||
|
||||
|
||||
+791
-189
File diff suppressed because it is too large
Load Diff
+10
-3
@@ -38,6 +38,13 @@ namespace EQEmu
|
||||
class LookupEntry {
|
||||
public:
|
||||
size_t CharacterCreationLimit;
|
||||
int LongBuffs;
|
||||
int ShortBuffs;
|
||||
int DiscBuffs;
|
||||
int TotalBuffs;
|
||||
int NPCBuffs;
|
||||
int PetBuffs;
|
||||
int MercBuffs;
|
||||
};
|
||||
|
||||
const LookupEntry* Lookup(versions::ClientVersion client_version);
|
||||
@@ -47,7 +54,7 @@ namespace EQEmu
|
||||
namespace inventory {
|
||||
class LookupEntry {
|
||||
public:
|
||||
size_t InventoryTypeSize[legacy::TypeCount];
|
||||
size_t InventoryTypeSize[25]; // should reflect EQEmu::inventory::typeCount referenced in emu_constants.h
|
||||
|
||||
uint64 PossessionsBitmask;
|
||||
size_t ItemBagSize;
|
||||
@@ -59,7 +66,7 @@ namespace EQEmu
|
||||
bool AllowOverLevelEquipment;
|
||||
};
|
||||
|
||||
const LookupEntry* Lookup(versions::InventoryVersion inventory_version);
|
||||
const LookupEntry* Lookup(versions::MobVersion mob_version);
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
@@ -69,7 +76,7 @@ namespace EQEmu
|
||||
bool CoinHasWeight;
|
||||
};
|
||||
|
||||
const LookupEntry* Lookup(versions::InventoryVersion inventory_version);
|
||||
const LookupEntry* Lookup(versions::MobVersion mob_version);
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ struct LDoNTrapTemplate
|
||||
|
||||
// All clients translate the character select information to some degree
|
||||
|
||||
struct CharSelectEquip : EQEmu::Texture_Struct, EQEmu::Tint_Struct {};
|
||||
struct CharSelectEquip : EQEmu::textures::Texture_Struct, EQEmu::textures::Tint_Struct {};
|
||||
|
||||
// RoF2-based hybrid struct
|
||||
struct CharacterSelectEntry_Struct
|
||||
@@ -142,7 +142,7 @@ struct CharacterSelectEntry_Struct
|
||||
uint16 Instance;
|
||||
uint8 Gender;
|
||||
uint8 Face;
|
||||
CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||
CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
uint8 Unknown15; // Seen FF
|
||||
uint8 Unknown19; // Seen FF
|
||||
uint32 DrakkinTattoo;
|
||||
@@ -834,7 +834,7 @@ struct SuspendedMinion_Struct
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ EQEmu::TextureShortProfile Items;
|
||||
/*510*/ EQEmu::TextureMaterialProfile Items;
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
@@ -942,7 +942,7 @@ struct PlayerProfile_Struct
|
||||
/*0304*/ uint8 ability_time_minutes;
|
||||
/*0305*/ uint8 ability_time_hours; //place holder
|
||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||
/*0312*/ EQEmu::TextureShortProfile item_material; // Item texture/material of worn/held items
|
||||
/*0312*/ EQEmu::TextureMaterialProfile item_material; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ EQEmu::TintProfile item_tint;
|
||||
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||
@@ -1179,7 +1179,7 @@ struct WearChange_Struct{
|
||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||
/*014*/ uint32 hero_forge_model; // New to VoA
|
||||
/*018*/ uint32 unknown18; // New to RoF
|
||||
/*022*/ EQEmu::Tint_Struct color;
|
||||
/*022*/ EQEmu::textures::Tint_Struct color;
|
||||
/*026*/ uint8 wear_slot_id;
|
||||
/*027*/
|
||||
};
|
||||
@@ -1643,7 +1643,7 @@ struct LootingItem_Struct {
|
||||
/*002*/ uint32 looter;
|
||||
/*004*/ uint16 slot_id;
|
||||
/*006*/ uint8 unknown3[2];
|
||||
/*008*/ uint32 auto_loot;
|
||||
/*008*/ int32 auto_loot;
|
||||
};
|
||||
|
||||
struct GuildManageStatus_Struct{
|
||||
@@ -2071,7 +2071,7 @@ struct AdventureLeaderboard_Struct
|
||||
/*struct Item_Shop_Struct {
|
||||
uint16 merchantid;
|
||||
uint8 itemtype;
|
||||
EQEmu::ItemBase item;
|
||||
EQEmu::ItemData item;
|
||||
uint8 iss_unknown001[6];
|
||||
};*/
|
||||
|
||||
@@ -2243,6 +2243,7 @@ struct GroupFollow_Struct { // SoF Follow Struct
|
||||
/*0132*/
|
||||
};
|
||||
|
||||
// this is generic struct
|
||||
struct GroupLeaderChange_Struct
|
||||
{
|
||||
/*000*/ char Unknown000[64];
|
||||
@@ -2495,6 +2496,7 @@ struct BookRequest_Struct {
|
||||
uint8 window; // where to display the text (0xFF means new window)
|
||||
uint8 type; //type: 0=scroll, 1=book, 2=item info.. prolly others.
|
||||
uint32 invslot; // Only used in Sof and later clients;
|
||||
int16 subslot; // The subslot inside of a bag if it is inside one.
|
||||
char txtfile[20];
|
||||
};
|
||||
|
||||
@@ -3517,6 +3519,20 @@ struct RecipeAutoCombine_Struct {
|
||||
// f5 ff ff ff in 'you dont have all the stuff' reply
|
||||
};
|
||||
|
||||
// this is the "value#a" data
|
||||
enum EParticlePoint {
|
||||
eDefault,
|
||||
eChest,
|
||||
eHead,
|
||||
eLeftHand,
|
||||
eRigthHand,
|
||||
eLeftFoot,
|
||||
eRightFood,
|
||||
eLeftEye,
|
||||
eRightEye,
|
||||
eMouth
|
||||
};
|
||||
|
||||
struct LevelAppearance_Struct { //Sends a little graphic on level up
|
||||
uint32 spawn_id;
|
||||
uint32 parm1;
|
||||
|
||||
+25
-32
@@ -123,26 +123,21 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
|
||||
std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, const std::string &in_message)
|
||||
{
|
||||
std::string category_string;
|
||||
if (log_category > 0 && Logs::LogCategoryName[log_category])
|
||||
category_string = StringFormat("[%s] ", Logs::LogCategoryName[log_category]);
|
||||
return StringFormat("%s%s", category_string.c_str(), in_message.c_str());
|
||||
std::string ret;
|
||||
ret.push_back('[');
|
||||
ret.append(Logs::LogCategoryName[log_category]);
|
||||
ret.push_back(']');
|
||||
ret.push_back(' ');
|
||||
ret.append(in_message);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void EQEmuLogSys::ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message)
|
||||
{
|
||||
/* Check if category enabled for process */
|
||||
if (log_settings[log_category].log_to_gmsay == 0)
|
||||
return;
|
||||
|
||||
/* Enabling Netcode based GMSay output creates a feedback loop that ultimately ends in a crash */
|
||||
if (log_category == Logs::LogCategory::Netcode)
|
||||
return;
|
||||
|
||||
/* Make sure the message inbound is at a debug level we're set at */
|
||||
if (log_settings[log_category].log_to_gmsay < debug_level)
|
||||
return;
|
||||
|
||||
/* Check to see if the process that actually ran this is zone */
|
||||
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone)
|
||||
on_log_gmsay_hook(log_category, message);
|
||||
@@ -160,14 +155,6 @@ void EQEmuLogSys::ProcessLogWrite(uint16 debug_level, uint16 log_category, const
|
||||
crash_log.close();
|
||||
}
|
||||
|
||||
/* Check if category enabled for process */
|
||||
if (log_settings[log_category].log_to_file == 0)
|
||||
return;
|
||||
|
||||
/* Make sure the message inbound is at a debug level we're set at */
|
||||
if (log_settings[log_category].log_to_file < debug_level)
|
||||
return;
|
||||
|
||||
char time_stamp[80];
|
||||
EQEmuLogSys::SetCurrentTimeStamp(time_stamp);
|
||||
|
||||
@@ -246,13 +233,6 @@ uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category) {
|
||||
|
||||
void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message)
|
||||
{
|
||||
/* Check if category enabled for process */
|
||||
if (log_settings[log_category].log_to_console == 0)
|
||||
return;
|
||||
|
||||
/* Make sure the message inbound is at a debug level we're set at */
|
||||
if (log_settings[log_category].log_to_console < debug_level)
|
||||
return;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
HANDLE console_handle;
|
||||
@@ -273,12 +253,25 @@ void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category,
|
||||
|
||||
void EQEmuLogSys::Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...)
|
||||
{
|
||||
const bool log_to_console = log_settings[log_category].log_to_console > 0;
|
||||
const bool log_to_file = log_settings[log_category].log_to_file > 0;
|
||||
const bool log_to_gmsay = log_settings[log_category].log_to_gmsay > 0;
|
||||
const bool nothing_to_log = !log_to_console && !log_to_file && !log_to_gmsay;
|
||||
|
||||
if (nothing_to_log) return;
|
||||
bool log_to_console = true;
|
||||
if (log_settings[log_category].log_to_console < debug_level) {
|
||||
log_to_console = false;
|
||||
}
|
||||
|
||||
bool log_to_file = true;
|
||||
if (log_settings[log_category].log_to_file < debug_level) {
|
||||
log_to_file = false;
|
||||
}
|
||||
|
||||
bool log_to_gmsay = true;
|
||||
if (log_settings[log_category].log_to_gmsay < debug_level) {
|
||||
log_to_gmsay = false;
|
||||
}
|
||||
|
||||
const bool nothing_to_log = !log_to_console && !log_to_file && !log_to_gmsay;
|
||||
if (nothing_to_log)
|
||||
return;
|
||||
|
||||
va_list args;
|
||||
va_start(args, message);
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
#define EXTENDED_PROFILE_H
|
||||
|
||||
#include "eq_packet_structs.h"
|
||||
#include "item.h"
|
||||
#include "inventory_profile.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
@@ -40,7 +40,7 @@ struct ExtendedProfile_Struct {
|
||||
uint16 old_pet_hp; /* Not Used */
|
||||
uint16 old_pet_mana; /* Not Used */
|
||||
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
|
||||
EQEmu::TextureShortProfile pet_items; /* Not Used */
|
||||
EQEmu::TextureMaterialProfile pet_items; /* Not Used */
|
||||
char merc_name[64]; /* Used */
|
||||
|
||||
uint32 aa_effects; /* Used */
|
||||
|
||||
@@ -235,6 +235,9 @@ enum { //some random constants
|
||||
|
||||
#define ZONE_CONTROLLER_NPC_ID 10
|
||||
|
||||
// Timer to update aggrometer
|
||||
#define AGGRO_METER_UPDATE_MS 1000
|
||||
|
||||
//Some hard coded statuses from commands and other places:
|
||||
enum {
|
||||
minStatusToBeGM = 40,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,230 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 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
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
||||
*/
|
||||
|
||||
// @merth notes:
|
||||
// These classes could be optimized with database reads/writes by storing
|
||||
// a status flag indicating how object needs to interact with database
|
||||
|
||||
#ifndef COMMON_INVENTORY_PROFILE_H
|
||||
#define COMMON_INVENTORY_PROFILE_H
|
||||
|
||||
|
||||
#include "item_instance.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
|
||||
//FatherNitwit: location bits for searching specific
|
||||
//places with HasItem() and HasItemByUse()
|
||||
enum {
|
||||
invWhereWorn = 0x01,
|
||||
invWherePersonal = 0x02, //in the character's inventory
|
||||
invWhereBank = 0x04,
|
||||
invWhereSharedBank = 0x08,
|
||||
invWhereTrading = 0x10,
|
||||
invWhereCursor = 0x20
|
||||
};
|
||||
|
||||
// ########################################
|
||||
// Class: Queue
|
||||
// Queue that allows a read-only iterator
|
||||
class ItemInstQueue
|
||||
{
|
||||
public:
|
||||
~ItemInstQueue();
|
||||
/////////////////////////
|
||||
// Public Methods
|
||||
/////////////////////////
|
||||
|
||||
inline std::list<EQEmu::ItemInstance*>::const_iterator cbegin() { return m_list.cbegin(); }
|
||||
inline std::list<EQEmu::ItemInstance*>::const_iterator cend() { return m_list.cend(); }
|
||||
|
||||
inline int size() { return static_cast<int>(m_list.size()); } // TODO: change to size_t
|
||||
inline bool empty() { return m_list.empty(); }
|
||||
|
||||
void push(EQEmu::ItemInstance* inst);
|
||||
void push_front(EQEmu::ItemInstance* inst);
|
||||
EQEmu::ItemInstance* pop();
|
||||
EQEmu::ItemInstance* pop_back();
|
||||
EQEmu::ItemInstance* peek_front() const;
|
||||
|
||||
protected:
|
||||
/////////////////////////
|
||||
// Protected Members
|
||||
/////////////////////////
|
||||
|
||||
std::list<EQEmu::ItemInstance*> m_list;
|
||||
};
|
||||
|
||||
// ########################################
|
||||
// Class: EQEmu::InventoryProfile
|
||||
// Character inventory
|
||||
namespace EQEmu
|
||||
{
|
||||
class InventoryProfile
|
||||
{
|
||||
friend class ItemInstance;
|
||||
public:
|
||||
///////////////////////////////
|
||||
// Public Methods
|
||||
///////////////////////////////
|
||||
|
||||
InventoryProfile() { m_mob_version = versions::MobVersion::Unknown; m_mob_version_set = false; }
|
||||
~InventoryProfile();
|
||||
|
||||
bool SetInventoryVersion(versions::MobVersion inventory_version) {
|
||||
if (!m_mob_version_set) {
|
||||
m_mob_version = versions::ValidateMobVersion(inventory_version);
|
||||
return (m_mob_version_set = true);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
bool SetInventoryVersion(versions::ClientVersion client_version) { return SetInventoryVersion(versions::ConvertClientVersionToMobVersion(client_version)); }
|
||||
|
||||
versions::MobVersion InventoryVersion() { return m_mob_version; }
|
||||
|
||||
static void CleanDirty();
|
||||
static void MarkDirty(ItemInstance *inst);
|
||||
|
||||
// Retrieve a writeable item at specified slot
|
||||
ItemInstance* GetItem(int16 slot_id) const;
|
||||
ItemInstance* GetItem(int16 slot_id, uint8 bagidx) const;
|
||||
|
||||
inline std::list<ItemInstance*>::const_iterator cursor_cbegin() { return m_cursor.cbegin(); }
|
||||
inline std::list<ItemInstance*>::const_iterator cursor_cend() { return m_cursor.cend(); }
|
||||
|
||||
inline int CursorSize() { return m_cursor.size(); }
|
||||
inline bool CursorEmpty() { return m_cursor.empty(); }
|
||||
|
||||
// Retrieve a read-only item from inventory
|
||||
inline const ItemInstance* operator[](int16 slot_id) const { return GetItem(slot_id); }
|
||||
|
||||
// Add item to inventory
|
||||
int16 PutItem(int16 slot_id, const ItemInstance& inst);
|
||||
|
||||
// Add item to cursor queue
|
||||
int16 PushCursor(const ItemInstance& inst);
|
||||
|
||||
// Get cursor item in front of queue
|
||||
ItemInstance* GetCursorItem();
|
||||
|
||||
// Swap items in inventory
|
||||
bool SwapItem(int16 slot_a, int16 slot_b);
|
||||
|
||||
// Remove item from inventory
|
||||
bool DeleteItem(int16 slot_id, uint8 quantity = 0);
|
||||
|
||||
// Checks All items in a bag for No Drop
|
||||
bool CheckNoDrop(int16 slot_id, bool recurse = true);
|
||||
|
||||
// Remove item from inventory (and take control of memory)
|
||||
ItemInstance* PopItem(int16 slot_id);
|
||||
|
||||
// Check whether there is space for the specified number of the specified item.
|
||||
bool HasSpaceForItem(const ItemData *ItemToTry, int16 Quantity);
|
||||
|
||||
// Check whether item exists in inventory
|
||||
// where argument specifies OR'd list of invWhere constants to look
|
||||
int16 HasItem(uint32 item_id, uint8 quantity = 0, uint8 where = 0xFF);
|
||||
|
||||
// Check whether item exists in inventory
|
||||
// where argument specifies OR'd list of invWhere constants to look
|
||||
int16 HasItemByUse(uint8 use, uint8 quantity = 0, uint8 where = 0xFF);
|
||||
|
||||
// Check whether item exists in inventory
|
||||
// where argument specifies OR'd list of invWhere constants to look
|
||||
int16 HasItemByLoreGroup(uint32 loregroup, uint8 where = 0xFF);
|
||||
|
||||
// Locate an available inventory slot
|
||||
int16 FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size = 0, bool is_arrow = false);
|
||||
int16 FindFreeSlotForTradeItem(const ItemInstance* inst, int16 general_start = legacy::GENERAL_BEGIN, uint8 bag_start = inventory::containerBegin);
|
||||
|
||||
// Calculate slot_id for an item within a bag
|
||||
static int16 CalcSlotId(int16 slot_id); // Calc parent bag's slot_id
|
||||
static int16 CalcSlotId(int16 bagslot_id, uint8 bagidx); // Calc slot_id for item inside bag
|
||||
static uint8 CalcBagIdx(int16 slot_id); // Calc bagidx for slot_id
|
||||
static int16 CalcSlotFromMaterial(uint8 material);
|
||||
static uint8 CalcMaterialFromSlot(int16 equipslot);
|
||||
|
||||
static bool CanItemFitInContainer(const ItemData *ItemToTry, const ItemData *Container);
|
||||
|
||||
// Test for valid inventory casting slot
|
||||
bool SupportsClickCasting(int16 slot_id);
|
||||
bool SupportsPotionBeltCasting(int16 slot_id);
|
||||
|
||||
// Test whether a given slot can support a container item
|
||||
static bool SupportsContainers(int16 slot_id);
|
||||
|
||||
int GetSlotByItemInst(ItemInstance *inst);
|
||||
|
||||
uint8 FindBrightestLightType();
|
||||
|
||||
void dumpEntireInventory();
|
||||
void dumpWornItems();
|
||||
void dumpInventory();
|
||||
void dumpBankItems();
|
||||
void dumpSharedBankItems();
|
||||
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, std::string value);
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, int value);
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, float value);
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, bool value);
|
||||
std::string GetCustomItemData(int16 slot_id, std::string identifier);
|
||||
protected:
|
||||
///////////////////////////////
|
||||
// Protected Methods
|
||||
///////////////////////////////
|
||||
|
||||
int GetSlotByItemInstCollection(const std::map<int16, ItemInstance*> &collection, ItemInstance *inst);
|
||||
void dumpItemCollection(const std::map<int16, ItemInstance*> &collection);
|
||||
void dumpBagContents(ItemInstance *inst, std::map<int16, ItemInstance*>::const_iterator *it);
|
||||
|
||||
// Retrieves item within an inventory bucket
|
||||
ItemInstance* _GetItem(const std::map<int16, ItemInstance*>& bucket, int16 slot_id) const;
|
||||
|
||||
// Private "put" item into bucket, without regard for what is currently in bucket
|
||||
int16 _PutItem(int16 slot_id, ItemInstance* inst);
|
||||
|
||||
// Checks an inventory bucket for a particular item
|
||||
int16 _HasItem(std::map<int16, ItemInstance*>& bucket, uint32 item_id, uint8 quantity);
|
||||
int16 _HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity);
|
||||
int16 _HasItemByUse(std::map<int16, ItemInstance*>& bucket, uint8 use, uint8 quantity);
|
||||
int16 _HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity);
|
||||
int16 _HasItemByLoreGroup(std::map<int16, ItemInstance*>& bucket, uint32 loregroup);
|
||||
int16 _HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup);
|
||||
|
||||
|
||||
// Player inventory
|
||||
std::map<int16, ItemInstance*> m_worn; // Items worn by character
|
||||
std::map<int16, ItemInstance*> m_inv; // Items in character personal inventory
|
||||
std::map<int16, ItemInstance*> m_bank; // Items in character bank
|
||||
std::map<int16, ItemInstance*> m_shbank; // Items in character shared bank
|
||||
std::map<int16, ItemInstance*> m_trade; // Items in a trade session
|
||||
::ItemInstQueue m_cursor; // Items on cursor: FIFO
|
||||
|
||||
private:
|
||||
// Active mob version
|
||||
versions::MobVersion m_mob_version;
|
||||
bool m_mob_version_set;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*COMMON_INVENTORY_PROFILE_H*/
|
||||
@@ -0,0 +1,397 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 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
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "inventory_slot.h"
|
||||
#include "textures.h"
|
||||
#include "string_util.h"
|
||||
|
||||
|
||||
int8 EQEmu::inventory::ConvertEquipmentIndexToTextureIndex(int16 slot_index)
|
||||
{
|
||||
switch (slot_index) {
|
||||
case slotHead:
|
||||
return textures::armorHead;
|
||||
case slotChest:
|
||||
return textures::armorChest;
|
||||
case slotArms:
|
||||
return textures::armorArms;
|
||||
case slotWrist1:
|
||||
return textures::armorWrist;
|
||||
case slotHands:
|
||||
return textures::armorHands;
|
||||
case slotLegs:
|
||||
return textures::armorLegs;
|
||||
case slotFeet:
|
||||
return textures::armorFeet;
|
||||
case slotPrimary:
|
||||
return textures::weaponPrimary;
|
||||
case slotSecondary:
|
||||
return textures::weaponSecondary;
|
||||
default:
|
||||
return textures::textureInvalid;
|
||||
}
|
||||
}
|
||||
|
||||
int8 EQEmu::inventory::ConvertEquipmentSlotToTextureIndex(const InventorySlot& inventory_slot)
|
||||
{
|
||||
if ((!inventory_slot.Typeless() && !inventory_slot.IsTypeIndex(typePossessions)) || !inventory_slot.IsContainerIndex(containerInvalid) || !inventory_slot.IsSocketIndex(socketInvalid))
|
||||
return textures::textureInvalid;
|
||||
|
||||
return ConvertEquipmentIndexToTextureIndex(inventory_slot.SlotIndex());
|
||||
}
|
||||
|
||||
int16 EQEmu::inventory::ConvertTextureIndexToEquipmentIndex(int8 texture_index)
|
||||
{
|
||||
switch (texture_index) {
|
||||
case textures::armorHead:
|
||||
return slotHead;
|
||||
case textures::armorChest:
|
||||
return slotChest;
|
||||
case textures::armorArms:
|
||||
return slotArms;
|
||||
case textures::armorWrist:
|
||||
return slotWrist1;
|
||||
case textures::armorHands:
|
||||
return slotHands;
|
||||
case textures::armorLegs:
|
||||
return slotLegs;
|
||||
case textures::armorFeet:
|
||||
return slotFeet;
|
||||
case textures::weaponPrimary:
|
||||
return slotPrimary;
|
||||
case textures::weaponSecondary:
|
||||
return slotSecondary;
|
||||
default:
|
||||
return slotInvalid;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsValidSlot() const
|
||||
{
|
||||
if (_typeless)
|
||||
return false;
|
||||
|
||||
int16 slot_count = inventory::SlotCount(_type_index);
|
||||
if (!slot_count || _slot_index < inventory::slotBegin || _slot_index >= slot_count)
|
||||
return false;
|
||||
|
||||
if (_container_index < inventory::containerInvalid || _container_index >= inventory::ContainerCount)
|
||||
return false;
|
||||
|
||||
if (_socket_index < inventory::socketInvalid || _socket_index >= inventory::SocketCount)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsDeleteSlot() const
|
||||
{
|
||||
if (_typeless)
|
||||
return (_slot_index == inventory::slotInvalid && _container_index == inventory::containerInvalid && _socket_index == inventory::socketInvalid);
|
||||
else
|
||||
return (_type_index == inventory::typeInvalid && _slot_index == inventory::slotInvalid && _container_index == inventory::containerInvalid && _socket_index == inventory::socketInvalid);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsEquipmentIndex(int16 slot_index)
|
||||
{
|
||||
/*if (slot_index < inventory::EquipmentBegin || slot_index > inventory::EquipmentEnd)
|
||||
return false;*/
|
||||
if ((slot_index < legacy::EQUIPMENT_BEGIN || slot_index > legacy::EQUIPMENT_END) && slot_index != legacy::SLOT_POWER_SOURCE)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsGeneralIndex(int16 slot_index)
|
||||
{
|
||||
/*if (slot_index < inventory::GeneralBegin || slot_index > inventory::GeneralEnd)
|
||||
return false;*/
|
||||
if (slot_index < legacy::GENERAL_BEGIN || slot_index > legacy::GENERAL_END)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsCursorIndex(int16 slot_index)
|
||||
{
|
||||
/*if (slot_index != inventory::slotCursor)
|
||||
return false;*/
|
||||
if (slot_index != legacy::SLOT_CURSOR)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsWeaponIndex(int16 slot_index)
|
||||
{
|
||||
/*if ((slot_index != inventory::slotRange) && (slot_index != inventory::slotPrimary) && (slot_index != inventory::slotSecondary))
|
||||
return false;*/
|
||||
if ((slot_index != legacy::SLOT_RANGE) && (slot_index != legacy::SLOT_PRIMARY) && (slot_index != legacy::SLOT_SECONDARY))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsTextureIndex(int16 slot_index)
|
||||
{
|
||||
switch (slot_index) {
|
||||
case inventory::slotHead:
|
||||
case inventory::slotChest:
|
||||
case inventory::slotArms:
|
||||
case inventory::slotWrist1:
|
||||
case inventory::slotHands:
|
||||
case inventory::slotLegs:
|
||||
case inventory::slotFeet:
|
||||
case inventory::slotPrimary:
|
||||
case inventory::slotSecondary:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsTintableIndex(int16 slot_index)
|
||||
{
|
||||
switch (slot_index) {
|
||||
case inventory::slotHead:
|
||||
case inventory::slotChest:
|
||||
case inventory::slotArms:
|
||||
case inventory::slotWrist1:
|
||||
case inventory::slotHands:
|
||||
case inventory::slotLegs:
|
||||
case inventory::slotFeet:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsEquipmentSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsEquipmentIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsGeneralSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsGeneralIndex(_socket_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsCursorSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsCursorIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsWeaponSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsWeaponIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsTextureSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsTextureIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsTintableSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsTintableIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||
return false;
|
||||
if (_slot_index == inventory::slotInvalid)
|
||||
return false;
|
||||
if (_container_index != inventory::containerInvalid)
|
||||
return false;
|
||||
if (_socket_index != inventory::socketInvalid)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsSlotSocket() const
|
||||
{
|
||||
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||
return false;
|
||||
if (_slot_index == inventory::slotInvalid)
|
||||
return false;
|
||||
if (_container_index != inventory::containerInvalid)
|
||||
return false;
|
||||
if (_socket_index == inventory::socketInvalid)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsContainer() const
|
||||
{
|
||||
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||
return false;
|
||||
if (_slot_index == inventory::slotInvalid)
|
||||
return false;
|
||||
if (_container_index == inventory::containerInvalid)
|
||||
return false;
|
||||
if (_socket_index != inventory::socketInvalid)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsContainerSocket() const
|
||||
{
|
||||
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||
return false;
|
||||
if (_slot_index == inventory::slotInvalid)
|
||||
return false;
|
||||
if (_container_index == inventory::containerInvalid)
|
||||
return false;
|
||||
if (_socket_index == inventory::socketInvalid)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
EQEmu::InventorySlot EQEmu::InventorySlot::ToTopOwner() const
|
||||
{
|
||||
return InventorySlot(_type_index, _slot_index);
|
||||
}
|
||||
|
||||
EQEmu::InventorySlot EQEmu::InventorySlot::ToOwner() const
|
||||
{
|
||||
if (IsSlot() || IsSlotSocket() || IsContainer())
|
||||
return InventorySlot(_type_index, _slot_index);
|
||||
|
||||
if (IsContainerSocket())
|
||||
return InventorySlot(_type_index, _slot_index, _container_index);
|
||||
|
||||
return InventorySlot();
|
||||
}
|
||||
|
||||
const std::string EQEmu::InventorySlot::ToString() const
|
||||
{
|
||||
return StringFormat("(%i%s, %i, %i, %i)", _type_index, (_typeless ? " [typeless]" : ""), _slot_index, _container_index, _socket_index);
|
||||
}
|
||||
|
||||
const std::string EQEmu::InventorySlot::ToName() const
|
||||
{
|
||||
return StringFormat("InventorySlot - _type_index: %i%s, _slot_index: %i, _container_index: %i, _socket_index: %i", _type_index, (_typeless ? " [typeless]" : ""), _slot_index, _container_index, _socket_index);
|
||||
}
|
||||
|
||||
void EQEmu::InventorySlot::SetInvalidSlot()
|
||||
{
|
||||
_type_index = inventory::typeInvalid;
|
||||
_slot_index = inventory::slotInvalid;
|
||||
_container_index = inventory::containerInvalid;
|
||||
_socket_index = inventory::socketInvalid;
|
||||
}
|
||||
|
||||
//bool EQEmu::InventorySlot::IsBonusIndex(int16 slot_index)
|
||||
//{
|
||||
// if ((slot_index >= inventory::EquipmentBegin) && (slot_index <= inventory::EquipmentEnd) && (slot_index != inventory::slotAmmo))
|
||||
// return true;
|
||||
//
|
||||
// return false;
|
||||
//}
|
||||
|
||||
//bool EQEmu::InventorySlot::IsBonusSlot() const
|
||||
//{
|
||||
// if ((_type_index != inventory::typePossessions) || (_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
// return false;
|
||||
//
|
||||
// return IsBonusIndex(_slot_index);
|
||||
//}
|
||||
|
||||
bool inventory_slot_typeless_lessthan(const EQEmu::InventorySlot& lhs, const EQEmu::InventorySlot& rhs)
|
||||
{
|
||||
if (lhs.SlotIndex() < rhs.SlotIndex())
|
||||
return true;
|
||||
|
||||
if ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() < rhs.ContainerIndex()))
|
||||
return true;
|
||||
|
||||
if ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() < rhs.SocketIndex()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::operator<(const InventorySlot& rhs) const
|
||||
{
|
||||
if (Typeless() || rhs.Typeless())
|
||||
return inventory_slot_typeless_lessthan(*this, rhs);
|
||||
|
||||
if (TypeIndex() < rhs.TypeIndex())
|
||||
return true;
|
||||
|
||||
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() < rhs.SlotIndex()))
|
||||
return true;
|
||||
|
||||
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() == rhs.SlotIndex()) && (ContainerIndex() < rhs.ContainerIndex()))
|
||||
return true;
|
||||
|
||||
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() == rhs.SlotIndex()) && (ContainerIndex() == rhs.ContainerIndex()) && (SocketIndex() < rhs.SocketIndex()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EQEmu::operator==(const InventorySlot& lhs, const InventorySlot& rhs)
|
||||
{
|
||||
if (lhs.Typeless() || rhs.Typeless())
|
||||
return ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() == rhs.SocketIndex()));
|
||||
|
||||
return ((lhs.TypeIndex() == rhs.TypeIndex()) && (lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() == rhs.SocketIndex()));
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 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
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_INVENTORY_SLOT
|
||||
#define COMMON_INVENTORY_SLOT
|
||||
|
||||
#include "emu_constants.h"
|
||||
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
class InventorySlot;
|
||||
|
||||
namespace inventory {
|
||||
int8 ConvertEquipmentIndexToTextureIndex(int16 slot_index);
|
||||
int8 ConvertEquipmentSlotToTextureIndex(const InventorySlot& inventory_slot);
|
||||
int16 ConvertTextureIndexToEquipmentIndex(int8 texture_index);
|
||||
}
|
||||
|
||||
class InventorySlot {
|
||||
public:
|
||||
InventorySlot() : _type_index(inventory::typeInvalid), _slot_index(inventory::slotInvalid), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||
InventorySlot(int16 type_index) : _type_index(type_index), _slot_index(inventory::slotInvalid), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||
InventorySlot(int16 type_index, int16 parent_index) : _type_index(type_index), _slot_index(parent_index), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||
InventorySlot(int16 type_index, int16 parent_index, int16 bag_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||
InventorySlot(int16 type_index, int16 parent_index, int16 bag_index, int16 aug_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(aug_index), _typeless(false) { }
|
||||
InventorySlot(const InventorySlot& r) : _type_index(r._type_index), _slot_index(r._slot_index), _container_index(r._container_index), _socket_index(r._socket_index), _typeless(r._typeless) { }
|
||||
InventorySlot(int16 type_index, const InventorySlot& r) : _type_index(type_index), _slot_index(r._slot_index), _container_index(r._container_index), _socket_index(r._socket_index), _typeless(false) { }
|
||||
|
||||
inline int16 TypeIndex() const { return _type_index; }
|
||||
inline int16 SlotIndex() const { return _slot_index; }
|
||||
inline int16 ContainerIndex() const { return _container_index; }
|
||||
inline int16 SocketIndex() const { return _socket_index; }
|
||||
|
||||
bool Typeless() const { return _typeless; }
|
||||
|
||||
bool IsValidSlot() const;
|
||||
bool IsDeleteSlot() const;
|
||||
|
||||
static bool IsEquipmentIndex(int16 slot_index);
|
||||
static bool IsGeneralIndex(int16 slot_index);
|
||||
static bool IsCursorIndex(int16 slot_index);
|
||||
static bool IsWeaponIndex(int16 slot_index);
|
||||
static bool IsTextureIndex(int16 slot_index);
|
||||
static bool IsTintableIndex(int16 slot_index);
|
||||
|
||||
bool IsEquipmentSlot() const;
|
||||
bool IsGeneralSlot() const;
|
||||
bool IsCursorSlot() const;
|
||||
bool IsWeaponSlot() const;
|
||||
bool IsTextureSlot() const;
|
||||
bool IsTintableSlot() const;
|
||||
|
||||
bool IsSlot() const;
|
||||
bool IsSlotSocket() const;
|
||||
bool IsContainer() const;
|
||||
bool IsContainerSocket() const;
|
||||
|
||||
InventorySlot ToTopOwner() const;
|
||||
InventorySlot ToOwner() const;
|
||||
|
||||
const std::string ToString() const;
|
||||
const std::string ToName() const;
|
||||
|
||||
bool IsTypeIndex(int16 type_index) const { return (_type_index == type_index); }
|
||||
bool IsSlotIndex(int16 slot_index) const { return (_slot_index == slot_index); }
|
||||
bool IsContainerIndex(int16 container_index) const { return (_container_index == container_index); }
|
||||
bool IsSocketIndex(int16 socket_index) const { return (_socket_index == socket_index); }
|
||||
|
||||
void SetType(int16 type_index) { _type_index = type_index; }
|
||||
void SetSlot(int16 slot_index) { _slot_index = slot_index; }
|
||||
void SetContainer(int16 container_index) { _container_index = container_index; }
|
||||
void SetSocket(int16 socket_index) { _socket_index = socket_index; }
|
||||
|
||||
void SetInvalidSlot();
|
||||
|
||||
void SetTypeInvalid() { _type_index = inventory::typeInvalid; }
|
||||
void SetSlotInvalid() { _slot_index = inventory::slotInvalid; }
|
||||
void SetContainerInvalid() { _container_index = inventory::containerInvalid; }
|
||||
void SetSocketInvalid() { _socket_index = inventory::socketInvalid; }
|
||||
|
||||
void SetTypeBegin() { _type_index = inventory::typeBegin; }
|
||||
void SetSlotBegin() { _slot_index = inventory::slotBegin; }
|
||||
void SetContainerBegin() { _container_index = inventory::containerBegin; }
|
||||
void SetSocketBegin() { _socket_index = inventory::socketBegin; }
|
||||
|
||||
void IncrementType() { ++_type_index; }
|
||||
void IncrementSlot() { ++_slot_index; }
|
||||
void IncrementContainer() { ++_container_index; }
|
||||
void IncrementSocket() { ++_socket_index; }
|
||||
|
||||
void SetTypeless() { _typeless = true; }
|
||||
void ClearTypeless() { _typeless = false; }
|
||||
|
||||
// these two methods should really check for all bonus-valid slots..currently checks for equipment only (rework needed)
|
||||
//static bool IsBonusIndex(int16 slot_index);
|
||||
//bool IsBonusSlot() const;
|
||||
|
||||
bool operator<(const InventorySlot& rhs) const;
|
||||
|
||||
private:
|
||||
int16 _type_index;
|
||||
//int16 _unknown2; // not implemented
|
||||
int16 _slot_index;
|
||||
int16 _container_index;
|
||||
int16 _socket_index;
|
||||
//int16 _unknown1; // not implemented
|
||||
|
||||
bool _typeless;
|
||||
};
|
||||
|
||||
bool operator==(const InventorySlot& lhs, const InventorySlot& rhs);
|
||||
bool operator!=(const InventorySlot& lhs, const InventorySlot& rhs) { return (!(lhs == rhs)); }
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_INVENTORY_SLOT*/
|
||||
-3073
File diff suppressed because it is too large
Load Diff
-544
@@ -1,544 +0,0 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 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
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
||||
*/
|
||||
|
||||
// @merth notes:
|
||||
// These classes could be optimized with database reads/writes by storing
|
||||
// a status flag indicating how object needs to interact with database
|
||||
|
||||
#ifndef COMMON_ITEM_H
|
||||
#define COMMON_ITEM_H
|
||||
|
||||
|
||||
class ItemParse; // Parses item packets
|
||||
class EvolveInfo; // Stores information about an evolving item family
|
||||
|
||||
#include "../common/eq_constants.h"
|
||||
#include "../common/item_base.h"
|
||||
#include "../common/timer.h"
|
||||
#include "../common/bodytypes.h"
|
||||
#include "../common/deity.h"
|
||||
#include "../common/memory_buffer.h"
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
|
||||
namespace ItemField
|
||||
{
|
||||
enum
|
||||
{
|
||||
source = 0,
|
||||
#define F(x) x,
|
||||
#include "item_fieldlist.h"
|
||||
#undef F
|
||||
updated
|
||||
};
|
||||
};
|
||||
|
||||
// Specifies usage type for item inside ItemInst
|
||||
enum ItemInstTypes
|
||||
{
|
||||
ItemInstNormal = 0,
|
||||
ItemInstWorldContainer
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
byFlagIgnore, //do not consider this flag
|
||||
byFlagSet, //apply action if the flag is set
|
||||
byFlagNotSet //apply action if the flag is NOT set
|
||||
} byFlagSetting;
|
||||
|
||||
|
||||
//FatherNitwit: location bits for searching specific
|
||||
//places with HasItem() and HasItemByUse()
|
||||
enum {
|
||||
invWhereWorn = 0x01,
|
||||
invWherePersonal = 0x02, //in the character's inventory
|
||||
invWhereBank = 0x04,
|
||||
invWhereSharedBank = 0x08,
|
||||
invWhereTrading = 0x10,
|
||||
invWhereCursor = 0x20
|
||||
};
|
||||
|
||||
class ItemInst;
|
||||
|
||||
// ########################################
|
||||
// Class: Queue
|
||||
// Queue that allows a read-only iterator
|
||||
class ItemInstQueue
|
||||
{
|
||||
public:
|
||||
~ItemInstQueue();
|
||||
/////////////////////////
|
||||
// Public Methods
|
||||
/////////////////////////
|
||||
|
||||
inline std::list<ItemInst*>::const_iterator cbegin() { return m_list.cbegin(); }
|
||||
inline std::list<ItemInst*>::const_iterator cend() { return m_list.cend(); }
|
||||
|
||||
inline int size() { return static_cast<int>(m_list.size()); } // TODO: change to size_t
|
||||
inline bool empty() { return m_list.empty(); }
|
||||
|
||||
void push(ItemInst* inst);
|
||||
void push_front(ItemInst* inst);
|
||||
ItemInst* pop();
|
||||
ItemInst* pop_back();
|
||||
ItemInst* peek_front() const;
|
||||
|
||||
protected:
|
||||
/////////////////////////
|
||||
// Protected Members
|
||||
/////////////////////////
|
||||
|
||||
std::list<ItemInst*> m_list;
|
||||
};
|
||||
|
||||
// ########################################
|
||||
// Class: Inventory
|
||||
// Character inventory
|
||||
class Inventory
|
||||
{
|
||||
friend class ItemInst;
|
||||
public:
|
||||
///////////////////////////////
|
||||
// Public Methods
|
||||
///////////////////////////////
|
||||
|
||||
Inventory() { m_inventory_version = EQEmu::versions::InventoryVersion::Unknown; m_inventory_version_set = false; }
|
||||
~Inventory();
|
||||
|
||||
// inv2 creep
|
||||
bool SetInventoryVersion(EQEmu::versions::InventoryVersion inventory_version) {
|
||||
if (!m_inventory_version_set) {
|
||||
m_inventory_version = EQEmu::versions::ValidateInventoryVersion(inventory_version);
|
||||
return (m_inventory_version_set = true);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
bool SetInventoryVersion(EQEmu::versions::ClientVersion client_version) { return SetInventoryVersion(EQEmu::versions::ConvertClientVersionToInventoryVersion(client_version)); }
|
||||
|
||||
EQEmu::versions::InventoryVersion InventoryVersion() { return m_inventory_version; }
|
||||
|
||||
static void CleanDirty();
|
||||
static void MarkDirty(ItemInst *inst);
|
||||
|
||||
// Retrieve a writeable item at specified slot
|
||||
ItemInst* GetItem(int16 slot_id) const;
|
||||
ItemInst* GetItem(int16 slot_id, uint8 bagidx) const;
|
||||
|
||||
inline std::list<ItemInst*>::const_iterator cursor_cbegin() { return m_cursor.cbegin(); }
|
||||
inline std::list<ItemInst*>::const_iterator cursor_cend() { return m_cursor.cend(); }
|
||||
|
||||
inline int CursorSize() { return m_cursor.size(); }
|
||||
inline bool CursorEmpty() { return m_cursor.empty(); }
|
||||
|
||||
// Retrieve a read-only item from inventory
|
||||
inline const ItemInst* operator[](int16 slot_id) const { return GetItem(slot_id); }
|
||||
|
||||
// Add item to inventory
|
||||
int16 PutItem(int16 slot_id, const ItemInst& inst);
|
||||
|
||||
// Add item to cursor queue
|
||||
int16 PushCursor(const ItemInst& inst);
|
||||
|
||||
// Get cursor item in front of queue
|
||||
ItemInst* GetCursorItem();
|
||||
|
||||
// Swap items in inventory
|
||||
bool SwapItem(int16 slot_a, int16 slot_b);
|
||||
|
||||
// Remove item from inventory
|
||||
bool DeleteItem(int16 slot_id, uint8 quantity=0);
|
||||
|
||||
// Checks All items in a bag for No Drop
|
||||
bool CheckNoDrop(int16 slot_id);
|
||||
|
||||
// Remove item from inventory (and take control of memory)
|
||||
ItemInst* PopItem(int16 slot_id);
|
||||
|
||||
// Check whether there is space for the specified number of the specified item.
|
||||
bool HasSpaceForItem(const EQEmu::ItemBase *ItemToTry, int16 Quantity);
|
||||
|
||||
// Check whether item exists in inventory
|
||||
// where argument specifies OR'd list of invWhere constants to look
|
||||
int16 HasItem(uint32 item_id, uint8 quantity = 0, uint8 where = 0xFF);
|
||||
|
||||
// Check whether item exists in inventory
|
||||
// where argument specifies OR'd list of invWhere constants to look
|
||||
int16 HasItemByUse(uint8 use, uint8 quantity=0, uint8 where=0xFF);
|
||||
|
||||
// Check whether item exists in inventory
|
||||
// where argument specifies OR'd list of invWhere constants to look
|
||||
int16 HasItemByLoreGroup(uint32 loregroup, uint8 where=0xFF);
|
||||
|
||||
// Locate an available inventory slot
|
||||
int16 FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size = 0, bool is_arrow = false);
|
||||
int16 FindFreeSlotForTradeItem(const ItemInst* inst);
|
||||
|
||||
// Calculate slot_id for an item within a bag
|
||||
static int16 CalcSlotId(int16 slot_id); // Calc parent bag's slot_id
|
||||
static int16 CalcSlotId(int16 bagslot_id, uint8 bagidx); // Calc slot_id for item inside bag
|
||||
static uint8 CalcBagIdx(int16 slot_id); // Calc bagidx for slot_id
|
||||
static int16 CalcSlotFromMaterial(uint8 material);
|
||||
static uint8 CalcMaterialFromSlot(int16 equipslot);
|
||||
|
||||
static bool CanItemFitInContainer(const EQEmu::ItemBase *ItemToTry, const EQEmu::ItemBase *Container);
|
||||
|
||||
// Test for valid inventory casting slot
|
||||
bool SupportsClickCasting(int16 slot_id);
|
||||
bool SupportsPotionBeltCasting(int16 slot_id);
|
||||
|
||||
// Test whether a given slot can support a container item
|
||||
static bool SupportsContainers(int16 slot_id);
|
||||
|
||||
int GetSlotByItemInst(ItemInst *inst);
|
||||
|
||||
uint8 FindBrightestLightType();
|
||||
|
||||
void dumpEntireInventory();
|
||||
void dumpWornItems();
|
||||
void dumpInventory();
|
||||
void dumpBankItems();
|
||||
void dumpSharedBankItems();
|
||||
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, std::string value);
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, int value);
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, float value);
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, bool value);
|
||||
std::string GetCustomItemData(int16 slot_id, std::string identifier);
|
||||
protected:
|
||||
///////////////////////////////
|
||||
// Protected Methods
|
||||
///////////////////////////////
|
||||
|
||||
int GetSlotByItemInstCollection(const std::map<int16, ItemInst*> &collection, ItemInst *inst);
|
||||
void dumpItemCollection(const std::map<int16, ItemInst*> &collection);
|
||||
void dumpBagContents(ItemInst *inst, std::map<int16, ItemInst*>::const_iterator *it);
|
||||
|
||||
// Retrieves item within an inventory bucket
|
||||
ItemInst* _GetItem(const std::map<int16, ItemInst*>& bucket, int16 slot_id) const;
|
||||
|
||||
// Private "put" item into bucket, without regard for what is currently in bucket
|
||||
int16 _PutItem(int16 slot_id, ItemInst* inst);
|
||||
|
||||
// Checks an inventory bucket for a particular item
|
||||
int16 _HasItem(std::map<int16, ItemInst*>& bucket, uint32 item_id, uint8 quantity);
|
||||
int16 _HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity);
|
||||
int16 _HasItemByUse(std::map<int16, ItemInst*>& bucket, uint8 use, uint8 quantity);
|
||||
int16 _HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity);
|
||||
int16 _HasItemByLoreGroup(std::map<int16, ItemInst*>& bucket, uint32 loregroup);
|
||||
int16 _HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup);
|
||||
|
||||
|
||||
// Player inventory
|
||||
std::map<int16, ItemInst*> m_worn; // Items worn by character
|
||||
std::map<int16, ItemInst*> m_inv; // Items in character personal inventory
|
||||
std::map<int16, ItemInst*> m_bank; // Items in character bank
|
||||
std::map<int16, ItemInst*> m_shbank; // Items in character shared bank
|
||||
std::map<int16, ItemInst*> m_trade; // Items in a trade session
|
||||
ItemInstQueue m_cursor; // Items on cursor: FIFO
|
||||
|
||||
private:
|
||||
// Active inventory version
|
||||
EQEmu::versions::InventoryVersion m_inventory_version;
|
||||
bool m_inventory_version_set;
|
||||
};
|
||||
|
||||
class SharedDatabase;
|
||||
|
||||
// ########################################
|
||||
// Class: ItemInst
|
||||
// Base class for an instance of an item
|
||||
// An item instance encapsulates item data + data specific
|
||||
// to an item instance (includes dye, augments, charges, etc)
|
||||
class ItemInst
|
||||
{
|
||||
public:
|
||||
/////////////////////////
|
||||
// Methods
|
||||
/////////////////////////
|
||||
|
||||
// Constructors/Destructor
|
||||
ItemInst(const EQEmu::ItemBase* item = nullptr, int16 charges = 0);
|
||||
|
||||
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
|
||||
|
||||
ItemInst(ItemInstTypes use_type);
|
||||
|
||||
ItemInst(const ItemInst& copy);
|
||||
|
||||
~ItemInst();
|
||||
|
||||
// Query item type
|
||||
bool IsType(EQEmu::item::ItemClass item_class) const;
|
||||
|
||||
bool IsClassCommon();
|
||||
bool IsClassBag();
|
||||
bool IsClassBook();
|
||||
|
||||
bool IsClassCommon() const { return const_cast<ItemInst*>(this)->IsClassCommon(); }
|
||||
bool IsClassBag() const { return const_cast<ItemInst*>(this)->IsClassBag(); }
|
||||
bool IsClassBook() const { return const_cast<ItemInst*>(this)->IsClassBook(); }
|
||||
|
||||
// Can item be stacked?
|
||||
bool IsStackable() const;
|
||||
bool IsCharged() const;
|
||||
|
||||
// Can item be equipped by/at?
|
||||
bool IsEquipable(uint16 race, uint16 class_) const;
|
||||
bool IsEquipable(int16 slot_id) const;
|
||||
|
||||
//
|
||||
// Augments
|
||||
//
|
||||
bool IsAugmentable() const;
|
||||
bool AvailableWearSlot(uint32 aug_wear_slots) const;
|
||||
int8 AvailableAugmentSlot(int32 augtype) const;
|
||||
bool IsAugmentSlotAvailable(int32 augtype, uint8 slot) const;
|
||||
inline int32 GetAugmentType() const { return ((m_item) ? m_item->AugType : NO_ITEM); }
|
||||
|
||||
inline bool IsExpendable() const { return ((m_item) ? ((m_item->Click.Type == EQEmu::item::ItemEffectExpendable) || (m_item->ItemType == EQEmu::item::ItemTypePotion)) : false); }
|
||||
|
||||
//
|
||||
// Contents
|
||||
//
|
||||
ItemInst* GetItem(uint8 slot) const;
|
||||
uint32 GetItemID(uint8 slot) const;
|
||||
inline const ItemInst* operator[](uint8 slot) const { return GetItem(slot); }
|
||||
void PutItem(uint8 slot, const ItemInst& inst);
|
||||
void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id) { return; } // not defined anywhere...
|
||||
void DeleteItem(uint8 slot);
|
||||
ItemInst* PopItem(uint8 index);
|
||||
void Clear();
|
||||
void ClearByFlags(byFlagSetting is_nodrop, byFlagSetting is_norent);
|
||||
uint8 FirstOpenSlot() const;
|
||||
uint8 GetTotalItemCount() const;
|
||||
bool IsNoneEmptyContainer();
|
||||
std::map<uint8, ItemInst*>* GetContents() { return &m_contents; }
|
||||
|
||||
//
|
||||
// Augments
|
||||
//
|
||||
ItemInst* GetAugment(uint8 slot) const;
|
||||
uint32 GetAugmentItemID(uint8 slot) const;
|
||||
void PutAugment(uint8 slot, const ItemInst& inst);
|
||||
void PutAugment(SharedDatabase *db, uint8 slot, uint32 item_id);
|
||||
void DeleteAugment(uint8 slot);
|
||||
ItemInst* RemoveAugment(uint8 index);
|
||||
bool IsAugmented();
|
||||
ItemInst* GetOrnamentationAug(int32 ornamentationAugtype) const;
|
||||
bool UpdateOrnamentationInfo();
|
||||
static bool CanTransform(const EQEmu::ItemBase *ItemToTry, const EQEmu::ItemBase *Container, bool AllowAll = false);
|
||||
|
||||
// Has attack/delay?
|
||||
bool IsWeapon() const;
|
||||
bool IsAmmo() const;
|
||||
|
||||
// Accessors
|
||||
const uint32 GetID() const { return ((m_item) ? m_item->ID : NO_ITEM); }
|
||||
const uint32 GetItemScriptID() const { return ((m_item) ? m_item->ScriptFileID : NO_ITEM); }
|
||||
const EQEmu::ItemBase* GetItem() const;
|
||||
const EQEmu::ItemBase* GetUnscaledItem() const;
|
||||
|
||||
int16 GetCharges() const { return m_charges; }
|
||||
void SetCharges(int16 charges) { m_charges = charges; }
|
||||
|
||||
uint32 GetPrice() const { return m_price; }
|
||||
void SetPrice(uint32 price) { m_price = price; }
|
||||
|
||||
void SetColor(uint32 color) { m_color = color; }
|
||||
uint32 GetColor() const { return m_color; }
|
||||
|
||||
uint32 GetMerchantSlot() const { return m_merchantslot; }
|
||||
void SetMerchantSlot(uint32 slot) { m_merchantslot = slot; }
|
||||
|
||||
int32 GetMerchantCount() const { return m_merchantcount; }
|
||||
void SetMerchantCount(int32 count) { m_merchantcount = count; }
|
||||
|
||||
int16 GetCurrentSlot() const { return m_currentslot; }
|
||||
void SetCurrentSlot(int16 curr_slot) { m_currentslot = curr_slot; }
|
||||
|
||||
// Is this item already attuned?
|
||||
bool IsAttuned() const { return m_attuned; }
|
||||
void SetAttuned(bool flag) { m_attuned=flag; }
|
||||
|
||||
std::string GetCustomDataString() const;
|
||||
std::string GetCustomData(std::string identifier);
|
||||
void SetCustomData(std::string identifier, std::string value);
|
||||
void SetCustomData(std::string identifier, int value);
|
||||
void SetCustomData(std::string identifier, float value);
|
||||
void SetCustomData(std::string identifier, bool value);
|
||||
void DeleteCustomData(std::string identifier);
|
||||
|
||||
// Allows treatment of this object as though it were a pointer to m_item
|
||||
operator bool() const { return (m_item != nullptr); }
|
||||
|
||||
// Compare inner Item_Struct of two ItemInst objects
|
||||
bool operator==(const ItemInst& right) const { return (this->m_item == right.m_item); }
|
||||
bool operator!=(const ItemInst& right) const { return (this->m_item != right.m_item); }
|
||||
|
||||
// Clone current item
|
||||
ItemInst* Clone() const;
|
||||
|
||||
bool IsSlotAllowed(int16 slot_id) const;
|
||||
|
||||
bool IsScaling() const { return m_scaling; }
|
||||
bool IsEvolving() const { return (m_evolveLvl >= 1); }
|
||||
uint32 GetExp() const { return m_exp; }
|
||||
void SetExp(uint32 exp) { m_exp = exp; }
|
||||
void AddExp(uint32 exp) { m_exp += exp; }
|
||||
bool IsActivated() { return m_activated; }
|
||||
void SetActivated(bool activated) { m_activated = activated; }
|
||||
int8 GetEvolveLvl() const { return m_evolveLvl; }
|
||||
void SetScaling(bool v) { m_scaling = v; }
|
||||
uint32 GetOrnamentationIcon() const { return m_ornamenticon; }
|
||||
void SetOrnamentIcon(uint32 ornament_icon) { m_ornamenticon = ornament_icon; }
|
||||
uint32 GetOrnamentationIDFile() const { return m_ornamentidfile; }
|
||||
void SetOrnamentationIDFile(uint32 ornament_idfile) { m_ornamentidfile = ornament_idfile; }
|
||||
uint32 GetOrnamentHeroModel(int32 material_slot = -1) const;
|
||||
void SetOrnamentHeroModel(uint32 ornament_hero_model) { m_ornament_hero_model = ornament_hero_model; }
|
||||
uint32 GetRecastTimestamp() const { return m_recast_timestamp; }
|
||||
void SetRecastTimestamp(uint32 in) { m_recast_timestamp = in; }
|
||||
|
||||
void Initialize(SharedDatabase *db = nullptr);
|
||||
void ScaleItem();
|
||||
bool EvolveOnAllKills() const;
|
||||
int8 GetMaxEvolveLvl() const;
|
||||
uint32 GetKillsNeeded(uint8 currentlevel);
|
||||
|
||||
std::string Serialize(int16 slot_id) const { EQEmu::InternalSerializedItem_Struct s; s.slot_id = slot_id; s.inst = (const void*)this; std::string ser; ser.assign((char*)&s, sizeof(EQEmu::InternalSerializedItem_Struct)); return ser; }
|
||||
void Serialize(EQEmu::OutBuffer& ob, int16 slot_id) const { EQEmu::InternalSerializedItem_Struct isi; isi.slot_id = slot_id; isi.inst = (const void*)this; ob.write((const char*)&isi, sizeof(isi)); }
|
||||
|
||||
inline int32 GetSerialNumber() const { return m_SerialNumber; }
|
||||
inline void SetSerialNumber(int32 id) { m_SerialNumber = id; }
|
||||
|
||||
std::map<std::string, Timer>& GetTimers() { return m_timers; }
|
||||
void SetTimer(std::string name, uint32 time);
|
||||
void StopTimer(std::string name);
|
||||
void ClearTimers();
|
||||
|
||||
// Get a total of a stat, including augs
|
||||
// These functions should be used in place of other code manually totaling
|
||||
// to centralize where it is done to make future changes easier (ex. whenever powersources come around)
|
||||
// and to minimize errors. CalcItemBonuses however doesn't use these in interest of performance
|
||||
// by default these do not recurse into augs
|
||||
int GetItemArmorClass(bool augments = false) const;
|
||||
int GetItemElementalDamage(int &magic, int &fire, int &cold, int &poison, int &disease, int &chromatic, int &prismatic, int &physical, int &corruption, bool augments = false) const;
|
||||
// These two differ in the fact that they're quick checks (they are checked BEFORE the one above
|
||||
int GetItemElementalFlag(bool augments = false) const;
|
||||
int GetItemElementalDamage(bool augments = false) const;
|
||||
int GetItemRecommendedLevel(bool augments = false) const;
|
||||
int GetItemRequiredLevel(bool augments = false) const;
|
||||
int GetItemWeaponDamage(bool augments = false) const;
|
||||
int GetItemBackstabDamage(bool augments = false) const;
|
||||
// these two are just quick checks
|
||||
int GetItemBaneDamageBody(bool augments = false) const;
|
||||
int GetItemBaneDamageRace(bool augments = false) const;
|
||||
int GetItemBaneDamageBody(bodyType against, bool augments = false) const;
|
||||
int GetItemBaneDamageRace(uint16 against, bool augments = false) const;
|
||||
int GetItemMagical(bool augments = false) const;
|
||||
int GetItemHP(bool augments = false) const;
|
||||
int GetItemMana(bool augments = false) const;
|
||||
int GetItemEndur(bool augments = false) const;
|
||||
int GetItemAttack(bool augments = false) const;
|
||||
int GetItemStr(bool augments = false) const;
|
||||
int GetItemSta(bool augments = false) const;
|
||||
int GetItemDex(bool augments = false) const;
|
||||
int GetItemAgi(bool augments = false) const;
|
||||
int GetItemInt(bool augments = false) const;
|
||||
int GetItemWis(bool augments = false) const;
|
||||
int GetItemCha(bool augments = false) const;
|
||||
int GetItemMR(bool augments = false) const;
|
||||
int GetItemFR(bool augments = false) const;
|
||||
int GetItemCR(bool augments = false) const;
|
||||
int GetItemPR(bool augments = false) const;
|
||||
int GetItemDR(bool augments = false) const;
|
||||
int GetItemCorrup(bool augments = false) const;
|
||||
int GetItemHeroicStr(bool augments = false) const;
|
||||
int GetItemHeroicSta(bool augments = false) const;
|
||||
int GetItemHeroicDex(bool augments = false) const;
|
||||
int GetItemHeroicAgi(bool augments = false) const;
|
||||
int GetItemHeroicInt(bool augments = false) const;
|
||||
int GetItemHeroicWis(bool augments = false) const;
|
||||
int GetItemHeroicCha(bool augments = false) const;
|
||||
int GetItemHeroicMR(bool augments = false) const;
|
||||
int GetItemHeroicFR(bool augments = false) const;
|
||||
int GetItemHeroicCR(bool augments = false) const;
|
||||
int GetItemHeroicPR(bool augments = false) const;
|
||||
int GetItemHeroicDR(bool augments = false) const;
|
||||
int GetItemHeroicCorrup(bool augments = false) const;
|
||||
int GetItemHaste(bool augments = false) const;
|
||||
|
||||
protected:
|
||||
//////////////////////////
|
||||
// Protected Members
|
||||
//////////////////////////
|
||||
std::map<uint8, ItemInst*>::const_iterator _cbegin() { return m_contents.cbegin(); }
|
||||
std::map<uint8, ItemInst*>::const_iterator _cend() { return m_contents.cend(); }
|
||||
|
||||
friend class Inventory;
|
||||
|
||||
|
||||
void _PutItem(uint8 index, ItemInst* inst) { m_contents[index] = inst; }
|
||||
|
||||
ItemInstTypes m_use_type; // Usage type for item
|
||||
const EQEmu::ItemBase* m_item; // Ptr to item data
|
||||
int16 m_charges; // # of charges for chargeable items
|
||||
uint32 m_price; // Bazaar /trader price
|
||||
uint32 m_color;
|
||||
uint32 m_merchantslot;
|
||||
int16 m_currentslot;
|
||||
bool m_attuned;
|
||||
int32 m_merchantcount; //number avaliable on the merchant, -1=unlimited
|
||||
int32 m_SerialNumber; // Unique identifier for this instance of an item. Needed for Bazaar.
|
||||
uint32 m_exp;
|
||||
int8 m_evolveLvl;
|
||||
bool m_activated;
|
||||
EQEmu::ItemBase* m_scaledItem;
|
||||
EvolveInfo* m_evolveInfo;
|
||||
bool m_scaling;
|
||||
uint32 m_ornamenticon;
|
||||
uint32 m_ornamentidfile;
|
||||
uint32 m_ornament_hero_model;
|
||||
uint32 m_recast_timestamp;
|
||||
|
||||
//
|
||||
// Items inside of this item (augs or contents);
|
||||
std::map<uint8, ItemInst*> m_contents; // Zero-based index: min=0, max=9
|
||||
std::map<std::string, std::string> m_custom_data;
|
||||
std::map<std::string, Timer> m_timers;
|
||||
};
|
||||
|
||||
class EvolveInfo {
|
||||
public:
|
||||
friend class ItemInst;
|
||||
//temporary
|
||||
uint16 LvlKills[9];
|
||||
uint32 FirstItem;
|
||||
uint8 MaxLvl;
|
||||
bool AllKills;
|
||||
|
||||
EvolveInfo();
|
||||
EvolveInfo(uint32 first, uint8 max, bool allkills, uint32 L2, uint32 L3, uint32 L4, uint32 L5, uint32 L6, uint32 L7, uint32 L8, uint32 L9, uint32 L10);
|
||||
~EvolveInfo();
|
||||
};
|
||||
|
||||
#endif /*COMMON_ITEM_H*/
|
||||
@@ -17,7 +17,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "item_base.h"
|
||||
#include "item_data.h"
|
||||
#include "classes.h"
|
||||
#include "races.h"
|
||||
//#include "deity.h"
|
||||
@@ -167,7 +167,7 @@ uint8 EQEmu::item::ConvertAugTypeBitToAugType(uint32 aug_type_bit)
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::ItemBase::IsEquipable(uint16 race_id, uint16 class_id)
|
||||
bool EQEmu::ItemData::IsEquipable(uint16 race_id, uint16 class_id) const
|
||||
{
|
||||
if (!(Races & GetPlayerRaceBit(race_id)))
|
||||
return false;
|
||||
@@ -178,32 +178,50 @@ bool EQEmu::ItemBase::IsEquipable(uint16 race_id, uint16 class_id)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::ItemBase::IsClassCommon()
|
||||
bool EQEmu::ItemData::IsClassCommon() const
|
||||
{
|
||||
return (ItemClass == item::ItemClassCommon);
|
||||
}
|
||||
|
||||
bool EQEmu::ItemBase::IsClassBag()
|
||||
bool EQEmu::ItemData::IsClassBag() const
|
||||
{
|
||||
return (ItemClass == item::ItemClassBag);
|
||||
}
|
||||
|
||||
bool EQEmu::ItemBase::IsClassBook()
|
||||
bool EQEmu::ItemData::IsClassBook() const
|
||||
{
|
||||
return (ItemClass == item::ItemClassBook);
|
||||
}
|
||||
|
||||
bool EQEmu::ItemBase::IsType1HWeapon()
|
||||
bool EQEmu::ItemData::IsType1HWeapon() const
|
||||
{
|
||||
return ((ItemType == item::ItemType1HBlunt) || (ItemType == item::ItemType1HSlash) || (ItemType == item::ItemType1HPiercing));
|
||||
return ((ItemType == item::ItemType1HBlunt) || (ItemType == item::ItemType1HSlash) || (ItemType == item::ItemType1HPiercing) || (ItemType == item::ItemTypeMartial));
|
||||
}
|
||||
|
||||
bool EQEmu::ItemBase::IsType2HWeapon()
|
||||
bool EQEmu::ItemData::IsType2HWeapon() const
|
||||
{
|
||||
return ((ItemType == item::ItemType2HBlunt) || (ItemType == item::ItemType2HSlash) || (ItemType == item::ItemType2HPiercing));
|
||||
}
|
||||
|
||||
bool EQEmu::ItemBase::IsTypeShield()
|
||||
bool EQEmu::ItemData::IsTypeShield() const
|
||||
{
|
||||
return (ItemType == item::ItemTypeShield);
|
||||
}
|
||||
|
||||
bool EQEmu::ItemData::CheckLoreConflict(const ItemData* l_item, const ItemData* r_item)
|
||||
{
|
||||
if (!l_item || !r_item)
|
||||
return false;
|
||||
|
||||
if (!l_item->LoreGroup || !r_item->LoreGroup)
|
||||
return false;
|
||||
|
||||
if (l_item->LoreGroup == r_item->LoreGroup) {
|
||||
if ((l_item->LoreGroup == -1) && (l_item->ID != r_item->ID))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -17,8 +17,8 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_ITEM_BASE_H
|
||||
#define COMMON_ITEM_BASE_H
|
||||
#ifndef COMMON_ITEM_DATA_H
|
||||
#define COMMON_ITEM_DATA_H
|
||||
|
||||
|
||||
/*
|
||||
@@ -50,17 +50,6 @@
|
||||
namespace EQEmu
|
||||
{
|
||||
namespace item {
|
||||
enum ItemAttributeBit : uint32 {
|
||||
bit_ItemAttributeNone = 0x00000000,
|
||||
bit_ItemAttributeLore = 0x00000001,
|
||||
bit_ItemAttributeArtifact = 0x00000002,
|
||||
bit_ItemAttributeSummoned = 0x00000004,
|
||||
bit_ItemAttributeMagic = 0x00000008,
|
||||
bit_ItemAttributeAugment = 0x00000010,
|
||||
bit_ItemAttributePendingLore = 0x00000020,
|
||||
bit_ItemAttributeUnknown = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
enum ItemClass {
|
||||
ItemClassCommon = 0,
|
||||
ItemClassBag,
|
||||
@@ -354,8 +343,8 @@ namespace EQEmu
|
||||
//ProcRate
|
||||
};
|
||||
|
||||
extern uint32 ConvertAugTypeToAugTypeBit(uint8 aug_type);
|
||||
extern uint8 ConvertAugTypeBitToAugType(uint32 aug_type_bit);
|
||||
uint32 ConvertAugTypeToAugTypeBit(uint8 aug_type);
|
||||
uint8 ConvertAugTypeBitToAugType(uint32 aug_type_bit);
|
||||
|
||||
} /*item*/
|
||||
|
||||
@@ -364,10 +353,9 @@ namespace EQEmu
|
||||
const void * inst;
|
||||
};
|
||||
|
||||
struct ItemBase {
|
||||
struct ItemData {
|
||||
// Non packet based fields
|
||||
uint8 MinStatus;
|
||||
uint8 ItemDataType; // memset to item::ItemDataBase ('0') during mmf load
|
||||
|
||||
// Packet based fields
|
||||
uint8 ItemClass; // Item Type: 0=common, 1=container, 2=book
|
||||
@@ -476,9 +464,9 @@ namespace EQEmu
|
||||
int32 FactionAmt4; // Faction Amt 4
|
||||
char CharmFile[32]; // ?
|
||||
uint32 AugType;
|
||||
uint8 AugSlotType[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Type
|
||||
uint8 AugSlotVisible[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Visible
|
||||
uint8 AugSlotUnk2[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related
|
||||
uint8 AugSlotType[inventory::SocketCount]; // RoF: Augment Slot 1-6 Type
|
||||
uint8 AugSlotVisible[inventory::SocketCount]; // RoF: Augment Slot 1-6 Visible
|
||||
uint8 AugSlotUnk2[inventory::SocketCount]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related
|
||||
uint32 LDoNTheme;
|
||||
uint32 LDoNPrice;
|
||||
uint32 LDoNSold;
|
||||
@@ -543,23 +531,18 @@ namespace EQEmu
|
||||
char ScrollName[65];
|
||||
//BardName
|
||||
|
||||
bool IsEquipable(uint16 Race, uint16 Class);
|
||||
bool IsClassCommon();
|
||||
bool IsClassBag();
|
||||
bool IsClassBook();
|
||||
bool IsType1HWeapon();
|
||||
bool IsType2HWeapon();
|
||||
bool IsTypeShield();
|
||||
bool IsEquipable(uint16 Race, uint16 Class) const;
|
||||
bool IsClassCommon() const;
|
||||
bool IsClassBag() const;
|
||||
bool IsClassBook() const;
|
||||
bool IsType1HWeapon() const;
|
||||
bool IsType2HWeapon() const;
|
||||
bool IsTypeShield() const;
|
||||
|
||||
bool IsEquipable(uint16 Race, uint16 Class) const { return const_cast<ItemBase*>(this)->IsEquipable(Race, Class); }
|
||||
bool IsClassCommon() const { return const_cast<ItemBase*>(this)->IsClassCommon(); }
|
||||
bool IsClassBag() const { return const_cast<ItemBase*>(this)->IsClassBag(); }
|
||||
bool IsClassBook() const { return const_cast<ItemBase*>(this)->IsClassBook(); }
|
||||
bool IsType1HWeapon() const { return const_cast<ItemBase*>(this)->IsType1HWeapon(); }
|
||||
bool IsType2HWeapon() const { return const_cast<ItemBase*>(this)->IsType2HWeapon(); }
|
||||
bool IsTypeShield() const { return const_cast<ItemBase*>(this)->IsTypeShield(); }
|
||||
static bool CheckLoreConflict(const ItemData* l_item, const ItemData* r_item);
|
||||
bool CheckLoreConflict(const ItemData* item) const { return CheckLoreConflict(this, item); }
|
||||
};
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_ITEM_BASE_H*/
|
||||
#endif /*COMMON_ITEM_DATA_H*/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,334 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 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
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
||||
*/
|
||||
|
||||
// @merth notes:
|
||||
// These classes could be optimized with database reads/writes by storing
|
||||
// a status flag indicating how object needs to interact with database
|
||||
|
||||
#ifndef COMMON_ITEM_INSTANCE_H
|
||||
#define COMMON_ITEM_INSTANCE_H
|
||||
|
||||
|
||||
class ItemParse; // Parses item packets
|
||||
class EvolveInfo; // Stores information about an evolving item family
|
||||
|
||||
#include "../common/eq_constants.h"
|
||||
#include "../common/item_data.h"
|
||||
#include "../common/timer.h"
|
||||
#include "../common/bodytypes.h"
|
||||
#include "../common/deity.h"
|
||||
#include "../common/memory_buffer.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
// Specifies usage type for item inside EQEmu::ItemInstance
|
||||
enum ItemInstTypes
|
||||
{
|
||||
ItemInstNormal = 0,
|
||||
ItemInstWorldContainer
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
byFlagIgnore, //do not consider this flag
|
||||
byFlagSet, //apply action if the flag is set
|
||||
byFlagNotSet //apply action if the flag is NOT set
|
||||
} byFlagSetting;
|
||||
|
||||
class SharedDatabase;
|
||||
|
||||
// ########################################
|
||||
// Class: EQEmu::ItemInstance
|
||||
// Base class for an instance of an item
|
||||
// An item instance encapsulates item data + data specific
|
||||
// to an item instance (includes dye, augments, charges, etc)
|
||||
namespace EQEmu
|
||||
{
|
||||
class InventoryProfile;
|
||||
|
||||
class ItemInstance {
|
||||
public:
|
||||
/////////////////////////
|
||||
// Methods
|
||||
/////////////////////////
|
||||
|
||||
// Constructors/Destructor
|
||||
ItemInstance(const ItemData* item = nullptr, int16 charges = 0);
|
||||
|
||||
ItemInstance(SharedDatabase *db, uint32 item_id, int16 charges = 0);
|
||||
|
||||
ItemInstance(ItemInstTypes use_type);
|
||||
|
||||
ItemInstance(const ItemInstance& copy);
|
||||
|
||||
~ItemInstance();
|
||||
|
||||
// Query item type
|
||||
bool IsType(item::ItemClass item_class) const;
|
||||
|
||||
bool IsClassCommon() const;
|
||||
bool IsClassBag() const;
|
||||
bool IsClassBook() const;
|
||||
|
||||
// Can item be stacked?
|
||||
bool IsStackable() const;
|
||||
bool IsCharged() const;
|
||||
|
||||
// Can item be equipped by/at?
|
||||
bool IsEquipable(uint16 race, uint16 class_) const;
|
||||
bool IsEquipable(int16 slot_id) const;
|
||||
|
||||
//
|
||||
// Augments
|
||||
//
|
||||
bool IsAugmentable() const;
|
||||
bool AvailableWearSlot(uint32 aug_wear_slots) const;
|
||||
int8 AvailableAugmentSlot(int32 augtype) const;
|
||||
bool IsAugmentSlotAvailable(int32 augtype, uint8 slot) const;
|
||||
inline int32 GetAugmentType() const { return ((m_item) ? m_item->AugType : 0); }
|
||||
|
||||
inline bool IsExpendable() const { return ((m_item) ? ((m_item->Click.Type == item::ItemEffectExpendable) || (m_item->ItemType == item::ItemTypePotion)) : false); }
|
||||
|
||||
//
|
||||
// Contents
|
||||
//
|
||||
ItemInstance* GetItem(uint8 slot) const;
|
||||
uint32 GetItemID(uint8 slot) const;
|
||||
inline const ItemInstance* operator[](uint8 slot) const { return GetItem(slot); }
|
||||
void PutItem(uint8 slot, const ItemInstance& inst);
|
||||
void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id) { return; } // not defined anywhere...
|
||||
void DeleteItem(uint8 slot);
|
||||
ItemInstance* PopItem(uint8 index);
|
||||
void Clear();
|
||||
void ClearByFlags(byFlagSetting is_nodrop, byFlagSetting is_norent);
|
||||
uint8 FirstOpenSlot() const;
|
||||
uint8 GetTotalItemCount() const;
|
||||
bool IsNoneEmptyContainer();
|
||||
std::map<uint8, ItemInstance*>* GetContents() { return &m_contents; }
|
||||
|
||||
//
|
||||
// Augments
|
||||
//
|
||||
ItemInstance* GetAugment(uint8 slot) const;
|
||||
uint32 GetAugmentItemID(uint8 slot) const;
|
||||
void PutAugment(uint8 slot, const ItemInstance& inst);
|
||||
void PutAugment(SharedDatabase *db, uint8 slot, uint32 item_id);
|
||||
void DeleteAugment(uint8 slot);
|
||||
ItemInstance* RemoveAugment(uint8 index);
|
||||
bool IsAugmented();
|
||||
ItemInstance* GetOrnamentationAug(int32 ornamentationAugtype) const;
|
||||
bool UpdateOrnamentationInfo();
|
||||
static bool CanTransform(const ItemData *ItemToTry, const ItemData *Container, bool AllowAll = false);
|
||||
|
||||
// Has attack/delay?
|
||||
bool IsWeapon() const;
|
||||
bool IsAmmo() const;
|
||||
|
||||
// Accessors
|
||||
const uint32 GetID() const { return ((m_item) ? m_item->ID : 0); }
|
||||
const uint32 GetItemScriptID() const { return ((m_item) ? m_item->ScriptFileID : 0); }
|
||||
const ItemData* GetItem() const;
|
||||
const ItemData* GetUnscaledItem() const;
|
||||
|
||||
int16 GetCharges() const { return m_charges; }
|
||||
void SetCharges(int16 charges) { m_charges = charges; }
|
||||
|
||||
uint32 GetPrice() const { return m_price; }
|
||||
void SetPrice(uint32 price) { m_price = price; }
|
||||
|
||||
void SetColor(uint32 color) { m_color = color; }
|
||||
uint32 GetColor() const { return m_color; }
|
||||
|
||||
uint32 GetMerchantSlot() const { return m_merchantslot; }
|
||||
void SetMerchantSlot(uint32 slot) { m_merchantslot = slot; }
|
||||
|
||||
int32 GetMerchantCount() const { return m_merchantcount; }
|
||||
void SetMerchantCount(int32 count) { m_merchantcount = count; }
|
||||
|
||||
int16 GetCurrentSlot() const { return m_currentslot; }
|
||||
void SetCurrentSlot(int16 curr_slot) { m_currentslot = curr_slot; }
|
||||
|
||||
// Is this item already attuned?
|
||||
bool IsAttuned() const { return m_attuned; }
|
||||
void SetAttuned(bool flag) { m_attuned = flag; }
|
||||
|
||||
std::string GetCustomDataString() const;
|
||||
std::string GetCustomData(std::string identifier);
|
||||
void SetCustomData(std::string identifier, std::string value);
|
||||
void SetCustomData(std::string identifier, int value);
|
||||
void SetCustomData(std::string identifier, float value);
|
||||
void SetCustomData(std::string identifier, bool value);
|
||||
void DeleteCustomData(std::string identifier);
|
||||
|
||||
// Allows treatment of this object as though it were a pointer to m_item
|
||||
operator bool() const { return (m_item != nullptr); }
|
||||
|
||||
// Compare inner Item_Struct of two ItemInstance objects
|
||||
bool operator==(const ItemInstance& right) const { return (this->m_item == right.m_item); }
|
||||
bool operator!=(const ItemInstance& right) const { return (this->m_item != right.m_item); }
|
||||
|
||||
// Clone current item
|
||||
ItemInstance* Clone() const;
|
||||
|
||||
bool IsSlotAllowed(int16 slot_id) const;
|
||||
|
||||
bool IsDroppable(bool recurse = true) const;
|
||||
|
||||
bool IsScaling() const { return m_scaling; }
|
||||
bool IsEvolving() const { return (m_evolveLvl >= 1); }
|
||||
uint32 GetExp() const { return m_exp; }
|
||||
void SetExp(uint32 exp) { m_exp = exp; }
|
||||
void AddExp(uint32 exp) { m_exp += exp; }
|
||||
bool IsActivated() { return m_activated; }
|
||||
void SetActivated(bool activated) { m_activated = activated; }
|
||||
int8 GetEvolveLvl() const { return m_evolveLvl; }
|
||||
void SetScaling(bool v) { m_scaling = v; }
|
||||
uint32 GetOrnamentationIcon() const { return m_ornamenticon; }
|
||||
void SetOrnamentIcon(uint32 ornament_icon) { m_ornamenticon = ornament_icon; }
|
||||
uint32 GetOrnamentationIDFile() const { return m_ornamentidfile; }
|
||||
void SetOrnamentationIDFile(uint32 ornament_idfile) { m_ornamentidfile = ornament_idfile; }
|
||||
uint32 GetOrnamentHeroModel(int32 material_slot = -1) const;
|
||||
void SetOrnamentHeroModel(uint32 ornament_hero_model) { m_ornament_hero_model = ornament_hero_model; }
|
||||
uint32 GetRecastTimestamp() const { return m_recast_timestamp; }
|
||||
void SetRecastTimestamp(uint32 in) { m_recast_timestamp = in; }
|
||||
|
||||
void Initialize(SharedDatabase *db = nullptr);
|
||||
void ScaleItem();
|
||||
bool EvolveOnAllKills() const;
|
||||
int8 GetMaxEvolveLvl() const;
|
||||
uint32 GetKillsNeeded(uint8 currentlevel);
|
||||
|
||||
std::string Serialize(int16 slot_id) const { InternalSerializedItem_Struct s; s.slot_id = slot_id; s.inst = (const void*)this; std::string ser; ser.assign((char*)&s, sizeof(InternalSerializedItem_Struct)); return ser; }
|
||||
void Serialize(OutBuffer& ob, int16 slot_id) const { InternalSerializedItem_Struct isi; isi.slot_id = slot_id; isi.inst = (const void*)this; ob.write((const char*)&isi, sizeof(isi)); }
|
||||
|
||||
inline int32 GetSerialNumber() const { return m_SerialNumber; }
|
||||
inline void SetSerialNumber(int32 id) { m_SerialNumber = id; }
|
||||
|
||||
std::map<std::string, Timer>& GetTimers() { return m_timers; }
|
||||
void SetTimer(std::string name, uint32 time);
|
||||
void StopTimer(std::string name);
|
||||
void ClearTimers();
|
||||
|
||||
// Get a total of a stat, including augs
|
||||
// These functions should be used in place of other code manually totaling
|
||||
// to centralize where it is done to make future changes easier (ex. whenever powersources come around)
|
||||
// and to minimize errors. CalcItemBonuses however doesn't use these in interest of performance
|
||||
// by default these do not recurse into augs
|
||||
int GetItemArmorClass(bool augments = false) const;
|
||||
int GetItemElementalDamage(int &magic, int &fire, int &cold, int &poison, int &disease, int &chromatic, int &prismatic, int &physical, int &corruption, bool augments = false) const;
|
||||
// These two differ in the fact that they're quick checks (they are checked BEFORE the one above
|
||||
int GetItemElementalFlag(bool augments = false) const;
|
||||
int GetItemElementalDamage(bool augments = false) const;
|
||||
int GetItemRecommendedLevel(bool augments = false) const;
|
||||
int GetItemRequiredLevel(bool augments = false) const;
|
||||
int GetItemWeaponDamage(bool augments = false) const;
|
||||
int GetItemBackstabDamage(bool augments = false) const;
|
||||
// these two are just quick checks
|
||||
int GetItemBaneDamageBody(bool augments = false) const;
|
||||
int GetItemBaneDamageRace(bool augments = false) const;
|
||||
int GetItemBaneDamageBody(bodyType against, bool augments = false) const;
|
||||
int GetItemBaneDamageRace(uint16 against, bool augments = false) const;
|
||||
int GetItemMagical(bool augments = false) const;
|
||||
int GetItemHP(bool augments = false) const;
|
||||
int GetItemMana(bool augments = false) const;
|
||||
int GetItemEndur(bool augments = false) const;
|
||||
int GetItemAttack(bool augments = false) const;
|
||||
int GetItemStr(bool augments = false) const;
|
||||
int GetItemSta(bool augments = false) const;
|
||||
int GetItemDex(bool augments = false) const;
|
||||
int GetItemAgi(bool augments = false) const;
|
||||
int GetItemInt(bool augments = false) const;
|
||||
int GetItemWis(bool augments = false) const;
|
||||
int GetItemCha(bool augments = false) const;
|
||||
int GetItemMR(bool augments = false) const;
|
||||
int GetItemFR(bool augments = false) const;
|
||||
int GetItemCR(bool augments = false) const;
|
||||
int GetItemPR(bool augments = false) const;
|
||||
int GetItemDR(bool augments = false) const;
|
||||
int GetItemCorrup(bool augments = false) const;
|
||||
int GetItemHeroicStr(bool augments = false) const;
|
||||
int GetItemHeroicSta(bool augments = false) const;
|
||||
int GetItemHeroicDex(bool augments = false) const;
|
||||
int GetItemHeroicAgi(bool augments = false) const;
|
||||
int GetItemHeroicInt(bool augments = false) const;
|
||||
int GetItemHeroicWis(bool augments = false) const;
|
||||
int GetItemHeroicCha(bool augments = false) const;
|
||||
int GetItemHeroicMR(bool augments = false) const;
|
||||
int GetItemHeroicFR(bool augments = false) const;
|
||||
int GetItemHeroicCR(bool augments = false) const;
|
||||
int GetItemHeroicPR(bool augments = false) const;
|
||||
int GetItemHeroicDR(bool augments = false) const;
|
||||
int GetItemHeroicCorrup(bool augments = false) const;
|
||||
int GetItemHaste(bool augments = false) const;
|
||||
|
||||
protected:
|
||||
//////////////////////////
|
||||
// Protected Members
|
||||
//////////////////////////
|
||||
friend class InventoryProfile;
|
||||
|
||||
std::map<uint8, ItemInstance*>::const_iterator _cbegin() { return m_contents.cbegin(); }
|
||||
std::map<uint8, ItemInstance*>::const_iterator _cend() { return m_contents.cend(); }
|
||||
|
||||
void _PutItem(uint8 index, ItemInstance* inst) { m_contents[index] = inst; }
|
||||
|
||||
ItemInstTypes m_use_type; // Usage type for item
|
||||
const ItemData* m_item; // Ptr to item data
|
||||
int16 m_charges; // # of charges for chargeable items
|
||||
uint32 m_price; // Bazaar /trader price
|
||||
uint32 m_color;
|
||||
uint32 m_merchantslot;
|
||||
int16 m_currentslot;
|
||||
bool m_attuned;
|
||||
int32 m_merchantcount; //number avaliable on the merchant, -1=unlimited
|
||||
int32 m_SerialNumber; // Unique identifier for this instance of an item. Needed for Bazaar.
|
||||
uint32 m_exp;
|
||||
int8 m_evolveLvl;
|
||||
bool m_activated;
|
||||
ItemData* m_scaledItem;
|
||||
::EvolveInfo* m_evolveInfo;
|
||||
bool m_scaling;
|
||||
uint32 m_ornamenticon;
|
||||
uint32 m_ornamentidfile;
|
||||
uint32 m_ornament_hero_model;
|
||||
uint32 m_recast_timestamp;
|
||||
|
||||
//
|
||||
// Items inside of this item (augs or contents);
|
||||
std::map<uint8, ItemInstance*> m_contents; // Zero-based index: min=0, max=9
|
||||
std::map<std::string, std::string> m_custom_data;
|
||||
std::map<std::string, Timer> m_timers;
|
||||
};
|
||||
}
|
||||
|
||||
class EvolveInfo {
|
||||
public:
|
||||
friend class EQEmu::ItemInstance;
|
||||
//temporary
|
||||
uint16 LvlKills[9];
|
||||
uint32 FirstItem;
|
||||
uint8 MaxLvl;
|
||||
bool AllKills;
|
||||
|
||||
EvolveInfo();
|
||||
EvolveInfo(uint32 first, uint8 max, bool allkills, uint32 L2, uint32 L3, uint32 L4, uint32 L5, uint32 L6, uint32 L7, uint32 L8, uint32 L9, uint32 L10);
|
||||
~EvolveInfo();
|
||||
};
|
||||
|
||||
#endif /*COMMON_ITEM_INSTANCE_H*/
|
||||
+98
-94
@@ -29,7 +29,7 @@
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "../inventory_profile.h"
|
||||
#include "rof_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace RoF
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth);
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 serverSlot);
|
||||
@@ -66,6 +66,9 @@ namespace RoF
|
||||
static inline CastingSlot ServerToRoFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot RoFToServerCastingSlot(CastingSlot slot);
|
||||
|
||||
static inline int ServerToRoFBuffSlot(int index);
|
||||
static inline int RoFToServerBuffSlot(int index);
|
||||
|
||||
void Register(EQStreamIdentifier &into)
|
||||
{
|
||||
//create our opcode manager if we havent already
|
||||
@@ -423,15 +426,8 @@ namespace RoF
|
||||
OUT(buff.y);
|
||||
OUT(buff.x);
|
||||
OUT(buff.z);
|
||||
uint16 buffslot = emu->slotid;
|
||||
// Not sure if this is needs amending for RoF yet.
|
||||
if (buffslot >= 25)
|
||||
{
|
||||
buffslot += 17;
|
||||
}
|
||||
|
||||
// TODO: implement slot_data stuff
|
||||
eq->slotid = buffslot;
|
||||
eq->slotid = ServerToRoFBuffSlot(emu->slotid);
|
||||
|
||||
if (emu->bufffade == 1)
|
||||
eq->bufffade = 1;
|
||||
@@ -447,10 +443,10 @@ namespace RoF
|
||||
outapp->WriteUInt32(0); // tic timer
|
||||
outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ?
|
||||
outapp->WriteUInt16(1); // 1 buff in this packet
|
||||
outapp->WriteUInt32(buffslot);
|
||||
outapp->WriteUInt32(eq->slotid);
|
||||
outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove)
|
||||
outapp->WriteUInt32(0); // Duration
|
||||
outapp->WriteUInt32(0); // ?
|
||||
outapp->WriteUInt32(0); // numhits
|
||||
outapp->WriteUInt8(0); // Caster name
|
||||
outapp->WriteUInt8(0); // Type
|
||||
}
|
||||
@@ -474,17 +470,9 @@ namespace RoF
|
||||
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
||||
__packet->WriteUInt16(emu->count);
|
||||
|
||||
for (uint16 i = 0; i < emu->count; ++i)
|
||||
for (int i = 0; i < emu->count; ++i)
|
||||
{
|
||||
uint16 buffslot = emu->entries[i].buff_slot;
|
||||
if (emu->type == 0) { // only correct for self packets
|
||||
if (emu->entries[i].buff_slot >= 25)
|
||||
buffslot += 17;
|
||||
if (buffslot == 54)
|
||||
buffslot = 62;
|
||||
}
|
||||
|
||||
__packet->WriteUInt32(buffslot);
|
||||
__packet->WriteUInt32(emu->type == 0 ? ServerToRoFBuffSlot(emu->entries[i].buff_slot) : emu->entries[i].buff_slot);
|
||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
||||
@@ -596,7 +584,7 @@ namespace RoF
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||
|
||||
@@ -1504,17 +1492,6 @@ namespace RoF
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_InterruptCast)
|
||||
{
|
||||
ENCODE_LENGTH_EXACT(InterruptCast_Struct);
|
||||
SETUP_DIRECT_ENCODE(InterruptCast_Struct, structs::InterruptCast_Struct);
|
||||
|
||||
OUT(spawnid);
|
||||
OUT(messageid);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
|
||||
|
||||
ENCODE(OP_ItemPacket)
|
||||
@@ -1533,7 +1510,7 @@ namespace RoF
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -2079,7 +2056,7 @@ namespace RoF
|
||||
|
||||
outapp->WriteUInt32(22); // Equipment count
|
||||
|
||||
for (int r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++)
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->item_material.Slot[r].Material);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2099,9 +2076,9 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Equipment2 count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Equipment2 count
|
||||
|
||||
for (int r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++)
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2110,7 +2087,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Tint Count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -2120,7 +2097,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Tint2 Count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint2 Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -3059,12 +3036,12 @@ namespace RoF
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HeroForgeModel;
|
||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Material2;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HerosForgeModel;
|
||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Unknown2;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -4096,7 +4073,7 @@ namespace RoF
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; ++k)
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -4105,15 +4082,15 @@ namespace RoF
|
||||
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HeroForgeModel;
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Material2;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HerosForgeModel;
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Unknown2;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4312,7 +4289,7 @@ namespace RoF
|
||||
IN(buff.unknown003);
|
||||
IN(buff.spellid);
|
||||
IN(buff.duration);
|
||||
IN(slotid);
|
||||
emu->slotid = RoFToServerBuffSlot(eq->slotid);
|
||||
IN(bufffade);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -4325,7 +4302,7 @@ namespace RoF
|
||||
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
||||
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
||||
|
||||
emu->SlotID = (eq->SlotID < 42) ? eq->SlotID : (eq->SlotID - 17);
|
||||
emu->SlotID = RoFToServerBuffSlot(eq->SlotID);
|
||||
|
||||
IN(EntityID);
|
||||
|
||||
@@ -4829,10 +4806,9 @@ namespace RoF
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
||||
for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
// Max Augs is now 6, but no code to support that many yet
|
||||
IN(link_hash);
|
||||
IN(icon);
|
||||
|
||||
@@ -5209,9 +5185,9 @@ namespace RoF
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQEmu::ItemBase *item = inst->GetUnscaledItem();
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
RoF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -5265,7 +5241,7 @@ namespace RoF
|
||||
|
||||
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
|
||||
ornaIcon = inst->GetOrnamentationIcon();
|
||||
heroModel = inst->GetOrnamentHeroModel(Inventory::CalcMaterialFromSlot(slot_id_in));
|
||||
heroModel = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
|
||||
|
||||
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
|
||||
|
||||
@@ -5622,18 +5598,18 @@ namespace RoF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
ItemInst* sub = inst->GetItem(index);
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -5659,17 +5635,17 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor
|
||||
RoFSlot.Type = invtype::InvTypePossessions;
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20)
|
||||
RoFSlot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -5681,8 +5657,8 @@ namespace RoF
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoFSlot.Type = invtype::InvTypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
|
||||
if (RoFSlot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||
RoFSlot.Slot = invslot::PossessionsCursor;
|
||||
@@ -5699,8 +5675,8 @@ namespace RoF
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5710,8 +5686,8 @@ namespace RoF
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5721,8 +5697,8 @@ namespace RoF
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5760,16 +5736,16 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52)
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory
|
||||
RoFSlot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -5782,8 +5758,8 @@ namespace RoF
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown01);
|
||||
@@ -5803,7 +5779,7 @@ namespace RoF
|
||||
|
||||
if (rofSlot.Type == invtype::InvTypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
@@ -5825,8 +5801,8 @@ namespace RoF
|
||||
else // Worn Slots
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -5834,8 +5810,8 @@ namespace RoF
|
||||
else if (rofSlot.Type == invtype::InvTypeBank) {
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5846,8 +5822,8 @@ namespace RoF
|
||||
else if (rofSlot.Type == invtype::InvTypeSharedBank) {
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5858,10 +5834,10 @@ namespace RoF
|
||||
else if (rofSlot.Type == invtype::InvTypeTrade) {
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::legacy::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::inventory::ContainerCount) + RoFSlot.SubSlot;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5872,7 +5848,7 @@ namespace RoF
|
||||
else if (rofSlot.Type == invtype::InvTypeWorld) {
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rofSlot.Slot >= SUB_INDEX_BEGIN)
|
||||
if (rofSlot.Slot >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += rofSlot.Slot;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
@@ -5903,7 +5879,7 @@ namespace RoF
|
||||
|
||||
if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
@@ -5920,8 +5896,8 @@ namespace RoF
|
||||
else
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6085,4 +6061,32 @@ namespace RoF
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
// these should be optimized out for RoF since they should all boil down to return index :P
|
||||
// but lets leave it here for future proofing
|
||||
static inline int ServerToRoFBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||
constants::LongBuffs + constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= EQEmu::constants::LongBuffs)
|
||||
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
static inline int RoFToServerBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||
EQEmu::constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= constants::LongBuffs)
|
||||
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
} /*RoF*/
|
||||
|
||||
+118
-119
@@ -29,7 +29,7 @@
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "../inventory_profile.h"
|
||||
#include "rof2_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace RoF2
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot, ItemPacketType PacketType = ItemPacketInvalid);
|
||||
@@ -66,6 +66,9 @@ namespace RoF2
|
||||
static inline CastingSlot ServerToRoF2CastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot RoF2ToServerCastingSlot(CastingSlot slot);
|
||||
|
||||
static inline int ServerToRoF2BuffSlot(int index);
|
||||
static inline int RoF2ToServerBuffSlot(int index);
|
||||
|
||||
void Register(EQStreamIdentifier &into)
|
||||
{
|
||||
//create our opcode manager if we havent already
|
||||
@@ -492,18 +495,7 @@ namespace RoF2
|
||||
OUT(buff.y);
|
||||
OUT(buff.x);
|
||||
OUT(buff.z);
|
||||
uint16 buffslot = emu->slotid;
|
||||
// Not sure if this is needs amending for RoF2 yet.
|
||||
if (buffslot >= 25)
|
||||
{
|
||||
buffslot += 17;
|
||||
}
|
||||
// TODO: We should really just deal with these "server side"
|
||||
// so we can have clients not limited to other clients.
|
||||
// This fixes discs, songs were changed to 20
|
||||
if (buffslot == 54)
|
||||
buffslot = 62;
|
||||
eq->slotid = buffslot;
|
||||
eq->slotid = ServerToRoF2BuffSlot(emu->slotid);
|
||||
// TODO: implement slot_data stuff
|
||||
if (emu->bufffade == 1)
|
||||
eq->bufffade = 1;
|
||||
@@ -519,10 +511,10 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0); // tic timer
|
||||
outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ?
|
||||
outapp->WriteUInt16(1); // 1 buff in this packet
|
||||
outapp->WriteUInt32(buffslot);
|
||||
outapp->WriteUInt32(eq->slotid);
|
||||
outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove)
|
||||
outapp->WriteUInt32(0); // Duration
|
||||
outapp->WriteUInt32(0); // ?
|
||||
outapp->WriteUInt32(0); // numhits
|
||||
outapp->WriteUInt8(0); // Caster name
|
||||
outapp->WriteUInt8(0); // Type
|
||||
}
|
||||
@@ -546,20 +538,9 @@ namespace RoF2
|
||||
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
||||
__packet->WriteUInt16(emu->count);
|
||||
|
||||
for (uint16 i = 0; i < emu->count; ++i)
|
||||
for (int i = 0; i < emu->count; ++i)
|
||||
{
|
||||
uint16 buffslot = emu->entries[i].buff_slot;
|
||||
if (emu->type == 0) { // only correct for self packets
|
||||
if (emu->entries[i].buff_slot >= 25)
|
||||
buffslot += 17;
|
||||
// TODO: We should really just deal with these "server side"
|
||||
// so we can have clients not limited to other clients.
|
||||
// This fixes discs, songs were changed to 20
|
||||
if (buffslot == 54)
|
||||
buffslot = 62;
|
||||
}
|
||||
|
||||
__packet->WriteUInt32(buffslot);
|
||||
__packet->WriteUInt32(emu->type == 0 ? ServerToRoF2BuffSlot(emu->entries[i].buff_slot) : emu->entries[i].buff_slot);
|
||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
||||
@@ -671,7 +652,7 @@ namespace RoF2
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
||||
if (ob.tellp() == last_pos)
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||
|
||||
@@ -1201,17 +1182,17 @@ namespace RoF2
|
||||
// Leader
|
||||
//
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_STRING(Buffer, gu2->yourname);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // index
|
||||
VARSTRUCT_ENCODE_STRING(Buffer, gu2->yourname); // name
|
||||
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, 0); // owner name of merc
|
||||
//VARSTRUCT_ENCODE_STRING(Buffer, "");
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // This is a string
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0x46); // Observed 0x41 and 0x46 here
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // This is a string
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0x46); // level
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group tank flag
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group assist flag
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group puller flag
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // offline
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // timestamp
|
||||
|
||||
int MemberNumber = 1;
|
||||
|
||||
@@ -1220,17 +1201,17 @@ namespace RoF2
|
||||
if (gu2->membername[i][0] == '\0')
|
||||
continue;
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, MemberNumber++);
|
||||
VARSTRUCT_ENCODE_STRING(Buffer, gu2->membername[i]);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, MemberNumber++); // index
|
||||
VARSTRUCT_ENCODE_STRING(Buffer, gu2->membername[i]); // name
|
||||
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, 0); // merc flag
|
||||
//VARSTRUCT_ENCODE_STRING(Buffer, "");
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // This is a string
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0x41); // Observed 0x41 and 0x46 here
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // Low byte is Main Assist Flag
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // owner name fo merc
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0x41); // level
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group tank flag
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group assist flag
|
||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group puller flag
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // offline
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // timestamp
|
||||
}
|
||||
|
||||
//Log.Hex(Logs::Netcode, outapp->pBuffer, outapp->size);
|
||||
@@ -1579,17 +1560,6 @@ namespace RoF2
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_InterruptCast)
|
||||
{
|
||||
ENCODE_LENGTH_EXACT(InterruptCast_Struct);
|
||||
SETUP_DIRECT_ENCODE(InterruptCast_Struct, structs::InterruptCast_Struct);
|
||||
|
||||
OUT(spawnid);
|
||||
OUT(messageid);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
|
||||
|
||||
ENCODE(OP_ItemPacket)
|
||||
@@ -1609,7 +1579,7 @@ namespace RoF2
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||
if (ob.tellp() == last_pos) {
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -2164,7 +2134,7 @@ namespace RoF2
|
||||
|
||||
outapp->WriteUInt32(22); // Equipment count
|
||||
|
||||
for (int r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++)
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->item_material.Slot[r].Material);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2184,9 +2154,9 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Equipment2 count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Equipment2 count
|
||||
|
||||
for (int r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++)
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2195,7 +2165,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Tint Count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -2205,7 +2175,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Tint2 Count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint2 Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -3154,12 +3124,12 @@ namespace RoF2
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HeroForgeModel;
|
||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Material2;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HerosForgeModel;
|
||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Unknown2;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -4321,7 +4291,7 @@ namespace RoF2
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; ++k)
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -4330,15 +4300,15 @@ namespace RoF2
|
||||
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HeroForgeModel;
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Material2;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HerosForgeModel;
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Unknown2;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4550,7 +4520,7 @@ namespace RoF2
|
||||
IN(buff.unknown003);
|
||||
IN(buff.spellid);
|
||||
IN(buff.duration);
|
||||
IN(slotid);
|
||||
emu->slotid = RoF2ToServerBuffSlot(eq->slotid);
|
||||
IN(bufffade);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -4563,7 +4533,7 @@ namespace RoF2
|
||||
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
||||
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
||||
|
||||
emu->SlotID = (eq->SlotID < 42) ? eq->SlotID : (eq->SlotID - 17);
|
||||
emu->SlotID = RoF2ToServerBuffSlot(eq->SlotID);
|
||||
|
||||
IN(EntityID);
|
||||
|
||||
@@ -5066,7 +5036,7 @@ namespace RoF2
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
||||
for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
IN(link_hash);
|
||||
@@ -5184,6 +5154,7 @@ namespace RoF2
|
||||
|
||||
IN(type);
|
||||
IN(invslot);
|
||||
IN(subslot);
|
||||
emu->window = (uint8)eq->window;
|
||||
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
|
||||
|
||||
@@ -5499,9 +5470,9 @@ namespace RoF2
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||
{
|
||||
const EQEmu::ItemBase *item = inst->GetUnscaledItem();
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
RoF2::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -5555,7 +5526,7 @@ namespace RoF2
|
||||
|
||||
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
|
||||
ornaIcon = inst->GetOrnamentationIcon();
|
||||
heroModel = inst->GetOrnamentHeroModel(Inventory::CalcMaterialFromSlot(slot_id_in));
|
||||
heroModel = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
|
||||
|
||||
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
|
||||
|
||||
@@ -5922,18 +5893,18 @@ namespace RoF2
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
ItemInst* sub = inst->GetItem(index);
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -5959,7 +5930,7 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor
|
||||
if (PacketType == ItemPacketLoot)
|
||||
{
|
||||
RoF2Slot.Type = invtype::InvTypeCorpse;
|
||||
@@ -5971,13 +5942,13 @@ namespace RoF2
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
}
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20)
|
||||
RoF2Slot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -5989,8 +5960,8 @@ namespace RoF2
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoF2Slot.Type = invtype::InvTypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
|
||||
if (RoF2Slot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||
RoF2Slot.Slot = invslot::PossessionsCursor;
|
||||
@@ -6007,8 +5978,8 @@ namespace RoF2
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6018,8 +5989,8 @@ namespace RoF2
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6029,8 +6000,8 @@ namespace RoF2
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6068,16 +6039,16 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52)
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory
|
||||
RoF2Slot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -6090,8 +6061,8 @@ namespace RoF2
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown01);
|
||||
@@ -6111,7 +6082,7 @@ namespace RoF2
|
||||
|
||||
if (rof2Slot.Type == invtype::InvTypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
@@ -6133,8 +6104,8 @@ namespace RoF2
|
||||
else // Worn Slots
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6142,8 +6113,8 @@ namespace RoF2
|
||||
else if (rof2Slot.Type == invtype::InvTypeBank) {
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6154,8 +6125,8 @@ namespace RoF2
|
||||
else if (rof2Slot.Type == invtype::InvTypeSharedBank) {
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6166,8 +6137,8 @@ namespace RoF2
|
||||
else if (rof2Slot.Type == invtype::InvTypeTrade) {
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
||||
|
||||
@@ -6180,7 +6151,7 @@ namespace RoF2
|
||||
else if (rof2Slot.Type == invtype::InvTypeWorld) {
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rof2Slot.Slot >= SUB_INDEX_BEGIN)
|
||||
if (rof2Slot.Slot >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += rof2Slot.Slot;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
@@ -6215,7 +6186,7 @@ namespace RoF2
|
||||
|
||||
if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
@@ -6232,8 +6203,8 @@ namespace RoF2
|
||||
else
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6388,4 +6359,32 @@ namespace RoF2
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
// these should be optimized out for RoF2 since they should all boil down to return index :P
|
||||
// but lets leave it here for future proofing
|
||||
static inline int ServerToRoF2BuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||
constants::LongBuffs + constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= EQEmu::constants::LongBuffs)
|
||||
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
static inline int RoF2ToServerBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||
EQEmu::constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= constants::LongBuffs)
|
||||
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
} /*RoF2*/
|
||||
|
||||
@@ -277,6 +277,14 @@ namespace RoF2
|
||||
|
||||
const size_t SayLinkBodySize = 56;
|
||||
|
||||
const int LongBuffs = 42;
|
||||
const int ShortBuffs = 20;
|
||||
const int DiscBuffs = 1;
|
||||
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||
const int NPCBuffs = 97;
|
||||
const int PetBuffs = NPCBuffs;
|
||||
const int MercBuffs = LongBuffs;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
|
||||
@@ -85,7 +85,6 @@ E(OP_HPUpdate)
|
||||
E(OP_Illusion)
|
||||
E(OP_InspectBuffs)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_InterruptCast)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_ItemVerifyReply)
|
||||
|
||||
@@ -190,7 +190,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1082,7 +1082,7 @@ union
|
||||
/*00184*/ Texture_Struct equipment[22]; // Total Slots
|
||||
};
|
||||
/*00624*/ uint32 equip2_count; // Seen 9
|
||||
/*00628*/ Texture_Struct equipment2[EQEmu::textures::TextureCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00628*/ Texture_Struct equipment2[EQEmu::textures::materialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00808*/ uint32 tint_count; // Seen 9
|
||||
/*00812*/ TintProfile item_tint; // RR GG BB 00
|
||||
/*00848*/ uint32 tint_count2; // Seen 9
|
||||
@@ -2423,7 +2423,7 @@ struct AdventureLeaderboard_Struct
|
||||
/*struct Item_Shop_Struct {
|
||||
uint16 merchantid;
|
||||
uint8 itemtype;
|
||||
ItemBase item;
|
||||
ItemData item;
|
||||
uint8 iss_unknown001[6];
|
||||
};*/
|
||||
|
||||
@@ -2566,9 +2566,12 @@ struct GroupJoin_Struct_Live { // New for Live
|
||||
};
|
||||
|
||||
struct GroupJoin_Struct {
|
||||
/*000*/ char unknown000[64];
|
||||
/*000*/ char owner_name[64]; // merc
|
||||
/*064*/ char membername[64];
|
||||
/*128*/ uint8 unknown128[20]; // Leadership AA ?
|
||||
/*128*/ uint8 merc;
|
||||
/*129*/ uint8 padding129[3];
|
||||
/*132*/ uint32 level;
|
||||
/*136*/ uint8 unknown136[12]; // group ID most likely in here judging from like captures (unused by client)
|
||||
/*148*/
|
||||
};
|
||||
|
||||
@@ -2826,7 +2829,8 @@ struct BookText_Struct {
|
||||
struct BookRequest_Struct {
|
||||
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
|
||||
/*0004*/ uint16 invslot; // Is the slot, but the RoF2 conversion causes it to fail. Turned to 0 since it isnt required anyway.
|
||||
/*0008*/ uint32 unknown006; // Seen FFFFFFFF
|
||||
/*0006*/ int16 subslot; // Inventory sub-slot (0-x)
|
||||
/*0008*/ uint16 unknown006; // Seen FFFF
|
||||
/*0010*/ uint16 unknown008; // seen 0000
|
||||
/*0012*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
|
||||
/*0016*/ uint32 unknown0012;
|
||||
|
||||
@@ -268,6 +268,14 @@ namespace RoF
|
||||
|
||||
const size_t SayLinkBodySize = 55;
|
||||
|
||||
const int LongBuffs = 42;
|
||||
const int ShortBuffs = 20;
|
||||
const int DiscBuffs = 1;
|
||||
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||
const int NPCBuffs = 97;
|
||||
const int PetBuffs = NPCBuffs;
|
||||
const int MercBuffs = LongBuffs;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
|
||||
@@ -70,7 +70,6 @@ E(OP_HPUpdate)
|
||||
E(OP_Illusion)
|
||||
E(OP_InspectBuffs)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_InterruptCast)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_ItemVerifyReply)
|
||||
|
||||
@@ -190,7 +190,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2021,7 +2021,7 @@ struct LootingItem_Struct {
|
||||
/*004*/ uint32 looter;
|
||||
/*008*/ uint16 slot_id;
|
||||
/*010*/ uint16 unknown10;
|
||||
/*012*/ uint32 auto_loot;
|
||||
/*012*/ int32 auto_loot;
|
||||
/*016*/ uint32 unknown16;
|
||||
/*020*/
|
||||
};
|
||||
@@ -2450,7 +2450,7 @@ struct AdventureLeaderboard_Struct
|
||||
/*struct Item_Shop_Struct {
|
||||
uint16 merchantid;
|
||||
uint8 itemtype;
|
||||
ItemBase item;
|
||||
ItemData item;
|
||||
uint8 iss_unknown001[6];
|
||||
};*/
|
||||
|
||||
|
||||
+54
-25
@@ -29,7 +29,7 @@
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "../item_instance.h"
|
||||
#include "sod_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace SoD
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth);
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline uint32 ServerToSoDSlot(uint32 ServerSlot);
|
||||
@@ -62,6 +62,9 @@ namespace SoD
|
||||
static inline CastingSlot ServerToSoDCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot SoDToServerCastingSlot(CastingSlot slot);
|
||||
|
||||
static inline int ServerToSoDBuffSlot(int index);
|
||||
static inline int SoDToServerBuffSlot(int index);
|
||||
|
||||
void Register(EQStreamIdentifier &into)
|
||||
{
|
||||
//create our opcode manager if we havent already
|
||||
@@ -315,7 +318,7 @@ namespace SoD
|
||||
OUT(buff.duration);
|
||||
OUT(buff.counters);
|
||||
OUT(buff.player_id);
|
||||
OUT(slotid);
|
||||
eq->slotid = ServerToSoDBuffSlot(emu->slotid);
|
||||
OUT(bufffade);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -396,7 +399,7 @@ namespace SoD
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||
|
||||
@@ -1060,7 +1063,7 @@ namespace SoD
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -1558,7 +1561,7 @@ namespace SoD
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++) {
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -1998,10 +2001,10 @@ namespace SoD
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -2568,7 +2571,7 @@ namespace SoD
|
||||
float SpawnSize = emu->size;
|
||||
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
||||
{
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
|
||||
if (emu->size == 0)
|
||||
{
|
||||
@@ -2765,7 +2768,7 @@ namespace SoD
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; ++k)
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -2792,13 +2795,13 @@ namespace SoD
|
||||
{
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
}
|
||||
if (strlen(emu->title))
|
||||
{
|
||||
@@ -2921,8 +2924,8 @@ namespace SoD
|
||||
IN(buff.bard_modifier);
|
||||
IN(buff.spellid);
|
||||
IN(buff.duration);
|
||||
IN(buff.counters)
|
||||
IN(slotid);
|
||||
IN(buff.counters);
|
||||
emu->slotid = SoDToServerBuffSlot(eq->slotid);
|
||||
IN(bufffade);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -3553,9 +3556,9 @@ namespace SoD
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQEmu::ItemBase *item = inst->GetUnscaledItem();
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
SoD::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -3869,18 +3872,18 @@ namespace SoD
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
ItemInst* sub = inst->GetItem(index);
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -3898,7 +3901,7 @@ namespace SoD
|
||||
{
|
||||
uint32 SoDSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
SoDSlot = serverSlot + 11;
|
||||
@@ -3906,7 +3909,7 @@ namespace SoD
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
SoDSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
SoDSlot = serverSlot;
|
||||
@@ -3932,7 +3935,7 @@ namespace SoD
|
||||
else if (sodSlot >= invbag::SharedBankBagsBegin && sodSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else
|
||||
ServerSlot = sodSlot;
|
||||
return ServerSlot;
|
||||
@@ -4088,4 +4091,30 @@ namespace SoD
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ServerToSoDBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||
constants::LongBuffs + constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= EQEmu::constants::LongBuffs)
|
||||
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
static inline int SoDToServerBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||
EQEmu::constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= constants::LongBuffs)
|
||||
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
} /*SoD*/
|
||||
|
||||
@@ -295,6 +295,14 @@ namespace SoD
|
||||
|
||||
const size_t SayLinkBodySize = 50;
|
||||
|
||||
const int LongBuffs = 25;
|
||||
const int ShortBuffs = 15;
|
||||
const int DiscBuffs = 1;
|
||||
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||
const int NPCBuffs = 85;
|
||||
const int PetBuffs = NPCBuffs;
|
||||
const int MercBuffs = LongBuffs;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -195,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
@@ -1666,7 +1666,7 @@ struct LootingItem_Struct {
|
||||
/*000*/ uint32 lootee;
|
||||
/*004*/ uint32 looter;
|
||||
/*008*/ uint32 slot_id;
|
||||
/*012*/ uint32 auto_loot;
|
||||
/*012*/ int32 auto_loot;
|
||||
/*016*/ uint32 unknown16;
|
||||
/*020*/
|
||||
};
|
||||
@@ -1970,7 +1970,7 @@ struct AdventureLeaderboard_Struct
|
||||
/*struct Item_Shop_Struct {
|
||||
uint16 merchantid;
|
||||
uint8 itemtype;
|
||||
ItemBase item;
|
||||
ItemData item;
|
||||
uint8 iss_unknown001[6];
|
||||
};*/
|
||||
|
||||
|
||||
+51
-22
@@ -29,7 +29,7 @@
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "../item_instance.h"
|
||||
#include "sof_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace SoF
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth);
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline uint32 ServerToSoFSlot(uint32 serverSlot);
|
||||
@@ -62,6 +62,9 @@ namespace SoF
|
||||
static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 itemlocation);
|
||||
|
||||
static inline int ServerToSoFBuffSlot(int index);
|
||||
static inline int SoFToServerBuffSlot(int index);
|
||||
|
||||
void Register(EQStreamIdentifier &into)
|
||||
{
|
||||
//create our opcode manager if we havent already
|
||||
@@ -297,7 +300,7 @@ namespace SoF
|
||||
OUT(buff.duration);
|
||||
OUT(buff.counters);
|
||||
OUT(buff.player_id);
|
||||
OUT(slotid);
|
||||
eq->slotid = ServerToSoFBuffSlot(emu->slotid);
|
||||
OUT(bufffade);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -378,7 +381,7 @@ namespace SoF
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||
|
||||
@@ -857,7 +860,7 @@ namespace SoF
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -1230,7 +1233,7 @@ namespace SoF
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++) {
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -1670,10 +1673,10 @@ namespace SoF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -2101,10 +2104,10 @@ namespace SoF
|
||||
eq->deity = emu->deity;
|
||||
eq->drakkin_heritage = emu->drakkin_heritage;
|
||||
eq->gender = emu->gender;
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
eq->equipment.Slot[k].Material = emu->equipment.Slot[k].Material;
|
||||
eq->equipment.Slot[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
eq->equipment.Slot[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
eq->equipment.Slot[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||
}
|
||||
eq->StandState = emu->StandState;
|
||||
@@ -2167,7 +2170,7 @@ namespace SoF
|
||||
strcpy(eq->name, emu->name);
|
||||
eq->petOwnerId = emu->petOwnerId;
|
||||
eq->pvp = 0; // 0 = non-pvp colored name, 1 = red pvp name
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||
}
|
||||
eq->anon = emu->anon;
|
||||
@@ -2375,7 +2378,7 @@ namespace SoF
|
||||
IN(buff.duration);
|
||||
IN(buff.counters);
|
||||
IN(buff.player_id);
|
||||
IN(slotid);
|
||||
emu->slotid = SoFToServerBuffSlot(eq->slotid);
|
||||
IN(bufffade);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -2923,9 +2926,9 @@ namespace SoF
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQEmu::ItemBase *item = inst->GetUnscaledItem();
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
SoF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -3237,18 +3240,18 @@ namespace SoF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
ItemInst* sub = inst->GetItem(index);
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -3266,7 +3269,7 @@ namespace SoF
|
||||
{
|
||||
uint32 SoFSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
SoFSlot = serverSlot + 11;
|
||||
@@ -3274,7 +3277,7 @@ namespace SoF
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
SoFSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
SoFSlot = serverSlot;
|
||||
@@ -3301,7 +3304,7 @@ namespace SoF
|
||||
else if (sofSlot >= invbag::SharedBankBagsBegin && sofSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else
|
||||
ServerSlot = sofSlot;
|
||||
|
||||
@@ -3461,4 +3464,30 @@ namespace SoF
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ServerToSoFBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||
constants::LongBuffs + constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= EQEmu::constants::LongBuffs)
|
||||
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
static inline int SoFToServerBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||
EQEmu::constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= constants::LongBuffs)
|
||||
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
} /*SoF*/
|
||||
|
||||
@@ -295,6 +295,14 @@ namespace SoF
|
||||
|
||||
const size_t SayLinkBodySize = 50;
|
||||
|
||||
const int LongBuffs = 25;
|
||||
const int ShortBuffs = 15;
|
||||
const int DiscBuffs = 1;
|
||||
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||
const int NPCBuffs = 60;
|
||||
const int PetBuffs = 30;
|
||||
const int MercBuffs = 0;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -195,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
@@ -1648,7 +1648,7 @@ struct LootingItem_Struct {
|
||||
/*002*/ uint32 looter;
|
||||
/*004*/ uint16 slot_id;
|
||||
/*006*/ uint8 unknown3[2];
|
||||
/*008*/ uint32 auto_loot;
|
||||
/*008*/ int32 auto_loot;
|
||||
};
|
||||
|
||||
struct GuildManageStatus_Struct{
|
||||
|
||||
+45
-16
@@ -30,7 +30,7 @@
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "../item_instance.h"
|
||||
#include "titanium_structs.h"
|
||||
|
||||
#include <sstream>
|
||||
@@ -42,7 +42,7 @@ namespace Titanium
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth);
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline int16 ServerToTitaniumSlot(uint32 serverSlot);
|
||||
@@ -61,6 +61,9 @@ namespace Titanium
|
||||
static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 itemlocation);
|
||||
|
||||
static inline int ServerToTitaniumBuffSlot(int index);
|
||||
static inline int TitaniumToServerBuffSlot(int index);
|
||||
|
||||
void Register(EQStreamIdentifier &into)
|
||||
{
|
||||
auto Config = EQEmuConfig::get();
|
||||
@@ -270,7 +273,7 @@ namespace Titanium
|
||||
OUT(buff.duration);
|
||||
OUT(buff.counters);
|
||||
OUT(buff.player_id);
|
||||
OUT(slotid);
|
||||
eq->slotid = ServerToTitaniumBuffSlot(emu->slotid);
|
||||
OUT(bufffade);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -329,7 +332,7 @@ namespace Titanium
|
||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||
|
||||
for (int r = 0; r < itemcount; r++, eq++) {
|
||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||
|
||||
@@ -815,7 +818,7 @@ namespace Titanium
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -981,7 +984,7 @@ namespace Titanium
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++) {
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
OUT(item_material.Slot[r].Material);
|
||||
OUT(item_tint.Slot[r].Color);
|
||||
}
|
||||
@@ -1301,14 +1304,14 @@ namespace Titanium
|
||||
if (eq->Race[char_index] > 473)
|
||||
eq->Race[char_index] = 1;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
eq->CS_Colors[char_index].Slot[index].Color = emu_cse->Equip[index].Color;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = emu_cse->BeardColor;
|
||||
eq->HairStyle[char_index] = emu_cse->HairStyle;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
eq->Equip[char_index].Slot[index].Material = emu_cse->Equip[index].Material;
|
||||
}
|
||||
|
||||
@@ -1338,14 +1341,14 @@ namespace Titanium
|
||||
for (; char_index < 10; ++char_index) {
|
||||
eq->Race[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
eq->CS_Colors[char_index].Slot[index].Color = 0;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = 0;
|
||||
eq->HairStyle[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
eq->Equip[char_index].Slot[index].Material = 0;
|
||||
}
|
||||
|
||||
@@ -1677,7 +1680,7 @@ namespace Titanium
|
||||
eq->petOwnerId = emu->petOwnerId;
|
||||
eq->guildrank = emu->guildrank;
|
||||
// eq->unknown0194[3] = emu->unknown0194[3];
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
eq->equipment.Slot[k].Material = emu->equipment.Slot[k].Material;
|
||||
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||
}
|
||||
@@ -1779,7 +1782,7 @@ namespace Titanium
|
||||
IN(buff.duration);
|
||||
IN(buff.counters);
|
||||
IN(buff.player_id);
|
||||
IN(slotid);
|
||||
emu->slotid = TitaniumToServerBuffSlot(eq->slotid);
|
||||
IN(bufffade);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@@ -2216,10 +2219,10 @@ namespace Titanium
|
||||
}
|
||||
|
||||
// file scope helper methods
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const char* protection = "\\\\\\\\\\";
|
||||
const EQEmu::ItemBase* item = inst->GetUnscaledItem();
|
||||
const EQEmu::ItemData* item = inst->GetUnscaledItem();
|
||||
|
||||
ob << StringFormat("%.*s%s", (depth ? (depth - 1) : 0), protection, (depth ? "\"" : "")); // For leading quotes (and protection) if a subitem;
|
||||
|
||||
@@ -2437,10 +2440,10 @@ namespace Titanium
|
||||
ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data
|
||||
|
||||
// Sub data
|
||||
for (int index = SUB_INDEX_BEGIN; index < invbag::ItemBagSize; ++index) {
|
||||
for (int index = EQEmu::inventory::containerBegin; index < invbag::ItemBagSize; ++index) {
|
||||
ob << '|';
|
||||
|
||||
ItemInst* sub = inst->GetItem(index);
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
@@ -2632,4 +2635,30 @@ namespace Titanium
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ServerToTitaniumBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||
constants::LongBuffs + constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= EQEmu::constants::LongBuffs)
|
||||
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
static inline int TitaniumToServerBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||
EQEmu::constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= constants::LongBuffs)
|
||||
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
} /*Titanium*/
|
||||
|
||||
@@ -294,6 +294,14 @@ namespace Titanium
|
||||
|
||||
const size_t SayLinkBodySize = 45;
|
||||
|
||||
const int LongBuffs = 25;
|
||||
const int ShortBuffs = 12;
|
||||
const int DiscBuffs = 1;
|
||||
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||
const int NPCBuffs = 60;
|
||||
const int PetBuffs = 30;
|
||||
const int MercBuffs = 0;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
|
||||
@@ -144,7 +144,7 @@ struct TintProfile {
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -167,7 +167,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -1420,7 +1420,7 @@ struct LootingItem_Struct {
|
||||
/*002*/ uint32 looter;
|
||||
/*004*/ uint16 slot_id;
|
||||
/*006*/ uint8 unknown3[2];
|
||||
/*008*/ uint32 auto_loot;
|
||||
/*008*/ int32 auto_loot;
|
||||
};
|
||||
|
||||
struct GuildManageStatus_Struct{
|
||||
|
||||
+57
-44
@@ -29,7 +29,7 @@
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "../item_instance.h"
|
||||
#include "uf_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace UF
|
||||
static OpcodeManager *opcodes = nullptr;
|
||||
static Strategy struct_strategy;
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth);
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||
|
||||
// server to client inventory location converters
|
||||
static inline uint32 ServerToUFSlot(uint32 serverSlot);
|
||||
@@ -62,6 +62,9 @@ namespace UF
|
||||
static inline CastingSlot ServerToUFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot UFToServerCastingSlot(CastingSlot slot);
|
||||
|
||||
static inline int ServerToUFBuffSlot(int index);
|
||||
static inline int UFToServerBuffSlot(int index);
|
||||
|
||||
void Register(EQStreamIdentifier &into)
|
||||
{
|
||||
//create our opcode manager if we havent already
|
||||
@@ -377,17 +380,8 @@ namespace UF
|
||||
OUT(buff.spellid);
|
||||
OUT(buff.duration);
|
||||
OUT(buff.num_hits);
|
||||
uint16 buffslot = emu->slotid;
|
||||
if (buffslot >= 25 && buffslot < 37)
|
||||
{
|
||||
buffslot += 5;
|
||||
}
|
||||
else if (buffslot >= 37)
|
||||
{
|
||||
buffslot += 14;
|
||||
}
|
||||
// TODO: implement slot_data stuff
|
||||
eq->slotid = buffslot;
|
||||
eq->slotid = ServerToUFBuffSlot(emu->slotid);
|
||||
OUT(bufffade); // Live (October 2011) sends a 2 rather than 0 when a buff is created, but it doesn't seem to matter.
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -407,17 +401,9 @@ namespace UF
|
||||
__packet->WriteUInt8(emu->all_buffs); // 1 = all buffs, 0 = 1 buff
|
||||
__packet->WriteUInt16(emu->count);
|
||||
|
||||
for (uint16 i = 0; i < emu->count; ++i)
|
||||
for (int i = 0; i < emu->count; ++i)
|
||||
{
|
||||
uint16 buffslot = emu->entries[i].buff_slot;
|
||||
if (emu->type == 0) { // only correct for self packets
|
||||
if (emu->entries[i].buff_slot >= 25 && emu->entries[i].buff_slot < 37)
|
||||
buffslot += 5;
|
||||
else if (emu->entries[i].buff_slot >= 37)
|
||||
buffslot += 14;
|
||||
}
|
||||
|
||||
__packet->WriteUInt32(buffslot);
|
||||
__packet->WriteUInt32(emu->type == 0 ? ServerToUFBuffSlot(emu->entries[i].buff_slot) : emu->entries[i].buff_slot);
|
||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||
__packet->WriteUInt32(emu->entries[i].num_hits);
|
||||
@@ -541,7 +527,7 @@ namespace UF
|
||||
ob.write((const char*)&item_count, sizeof(uint32));
|
||||
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||
|
||||
@@ -1293,7 +1279,7 @@ namespace UF
|
||||
|
||||
ob.write((const char*)__emu_buffer, 4);
|
||||
|
||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||
if (ob.tellp() == last_pos) {
|
||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||
delete in;
|
||||
@@ -1817,7 +1803,7 @@ namespace UF
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++) {
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -2301,10 +2287,10 @@ namespace UF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -2869,7 +2855,7 @@ namespace UF
|
||||
float SpawnSize = emu->size;
|
||||
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
||||
{
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
|
||||
if (emu->size == 0)
|
||||
{
|
||||
@@ -3068,7 +3054,7 @@ namespace UF
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; ++k)
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -3104,17 +3090,17 @@ namespace UF
|
||||
{
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
if (emu->equipment.Slot[k].Material > 99999) {
|
||||
Equipment[k].Material = 63;
|
||||
} else {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
}
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
}
|
||||
if (strlen(emu->title))
|
||||
{
|
||||
@@ -3236,6 +3222,7 @@ namespace UF
|
||||
IN(buff.unknown003);
|
||||
IN(buff.spellid);
|
||||
IN(buff.duration);
|
||||
emu->slotid = UFToServerBuffSlot(eq->slotid);
|
||||
IN(slotid);
|
||||
IN(bufffade);
|
||||
|
||||
@@ -3249,7 +3236,7 @@ namespace UF
|
||||
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
||||
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
||||
|
||||
emu->SlotID = (eq->SlotID < 30) ? eq->SlotID : (eq->SlotID - 5);
|
||||
emu->SlotID = UFToServerBuffSlot(eq->SlotID);
|
||||
|
||||
IN(EntityID);
|
||||
|
||||
@@ -3847,9 +3834,9 @@ namespace UF
|
||||
return NextItemInstSerialNumber;
|
||||
}
|
||||
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
||||
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQEmu::ItemBase *item = inst->GetUnscaledItem();
|
||||
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
UF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
@@ -3893,7 +3880,7 @@ namespace UF
|
||||
int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
|
||||
uint16 ornaIcon = 0;
|
||||
if (inst->GetOrnamentationAug(ornamentationAugtype)) {
|
||||
const EQEmu::ItemBase *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
|
||||
const EQEmu::ItemData *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
|
||||
ornaIcon = aug_weap->Icon;
|
||||
|
||||
ob.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
|
||||
@@ -4224,18 +4211,18 @@ namespace UF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
ItemInst* sub = inst->GetItem(index);
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -4253,7 +4240,7 @@ namespace UF
|
||||
{
|
||||
uint32 UnderfootSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
UnderfootSlot = serverSlot + 11;
|
||||
@@ -4261,7 +4248,7 @@ namespace UF
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
UnderfootSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
UnderfootSlot = serverSlot;
|
||||
@@ -4288,7 +4275,7 @@ namespace UF
|
||||
else if (ufSlot >= invbag::SharedBankBagsBegin && ufSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else
|
||||
ServerSlot = ufSlot;
|
||||
|
||||
@@ -4453,4 +4440,30 @@ namespace UF
|
||||
return EQEmu::CastingSlot::Discipline;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int ServerToUFBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||
constants::LongBuffs + constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= EQEmu::constants::LongBuffs)
|
||||
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
static inline int UFToServerBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||
EQEmu::constants::ShortBuffs;
|
||||
// we're a song
|
||||
if (index >= constants::LongBuffs)
|
||||
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
} /*UF*/
|
||||
|
||||
+24
-16
@@ -64,7 +64,7 @@ namespace UF
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
@@ -115,21 +115,21 @@ namespace UF
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
@@ -148,27 +148,27 @@ namespace UF
|
||||
ItemPacketCharmUpdate = 110,
|
||||
ItemPacket11 = 111
|
||||
};
|
||||
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace UF
|
||||
extern const char* GetInvTypeName(int inv_type);
|
||||
|
||||
extern bool IsInvTypePersistent(int inv_type);
|
||||
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
@@ -237,7 +237,7 @@ namespace UF
|
||||
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
@@ -264,7 +264,7 @@ namespace UF
|
||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||
|
||||
extern const char* GetInvBagIndexName(int bag_index);
|
||||
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
@@ -288,24 +288,32 @@ namespace UF
|
||||
const size_t PotionBeltSize = 5;
|
||||
|
||||
const size_t SkillArraySize = 100;
|
||||
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
const size_t CharacterCreationLimit = 12;
|
||||
|
||||
const size_t SayLinkBodySize = 50;
|
||||
|
||||
|
||||
const int LongBuffs = 30;
|
||||
const int ShortBuffs = 20;
|
||||
const int DiscBuffs = 1;
|
||||
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||
const int NPCBuffs = 85;
|
||||
const int PetBuffs = NPCBuffs;
|
||||
const int MercBuffs = LongBuffs;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
|
||||
} /*skills*/
|
||||
|
||||
}; /*UF*/
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -195,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
@@ -1707,7 +1707,7 @@ struct LootingItem_Struct {
|
||||
/*000*/ uint32 lootee;
|
||||
/*004*/ uint32 looter;
|
||||
/*008*/ uint32 slot_id;
|
||||
/*012*/ uint32 auto_loot;
|
||||
/*012*/ int32 auto_loot;
|
||||
/*016*/ uint32 unknown16;
|
||||
/*020*/
|
||||
};
|
||||
@@ -2011,7 +2011,7 @@ struct AdventureLeaderboard_Struct
|
||||
/*struct Item_Shop_Struct {
|
||||
uint16 merchantid;
|
||||
uint8 itemtype;
|
||||
ItemBase item;
|
||||
ItemData item;
|
||||
uint8 iss_unknown001[6];
|
||||
};*/
|
||||
|
||||
|
||||
+1316
-43
File diff suppressed because it is too large
Load Diff
+735
@@ -113,6 +113,741 @@
|
||||
|
||||
#define PLAYER_RACE_ALL_MASK 65535
|
||||
|
||||
#define RT_ABHORRENT 193
|
||||
#define RT_AIR_ELEMENTAL 210
|
||||
#define RT_AIR_ELEMENTAL_2 475
|
||||
#define RT_AIR_MEPHIT 291
|
||||
#define RT_AKHEVA 230
|
||||
#define RT_AKHEVA_2 722
|
||||
#define RT_ALARAN 695
|
||||
#define RT_ALARAN_GHOST 708
|
||||
#define RT_ALARAN_SENTRY_STONE 703
|
||||
#define RT_ALLIGATOR 91
|
||||
#define RT_ALLIGATOR_2 479
|
||||
#define RT_AMYGDALAN 99
|
||||
#define RT_AMYGDALAN_2 663
|
||||
#define RT_ANEUK 395
|
||||
#define RT_ANIMATED_ARMOR 323
|
||||
#define RT_ANIMATED_HAND 166
|
||||
#define RT_ANIMATED_STATUE 442
|
||||
#define RT_ANIMATED_STATUE_2 448
|
||||
#define RT_APEXUS 637
|
||||
#define RT_ARACHNID 326
|
||||
#define RT_ARCANIST_OF_HATE 352
|
||||
#define RT_ARMADILLO 87
|
||||
#define RT_ARMOR_RACK 535
|
||||
#define RT_AVIAK 13
|
||||
#define RT_AVIAK_2 558
|
||||
#define RT_AVIAK_PULL_ALONG 711
|
||||
#define RT_AYONAE_RO 498
|
||||
#define RT_BANNER 500
|
||||
#define RT_BANNER_2 553
|
||||
#define RT_BANNER_3 554
|
||||
#define RT_BANNER_4 555
|
||||
#define RT_BANNER_5 556
|
||||
#define RT_BANNER_6 557
|
||||
#define RT_BANNER_7 586
|
||||
#define RT_BANNER_10TH_ANNIVERSARY 628
|
||||
#define RT_BANSHEE 250
|
||||
#define RT_BANSHEE_2 487
|
||||
#define RT_BANSHEE_3 488
|
||||
#define RT_BARBARIAN 2
|
||||
#define RT_BARBARIAN_2 90
|
||||
#define RT_BARREL 377
|
||||
#define RT_BARREL_BARGE_SHIP 546
|
||||
#define RT_BASILISK 436
|
||||
#define RT_BAT 34
|
||||
#define RT_BAT_2 260
|
||||
#define RT_BAT_3 416
|
||||
#define RT_BAZU 409
|
||||
#define RT_BEAR 43
|
||||
#define RT_BEAR_2 305
|
||||
#define RT_BEAR_3 480
|
||||
#define RT_BEAR_MOUNT 655
|
||||
#define RT_BEAR_TRAP 503
|
||||
#define RT_BEETLE 22
|
||||
#define RT_BEETLE_2 559
|
||||
#define RT_BEETLE_3 716
|
||||
#define RT_BEGGAR 55
|
||||
#define RT_BELLIKOS 638
|
||||
#define RT_BERTOXXULOUS 152
|
||||
#define RT_BERTOXXULOUS_2 255
|
||||
#define RT_BIXIE 79
|
||||
#define RT_BIXIE_2 520
|
||||
#define RT_BLIMP_SHIP 693
|
||||
#define RT_BLIND_DREAMER 669
|
||||
#define RT_BLOOD_RAVEN 279
|
||||
#define RT_BOAT 141
|
||||
#define RT_BOAT_2 533
|
||||
#define RT_BOLVIRK 486
|
||||
#define RT_BONE_GOLEM 362
|
||||
#define RT_BONE_GOLEM_2 491
|
||||
#define RT_BONES 383
|
||||
#define RT_BOOK_DERVISH 660
|
||||
#define RT_BOT_PORTAL 329
|
||||
#define RT_BOULDER 585
|
||||
#define RT_BOX 376
|
||||
#define RT_BRAXI 688
|
||||
#define RT_BRAXI_MOUNT 676
|
||||
#define RT_BRELL 640
|
||||
#define RT_BRELLS_FIRST_CREATION 639
|
||||
#define RT_BRISTLEBANE 153
|
||||
#define RT_BROKEN_CLOCKWORK 274
|
||||
#define RT_BRONTOTHERIUM 169
|
||||
#define RT_BROWNIE 15
|
||||
#define RT_BROWNIE_2 568
|
||||
#define RT_BUBONIAN 268
|
||||
#define RT_BUBONIAN_UNDERLING 269
|
||||
#define RT_BURYNAI 144
|
||||
#define RT_BURYNAI_2 602
|
||||
#define RT_CAKE_10TH_ANNIVERSARY 629
|
||||
#define RT_CAMPFIRE 567
|
||||
#define RT_CARRIER_HAND 721
|
||||
#define RT_CAT 713
|
||||
#define RT_CAZIC_THULE 95
|
||||
#define RT_CAZIC_THULE_2 670
|
||||
#define RT_CENTAUR 16
|
||||
#define RT_CENTAUR_2 521
|
||||
#define RT_CHEST 378
|
||||
#define RT_CHEST_2 589
|
||||
#define RT_CHEST_3 590
|
||||
#define RT_CHIMERA 412
|
||||
#define RT_CHIMERA_2 582
|
||||
#define RT_CHOKIDAI 356
|
||||
#define RT_CLAM 115
|
||||
#define RT_CLIKNAR_MOUNT 652
|
||||
#define RT_CLIKNAR_QUEEN 642
|
||||
#define RT_CLIKNAR_SOLDIER 643
|
||||
#define RT_CLIKNAR_WORKER 644
|
||||
#define RT_CLOCKWORK_BEETLE 276
|
||||
#define RT_CLOCKWORK_BOAR 472
|
||||
#define RT_CLOCKWORK_BOMB 504
|
||||
#define RT_CLOCKWORK_BRAIN 249
|
||||
#define RT_CLOCKWORK_GNOME 88
|
||||
#define RT_CLOCKWORK_GOLEM 248
|
||||
#define RT_CLOCKWORK_GUARDIAN 572
|
||||
#define RT_COCKATRICE 96
|
||||
#define RT_COFFIN 382
|
||||
#define RT_COFFIN_2 592
|
||||
#define RT_COIN_PURSE 427
|
||||
#define RT_COLDAIN 183
|
||||
#define RT_COLDAIN_2 645
|
||||
#define RT_COLDAIN_3 646
|
||||
#define RT_CORAL 460
|
||||
#define RT_CORATHUS 459
|
||||
#define RT_CRAB 302
|
||||
#define RT_CRAGBEAST 390
|
||||
#define RT_CRAGSLITHER 597
|
||||
#define RT_CROCODILE 259
|
||||
#define RT_CRYSTAL 591
|
||||
#define RT_CRYSTAL_SHARD 425
|
||||
#define RT_CRYSTAL_SPHERE 616
|
||||
#define RT_CRYSTAL_SPIDER 327
|
||||
#define RT_CRYSTALSKIN_AMBULOID 641
|
||||
#define RT_CRYSTALSKIN_SESSILOID 647
|
||||
#define RT_DAISY_MAN 97
|
||||
#define RT_DARK_ELF 6
|
||||
#define RT_DARK_ELF_2 77
|
||||
#define RT_DARK_LORD 466
|
||||
#define RT_DEMI_LICH 45
|
||||
#define RT_DEMON_VULTURE 620
|
||||
#define RT_DERVISH 100
|
||||
#define RT_DERVISH_2 372
|
||||
#define RT_DERVISH_3 431
|
||||
#define RT_DERVISH_4 704
|
||||
#define RT_DERVISH_VER_5 726
|
||||
#define RT_DERVISH_VER_6 727
|
||||
#define RT_DEVOURER 159
|
||||
#define RT_DIRE_WOLF 171
|
||||
#define RT_DISCORD_SHIP 404
|
||||
#define RT_DISCORDLING 418
|
||||
#define RT_DISEASED_FIEND 253
|
||||
#define RT_DJINN 126
|
||||
#define RT_DRACHNID 57
|
||||
#define RT_DRACHNID_2 461
|
||||
#define RT_DRACHNID_COCOON 462
|
||||
#define RT_DRACOLICH 604
|
||||
#define RT_DRAGLOCK 132
|
||||
#define RT_DRAGON 49
|
||||
#define RT_DRAGON_2 122
|
||||
#define RT_DRAGON_3 165
|
||||
#define RT_DRAGON_4 184
|
||||
#define RT_DRAGON_5 192
|
||||
#define RT_DRAGON_6 195
|
||||
#define RT_DRAGON_7 196
|
||||
#define RT_DRAGON_8 198
|
||||
#define RT_DRAGON_9 304
|
||||
#define RT_DRAGON_10 435
|
||||
#define RT_DRAGON_11 437
|
||||
#define RT_DRAGON_12 438
|
||||
#define RT_DRAGON_13 452
|
||||
#define RT_DRAGON_14 530
|
||||
#define RT_DRAGON_15 531
|
||||
#define RT_DRAGON_16 569
|
||||
#define RT_DRAGON_BONES 423
|
||||
#define RT_DRAGON_EGG 445
|
||||
#define RT_DRAGON_STATUE 446
|
||||
#define RT_DRAGORN 413
|
||||
#define RT_DRAGORN_BOX 421
|
||||
#define RT_DRAKE 89
|
||||
#define RT_DRAKE_2 430
|
||||
#define RT_DRAKE_3 432
|
||||
#define RT_DRAKKIN 522
|
||||
#define RT_DRIXIE 113
|
||||
#define RT_DROGMORE 348
|
||||
#define RT_DROLVARG 133
|
||||
#define RT_DRYAD 243
|
||||
#define RT_DWARF 8
|
||||
#define RT_DWARF_2 94
|
||||
#define RT_DYNAMITE_KEG 505
|
||||
#define RT_DYNLETH 532
|
||||
#define RT_EARTH_ELEMENTAL 209
|
||||
#define RT_EARTH_ELEMENTAL_2 476
|
||||
#define RT_EARTH_MEPHIT 292
|
||||
#define RT_EEL 35
|
||||
#define RT_EFREETI 101
|
||||
#define RT_EFREETI_2 320
|
||||
#define RT_ELDDAR 489
|
||||
#define RT_ELEMENTAL 75
|
||||
#define RT_ELK_HEAD 714
|
||||
#define RT_ELVEN_BOAT 544
|
||||
#define RT_ELVEN_GHOST 587
|
||||
#define RT_ENCHANTED_ARMOR 175
|
||||
#define RT_EROLLISI 150
|
||||
#define RT_ERUDITE 3
|
||||
#define RT_ERUDITE_2 78
|
||||
#define RT_ERUDITE_3 678
|
||||
#define RT_EVAN_TEST 204
|
||||
#define RT_EVIL_EYE 21
|
||||
#define RT_EVIL_EYE_2 375
|
||||
#define RT_EVIL_EYE_3 469
|
||||
#define RT_EXOSKELETON 570
|
||||
#define RT_EXPLOSIVE_CART 692
|
||||
#define RT_EYE 108
|
||||
#define RT_FAIRY 25
|
||||
#define RT_FAIRY_2 473
|
||||
#define RT_FALLEN_KNIGHT 719
|
||||
#define RT_FAUN 182
|
||||
#define RT_FAY_DRAKE 154
|
||||
#define RT_FENNIN_RO 284
|
||||
#define RT_FERAN 410
|
||||
#define RT_FERAN_MOUNT 623
|
||||
#define RT_FIEND 300
|
||||
#define RT_FIRE_ELEMENTAL 212
|
||||
#define RT_FIRE_ELEMENTAL_2 477
|
||||
#define RT_FIRE_MEPHIT 293
|
||||
#define RT_FISH 24
|
||||
#define RT_FISH_2 148
|
||||
#define RT_FLAG 501
|
||||
#define RT_FLOATING_ISLAND 596
|
||||
#define RT_FLOATING_SKULL 512
|
||||
#define RT_FLOATING_TOWER 691
|
||||
#define RT_FLY 245
|
||||
#define RT_FLYING_CARPET 720
|
||||
#define RT_FOREST_GIANT 490
|
||||
#define RT_FROG 343
|
||||
#define RT_FROG_2 603
|
||||
#define RT_FROGLOK 26
|
||||
#define RT_FROGLOK_2 27
|
||||
#define RT_FROGLOK_3 330
|
||||
#define RT_FROGLOK_GHOST 371
|
||||
#define RT_FROGLOK_SKELETON 349
|
||||
#define RT_FUNGAL_FIEND 218
|
||||
#define RT_FUNGUS_PATCH 463
|
||||
#define RT_FUNGUSMAN 28
|
||||
#define RT_GALORIAN 228
|
||||
#define RT_GARGOYLE 29
|
||||
#define RT_GARGOYLE_2 464
|
||||
#define RT_GASBAG 30
|
||||
#define RT_GELATINOUS_CUBE 31
|
||||
#define RT_GELATINOUS_CUBE_2 712
|
||||
#define RT_GELIDRAN 417
|
||||
#define RT_GENARI 648
|
||||
#define RT_GEONID 178
|
||||
#define RT_GHOST 32
|
||||
#define RT_GHOST_2 117
|
||||
#define RT_GHOST_3 118
|
||||
#define RT_GHOST_4 334
|
||||
#define RT_GHOST_SHIP 114
|
||||
#define RT_GHOST_SHIP_2 552
|
||||
#define RT_GHOUL 33
|
||||
#define RT_GHOUL_2 571
|
||||
#define RT_GIANT 18
|
||||
#define RT_GIANT_2 140
|
||||
#define RT_GIANT_3 188
|
||||
#define RT_GIANT_4 189
|
||||
#define RT_GIANT_5 306
|
||||
#define RT_GIANT_6 307
|
||||
#define RT_GIANT_7 308
|
||||
#define RT_GIANT_8 309
|
||||
#define RT_GIANT_9 310
|
||||
#define RT_GIANT_10 311
|
||||
#define RT_GIANT_11 312
|
||||
#define RT_GIANT_12 453
|
||||
#define RT_GIANT_13 523
|
||||
#define RT_GIANT_CLOCKWORK 275
|
||||
#define RT_GIANT_RALLOSIAN_MATS 626
|
||||
#define RT_GIANT_SHADE 526
|
||||
#define RT_GIGYN 649
|
||||
#define RT_GINGERBREAD_MAN 666
|
||||
#define RT_GIRPLAN 419
|
||||
#define RT_GNOLL 39
|
||||
#define RT_GNOLL_2 524
|
||||
#define RT_GNOLL_3 617
|
||||
#define RT_GNOME 12
|
||||
#define RT_GNOMEWORK 457
|
||||
#define RT_GNOMISH_BALLOON 683
|
||||
#define RT_GNOMISH_BOAT 545
|
||||
#define RT_GNOMISH_HOVERING_TRANSPORT 685
|
||||
#define RT_GNOMISH_ROCKET_PACK 684
|
||||
#define RT_GOBLIN 40
|
||||
#define RT_GOBLIN_2 59
|
||||
#define RT_GOBLIN_3 137
|
||||
#define RT_GOBLIN_4 369
|
||||
#define RT_GOBLIN_5 433
|
||||
#define RT_GOD_LUCLIN_VER_2 728
|
||||
#define RT_GOD_LUCLIN_VER_3 729
|
||||
#define RT_GOD_LUCLIN_VER_4 731
|
||||
#define RT_GOD_OF_DISCORD 622
|
||||
#define RT_GOLEM 17
|
||||
#define RT_GOLEM_2 374
|
||||
#define RT_GOO 145
|
||||
#define RT_GOO_2 547
|
||||
#define RT_GOO_3 548
|
||||
#define RT_GOO_4 549
|
||||
#define RT_GORAL 687
|
||||
#define RT_GORAL_MOUNT 673
|
||||
#define RT_GORGON 121
|
||||
#define RT_GORILLA 41
|
||||
#define RT_GORILLA_2 560
|
||||
#define RT_GRANDFATHER_CLOCK 665
|
||||
#define RT_GREKEN_YOUNG 651
|
||||
#define RT_GREKEN_YOUNG_ADULT 650
|
||||
#define RT_GRENDLAEN 701
|
||||
#define RT_GRIEG_VENEFICUS 231
|
||||
#define RT_GRIFFIN 47
|
||||
#define RT_GRIFFIN_2 525
|
||||
#define RT_GRIMLING 202
|
||||
#define RT_GROUND_SHAKER 233
|
||||
#define RT_GUARD 44
|
||||
#define RT_GUARD_2 106
|
||||
#define RT_GUARD_3 112
|
||||
#define RT_GUARD_4 239
|
||||
#define RT_GUARD_OF_JUSTICE 251
|
||||
#define RT_GUARDIAN_CPU 593
|
||||
#define RT_HADAL 698
|
||||
#define RT_HAG 185
|
||||
#define RT_HALF_ELF 7
|
||||
#define RT_HALFLING 11
|
||||
#define RT_HALFLING_2 81
|
||||
#define RT_HARPY 111
|
||||
#define RT_HARPY_2 527
|
||||
#define RT_HIGH_ELF 5
|
||||
#define RT_HIPPOGRIFF 186
|
||||
#define RT_HOLGRESH 168
|
||||
#define RT_HOLGRESH_2 715
|
||||
#define RT_HONEY_POT 536
|
||||
#define RT_HORSE 216
|
||||
#define RT_HORSE_2 492
|
||||
#define RT_HORSE_3 518
|
||||
#define RT_HOVERING_PLATFORM 699
|
||||
#define RT_HRAQUIS 261
|
||||
#define RT_HUMAN 1
|
||||
#define RT_HUMAN_2 67
|
||||
#define RT_HUMAN_3 71
|
||||
#define RT_HUMAN_4 566
|
||||
#define RT_HUMAN_GHOST 588
|
||||
#define RT_HUVUL 400
|
||||
#define RT_HYDRA_CRYSTAL 615
|
||||
#define RT_HYDRA_MOUNT 631
|
||||
#define RT_HYDRA_NPC 632
|
||||
#define RT_HYNID 388
|
||||
#define RT_ICE_SPECTRE 174
|
||||
#define RT_IKAAV 394
|
||||
#define RT_IKSAR 128
|
||||
#define RT_IKSAR_2 139
|
||||
#define RT_IKSAR_GHOST 605
|
||||
#define RT_IKSAR_GOLEM 160
|
||||
#define RT_IKSAR_SKELETON 606
|
||||
#define RT_IKSAR_SPIRIT 147
|
||||
#define RT_IMP 46
|
||||
#define RT_INNORUUK 123
|
||||
#define RT_INSECT 370
|
||||
#define RT_INTERACTIVE_OBJECT 2250
|
||||
#define RT_INVISIBLE_MAN 127
|
||||
#define RT_INVISIBLE_MAN_2 681
|
||||
#define RT_INVISIBLE_MAN_3 690
|
||||
#define RT_INVISIBLE_MAN_OF_ZOMM 600
|
||||
#define RT_IXT 393
|
||||
#define RT_JOKESTER 384
|
||||
#define RT_JUM_JUM_BUCKET 537
|
||||
#define RT_JUNK_BEAST 273
|
||||
#define RT_KANGON 689
|
||||
#define RT_KANGON_MOUNT 677
|
||||
#define RT_KARANA 278
|
||||
#define RT_KEDGE 103
|
||||
#define RT_KEDGE_2 561
|
||||
#define RT_KERRAN 23
|
||||
#define RT_KERRAN_2 562
|
||||
#define RT_KIRIN 434
|
||||
#define RT_KIRIN_2 583
|
||||
#define RT_KNIGHT_OF_HATE 351
|
||||
#define RT_KNIGHT_OF_PESTILENCE 266
|
||||
#define RT_KOBOLD 48
|
||||
#define RT_KOBOLD_2 455
|
||||
#define RT_KRAKEN 315
|
||||
#define RT_KYV 396
|
||||
#define RT_LAUNCH 73
|
||||
#define RT_LAVA_ROCK 447
|
||||
#define RT_LAVA_SPIDER 450
|
||||
#define RT_LAVA_SPIDER_QUEEN 451
|
||||
#define RT_LEECH 104
|
||||
#define RT_LEPERTOLOTH 267
|
||||
#define RT_LIGHTCRAWLER 223
|
||||
#define RT_LIGHTNING_WARRIOR 407
|
||||
#define RT_LION 50
|
||||
#define RT_LIZARD_MAN 51
|
||||
#define RT_LUCLIN 724
|
||||
#define RT_LUGGALD 345
|
||||
#define RT_LUGGALD_2 346
|
||||
#define RT_LUGGALDS 347
|
||||
#define RT_MALARIAN 265
|
||||
#define RT_MAMMOTH 107
|
||||
#define RT_MAMMOTH_2 528
|
||||
#define RT_MAN_EATING_PLANT 162
|
||||
#define RT_MANSION 595
|
||||
#define RT_MANTICORE 172
|
||||
#define RT_MANTRAP 573
|
||||
#define RT_MARIONETTE 659
|
||||
#define RT_MASTRUQ 402
|
||||
#define RT_MATA_MURAM 406
|
||||
#define RT_MEDIUM_PLANT 541
|
||||
#define RT_MEPHIT 607
|
||||
#define RT_MERCHANT_SHIP 550
|
||||
#define RT_MERMAID 110
|
||||
#define RT_MIMIC 52
|
||||
#define RT_MINI_POM 252
|
||||
#define RT_MINOTAUR 53
|
||||
#define RT_MINOTAUR_2 420
|
||||
#define RT_MINOTAUR_3 470
|
||||
#define RT_MINOTAUR_4 574
|
||||
#define RT_MITHANIEL_MARR 296
|
||||
#define RT_MORELL_THULE 658
|
||||
#define RT_MOSQUITO 134
|
||||
#define RT_MOUTH_OF_INSANITY 281
|
||||
#define RT_MUDDITE 608
|
||||
#define RT_MUMMY 368
|
||||
#define RT_MURAMITE_ARMOR_PILE 424
|
||||
#define RT_MURKGLIDER 414
|
||||
#define RT_MURKGLIDER_EGG_SAC 429
|
||||
#define RT_MUTNA 401
|
||||
#define RT_NEKHON 614
|
||||
#define RT_NETHERBIAN 229
|
||||
#define RT_NIGHTMARE 287
|
||||
#define RT_NIGHTMARE_GARGOYLE 280
|
||||
#define RT_NIGHTMARE_GOBLIN 277
|
||||
#define RT_NIGHTMARE_MEPHIT 294
|
||||
#define RT_NIGHTMARE_UNICORN 517
|
||||
#define RT_NIGHTMARE_UNICORN_2 519
|
||||
#define RT_NIGHTMARE_WRAITH 264
|
||||
#define RT_NIHIL 385
|
||||
#define RT_NILBORIEN 317
|
||||
#define RT_NOC 397
|
||||
#define RT_NYMPH 242
|
||||
#define RT_OGRE 10
|
||||
#define RT_OGRE_2 93
|
||||
#define RT_OGRE_NPC_MALE 624
|
||||
#define RT_ORB 730
|
||||
#define RT_ORC 54
|
||||
#define RT_ORC_2 458
|
||||
#define RT_OTHMIR 190
|
||||
#define RT_OWLBEAR 206
|
||||
#define RT_PARASITIC_SCAVENGER 700
|
||||
#define RT_PEGASUS 125
|
||||
#define RT_PEGASUS_2 493
|
||||
#define RT_PEGASUS_3 732
|
||||
#define RT_PHOENIX 303
|
||||
#define RT_PIRANHA 74
|
||||
#define RT_PIRATE 335
|
||||
#define RT_PIRATE_2 336
|
||||
#define RT_PIRATE_3 337
|
||||
#define RT_PIRATE_4 338
|
||||
#define RT_PIRATE_5 339
|
||||
#define RT_PIRATE_6 340
|
||||
#define RT_PIRATE_7 341
|
||||
#define RT_PIRATE_8 342
|
||||
#define RT_PIRATE_SHIP 551
|
||||
#define RT_PIXIE 56
|
||||
#define RT_POISON_FROG 316
|
||||
#define RT_PORTAL 426
|
||||
#define RT_POWDER_KEG 636
|
||||
#define RT_PRESSURE_PLATE 506
|
||||
#define RT_PUFFER_SPORE 507
|
||||
#define RT_PUMA 76
|
||||
#define RT_PUMA_2 439
|
||||
#define RT_PUMA_3 584
|
||||
#define RT_PUSLING 270
|
||||
#define RT_PYRILEN 411
|
||||
#define RT_RA_TUK 398
|
||||
#define RT_RABBIT 668
|
||||
#define RT_RALLOS_ZEK 66
|
||||
#define RT_RALLOS_ZEK_2 288
|
||||
#define RT_RALLOS_ZEK_MINION 325
|
||||
#define RT_RAPTOR 163
|
||||
#define RT_RAPTOR_2 609
|
||||
#define RT_RAPTOR_MOUNT 680
|
||||
#define RT_RAT 36
|
||||
#define RT_RAT_2 415
|
||||
#define RT_RAT_MOUNT 656
|
||||
#define RT_RATMAN 156
|
||||
#define RT_RATMAN_2 718
|
||||
#define RT_REANIMATED_HAND 80
|
||||
#define RT_RECUSO 237
|
||||
#define RT_REGENERATION_POOL 705
|
||||
#define RT_RELIC_CASE 707
|
||||
#define RT_RHINO_BEETLE 207
|
||||
#define RT_RHINOCEROS 135
|
||||
#define RT_ROBOCOPTER_OF_ZOMM 601
|
||||
#define RT_ROCK_PILE 428
|
||||
#define RT_ROCKHOPPER 200
|
||||
#define RT_RONNIE_TEST 197
|
||||
#define RT_ROOT_TENTACLE 509
|
||||
#define RT_ROT_DOG_MOUNT 672
|
||||
#define RT_ROTDOG 662
|
||||
#define RT_ROTOCOPTER 577
|
||||
#define RT_ROWBOAT 502
|
||||
#define RT_ROYAL_GUARD 667
|
||||
#define RT_RUJARKIAN_ORC 361
|
||||
#define RT_RUJARKIAN_ORC_2 366
|
||||
#define RT_RUNED_ORB 422
|
||||
#define RT_RUNIC_SYMBOL 510
|
||||
#define RT_SABER_TOOTHED_CAT 119
|
||||
#define RT_SALTPETTER_BOMB 511
|
||||
#define RT_SAND_ELF 364
|
||||
#define RT_SANDMAN 664
|
||||
#define RT_SARNAK 131
|
||||
#define RT_SARNAK_2 610
|
||||
#define RT_SARNAK_GOLEM 164
|
||||
#define RT_SARNAK_SPIRIT 146
|
||||
#define RT_SARYRN 283
|
||||
#define RT_SATYR 529
|
||||
#define RT_SCALED_WOLF 481
|
||||
#define RT_SCARECROW 82
|
||||
#define RT_SCARECROW_2 575
|
||||
#define RT_SCARLET_CHEETAH 221
|
||||
#define RT_SCLERA_MOUNT 675
|
||||
#define RT_SCORPION 129
|
||||
#define RT_SCORPION_2 149
|
||||
#define RT_SCORPION_3 611
|
||||
#define RT_SCRYKIN 495
|
||||
#define RT_SEA_TURTLE 194
|
||||
#define RT_SEAHORSE 116
|
||||
#define RT_SELYRAH 686
|
||||
#define RT_SELYRAH_MOUNT 674
|
||||
#define RT_SERU 236
|
||||
#define RT_SERVANT_OF_SHADOW 723
|
||||
#define RT_SESSILOID_MOUNT 657
|
||||
#define RT_SHADE 224
|
||||
#define RT_SHADE_2 373
|
||||
#define RT_SHADE_3 576
|
||||
#define RT_SHADEL 205
|
||||
#define RT_SHAMBLING_MOUND 494
|
||||
#define RT_SHARK 61
|
||||
#define RT_SHIKNAR 199
|
||||
#define RT_SHILISKIN 467
|
||||
#define RT_SHIP 72
|
||||
#define RT_SHIP_IN_A_BOTTLE 702
|
||||
#define RT_SHISSAR 217
|
||||
#define RT_SHISSAR_2 563
|
||||
#define RT_SHRIEKER 227
|
||||
#define RT_SIREN 187
|
||||
#define RT_SIREN_2 564
|
||||
#define RT_SKELETAL_HORSE 282
|
||||
#define RT_SKELETON 60
|
||||
#define RT_SKELETON_2 367
|
||||
#define RT_SKELETON_3 484
|
||||
#define RT_SKUNK 83
|
||||
#define RT_SKYSTRIDER 709
|
||||
#define RT_SMALL_PLANT 540
|
||||
#define RT_SNAKE 37
|
||||
#define RT_SNAKE_2 468
|
||||
#define RT_SNAKE_ELEMENTAL 84
|
||||
#define RT_SNOW_DERVISH 170
|
||||
#define RT_SNOW_RABBIT 176
|
||||
#define RT_SOKOKAR 618
|
||||
#define RT_SOKOKAR_MOUNT 625
|
||||
#define RT_SOKOKAR_W_SADDLE 627
|
||||
#define RT_SOLUSEK_RO 58
|
||||
#define RT_SOLUSEK_RO_2 247
|
||||
#define RT_SOLUSEK_RO_GUARD 254
|
||||
#define RT_SONIC_WOLF 232
|
||||
#define RT_SOUL_DEVOURER 286
|
||||
#define RT_SPECTRE 85
|
||||
#define RT_SPECTRE_2 485
|
||||
#define RT_SPELL_PARTICLE_1 599
|
||||
#define RT_SPHINX 86
|
||||
#define RT_SPHINX_2 565
|
||||
#define RT_SPIDER 38
|
||||
#define RT_SPIDER_2 440
|
||||
#define RT_SPIDER_EGG_SACK 449
|
||||
#define RT_SPIDER_MOUNT 654
|
||||
#define RT_SPIDER_QUEEN 441
|
||||
#define RT_SPIKE_TRAP 513
|
||||
#define RT_SPIRIT_WOLF 483
|
||||
#define RT_SPORALI 456
|
||||
#define RT_STONE_JUG 539
|
||||
#define RT_STONE_PYLON 619
|
||||
#define RT_STONE_RING 508
|
||||
#define RT_STONE_WORKER 387
|
||||
#define RT_STONE_WORKER_2 405
|
||||
#define RT_STONEGRABBER 220
|
||||
#define RT_STONEMITE 391
|
||||
#define RT_STORMRIDER 272
|
||||
#define RT_SUCCUBUS 408
|
||||
#define RT_SUCCULENT 167
|
||||
#define RT_SULLON_ZEK 499
|
||||
#define RT_SUN_REVENANT 226
|
||||
#define RT_SUNFLOWER 225
|
||||
#define RT_SWINETOR 696
|
||||
#define RT_SWORDFISH 105
|
||||
#define RT_SYNARCANA 363
|
||||
#define RT_TABLE 380
|
||||
#define RT_TADPOLE 102
|
||||
#define RT_TAELOSIAN 403
|
||||
#define RT_TALL_PLANT 542
|
||||
#define RT_TALLON_ZEK 290
|
||||
#define RT_TANETH 399
|
||||
#define RT_TAREW_MARR 246
|
||||
#define RT_TEGI 215
|
||||
#define RT_TELEPORT_MAN 240
|
||||
#define RT_TELEPORTATION_STAND 706
|
||||
#define RT_TELMIRA 653
|
||||
#define RT_TENTACLE_TERROR 68
|
||||
#define RT_TENTACLE_TERROR_2 578
|
||||
#define RT_TERRIS_THULE 257
|
||||
#define RT_TEST_OBJECT 301
|
||||
#define RT_THE_RATHE 298
|
||||
#define RT_THE_TRIBUNAL 256
|
||||
#define RT_THOUGHT_HORROR 214
|
||||
#define RT_TIGER 63
|
||||
#define RT_TIN_SOLDIER 263
|
||||
#define RT_TOOLBOX 538
|
||||
#define RT_TOPIARY_LION 661
|
||||
#define RT_TOPIARY_LION_MOUNT 671
|
||||
#define RT_TORMENTOR 285
|
||||
#define RT_TOTEM 173
|
||||
#define RT_TOTEM_2 514
|
||||
#define RT_TRAKANON 19
|
||||
#define RT_TRANQUILION 262
|
||||
#define RT_TREANT 64
|
||||
#define RT_TREANT_2 244
|
||||
#define RT_TREANT_3 496
|
||||
#define RT_TRIBUNAL 151
|
||||
#define RT_TRIUMVIRATE 697
|
||||
#define RT_TROLL 9
|
||||
#define RT_TROLL_2 92
|
||||
#define RT_TROLL_3 331
|
||||
#define RT_TROLL_4 332
|
||||
#define RT_TROLL_5 333
|
||||
#define RT_TROLL_ZOMBIE 344
|
||||
#define RT_TRUSIK 386
|
||||
#define RT_TSETSIAN 612
|
||||
#define RT_TUMBLEWEED 694
|
||||
#define RT_TUNARE 62
|
||||
#define RT_TUREPTA 389
|
||||
#define RT_UKUN 392
|
||||
#define RT_ULTHORK 191
|
||||
#define RT_UNDEAD_CHOKIDAI 357
|
||||
#define RT_UNDEAD_FOOTMAN 324
|
||||
#define RT_UNDEAD_FROGLOK 350
|
||||
#define RT_UNDEAD_IKSAR 161
|
||||
#define RT_UNDEAD_KNIGHT 297
|
||||
#define RT_UNDEAD_SARNAK 155
|
||||
#define RT_UNDEAD_VEKSAR 358
|
||||
#define RT_UNDERBULK 201
|
||||
#define RT_UNICORN 124
|
||||
#define RT_UNKNOWN_RACE 0
|
||||
#define RT_UNKNOWN_RACE_2 142
|
||||
#define RT_UNKNOWN_RACE_3 143
|
||||
#define RT_UNKNOWN_RACE_4 179
|
||||
#define RT_UNKNOWN_RACE_5 180
|
||||
#define RT_UNKNOWN_RACE_6 443
|
||||
#define RT_UNKNOWN_RACE_7 444
|
||||
#define RT_VAH_SHIR 130
|
||||
#define RT_VAH_SHIR_2 238
|
||||
#define RT_VAH_SHIR_SKELETON 234
|
||||
#define RT_VALLON_ZEK 289
|
||||
#define RT_VALORIAN 318
|
||||
#define RT_VALORIAN_2 322
|
||||
#define RT_VAMPIRE 65
|
||||
#define RT_VAMPIRE_2 98
|
||||
#define RT_VAMPIRE_3 208
|
||||
#define RT_VAMPIRE_4 219
|
||||
#define RT_VAMPIRE_5 359
|
||||
#define RT_VAMPIRE_6 360
|
||||
#define RT_VAMPIRE_7 365
|
||||
#define RT_VAMPIRE_8 497
|
||||
#define RT_VASE 379
|
||||
#define RT_VEGEROG 258
|
||||
#define RT_VEKSAR 353
|
||||
#define RT_VEKSAR_2 354
|
||||
#define RT_VEKSAR_3 355
|
||||
#define RT_VENRIL_SATHIR 20
|
||||
#define RT_VINE_MAW 717
|
||||
#define RT_WAGON 621
|
||||
#define RT_WALRUS 177
|
||||
#define RT_WAR_BOAR 319
|
||||
#define RT_WAR_BOAR_2 321
|
||||
#define RT_WAR_WRAITH 313
|
||||
#define RT_WASP 109
|
||||
#define RT_WATER_ELEMENTAL 211
|
||||
#define RT_WATER_ELEMENTAL_2 478
|
||||
#define RT_WATER_MEPHIT 271
|
||||
#define RT_WATER_SPOUT 710
|
||||
#define RT_WEAPON_RACK 381
|
||||
#define RT_WEAPON_RACK_2 534
|
||||
#define RT_WEB 515
|
||||
#define RT_WEDDING_ALTAR 635
|
||||
#define RT_WEDDING_ARBOR 634
|
||||
#define RT_WEDDING_FLOWERS 633
|
||||
#define RT_WEREORC 579
|
||||
#define RT_WEREWOLF 14
|
||||
#define RT_WEREWOLF_2 241
|
||||
#define RT_WEREWOLF_3 454
|
||||
#define RT_WETFANG_MINNOW 213
|
||||
#define RT_WHIRLIGIG 682
|
||||
#define RT_WICKER_BASKET 516
|
||||
#define RT_WILL_O_WISP 69
|
||||
#define RT_WINE_CASK 543
|
||||
#define RT_WINE_CASK_2 630
|
||||
#define RT_WITHERAN 465
|
||||
#define RT_WITHERAN_2 474
|
||||
#define RT_WOLF 42
|
||||
#define RT_WOLF_2 120
|
||||
#define RT_WOLF_3 482
|
||||
#define RT_WOOD_ELF 4
|
||||
#define RT_WORG 580
|
||||
#define RT_WORG_2 594
|
||||
#define RT_WORM 203
|
||||
#define RT_WRETCH 235
|
||||
#define RT_WRULON 314
|
||||
#define RT_WRULON_2 598
|
||||
#define RT_WURM 158
|
||||
#define RT_WURM_2 613
|
||||
#define RT_WURM_MOUNT 679
|
||||
#define RT_WYVERN 157
|
||||
#define RT_WYVERN_2 581
|
||||
#define RT_XALGOZ 136
|
||||
#define RT_XARIC_THE_UNSPOKEN 725
|
||||
#define RT_XEGONY 299
|
||||
#define RT_YAKKAR 181
|
||||
#define RT_YETI 138
|
||||
#define RT_ZEBUXORUK 295
|
||||
#define RT_ZEBUXORUKS_CAGE 328
|
||||
#define RT_ZELNIAK 222
|
||||
#define RT_ZOMBIE 70
|
||||
#define RT_ZOMBIE_2 471
|
||||
|
||||
|
||||
const char* GetRaceIDName(uint16 race_id);
|
||||
const char* GetPlayerRaceName(uint32 player_race_value);
|
||||
|
||||
@@ -65,6 +65,15 @@ namespace EQEmu {
|
||||
return Real(0.0, 1.0) <= required;
|
||||
}
|
||||
|
||||
// same range as client's roll0
|
||||
// This is their main high level RNG function
|
||||
int Roll0(int max)
|
||||
{
|
||||
if (max - 1 > 0)
|
||||
return Int(0, max - 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// std::shuffle requires a RNG engine passed to it, so lets provide a wrapper to use our engine
|
||||
template<typename RandomAccessIterator>
|
||||
void Shuffle(RandomAccessIterator first, RandomAccessIterator last)
|
||||
|
||||
+42
-14
@@ -55,6 +55,8 @@ RULE_REAL(Character, AAExpMultiplier, 0.5)
|
||||
RULE_REAL(Character, GroupExpMultiplier, 0.5)
|
||||
RULE_REAL(Character, RaidExpMultiplier, 0.2)
|
||||
RULE_BOOL(Character, UseXPConScaling, true)
|
||||
RULE_INT(Character, ShowExpValues, 0) //0 - normal, 1 - Show raw experience values, 2 - Show raw experience values AND percent.
|
||||
RULE_INT(Character, GreenModifier, 20)
|
||||
RULE_INT(Character, LightBlueModifier, 40)
|
||||
RULE_INT(Character, BlueModifier, 90)
|
||||
RULE_INT(Character, WhiteModifier, 100)
|
||||
@@ -113,6 +115,7 @@ RULE_BOOL(Character, CheckCursorEmptyWhenLooting, true) // If true, a player can
|
||||
RULE_BOOL(Character, MaintainIntoxicationAcrossZones, true) // If true, alcohol effects are maintained across zoning and logging out/in.
|
||||
RULE_BOOL(Character, EnableDiscoveredItems, true) // If enabled, it enables EVENT_DISCOVER_ITEM and also saves character names and timestamps for the first time an item is discovered.
|
||||
RULE_BOOL(Character, EnableXTargetting, true) // Enable Extended Targetting Window, for users with UF and later clients.
|
||||
RULE_BOOL(Character, EnableAggroMeter, true) // Enable Aggro Meter, for users with RoF and later clients.
|
||||
RULE_BOOL(Character, KeepLevelOverMax, false) // Don't delevel a character that has somehow gone over the level cap
|
||||
RULE_INT(Character, FoodLossPerUpdate, 35) // How much food/water you lose per stamina update
|
||||
RULE_INT(Character, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well.
|
||||
@@ -146,7 +149,8 @@ RULE_BOOL(Character, EnableAvoidanceCap, false)
|
||||
RULE_INT(Character, AvoidanceCap, 750) // 750 Is a pretty good value, seen people dodge all attacks beyond 1,000 Avoidance
|
||||
RULE_BOOL(Character, AllowMQTarget, false) // Disables putting players in the 'hackers' list for targeting beyond the clip plane or attempting to target something untargetable
|
||||
RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound behavior
|
||||
|
||||
RULE_BOOL(Character, GrantHoTTOnCreate, false) // Grant Health of Target's Target leadership AA on character creation
|
||||
RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target leadership AA on character creation
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Mercs)
|
||||
@@ -161,6 +165,8 @@ RULE_INT(Mercs, AggroRadius, 100) // Determines the distance from which a merc
|
||||
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_BOOL(Mercs, MercsUsePathing, true) // Mercs will use node pathing when moving
|
||||
RULE_BOOL(Mercs, AllowMercSuspendInCombat, true)
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Guild)
|
||||
@@ -223,7 +229,9 @@ RULE_INT(World, PVPSettings, 0) // Sets the PVP settings for the server, 1 = Ral
|
||||
RULE_BOOL (World, IsGMPetitionWindowEnabled, false)
|
||||
RULE_INT (World, FVNoDropFlag, 0) // Sets the Firiona Vie settings on the client. If set to 2, the flag will be set for GMs only, allowing trading of no-drop items.
|
||||
RULE_BOOL (World, IPLimitDisconnectAll, false)
|
||||
RULE_BOOL(World, MaxClientsSimplifiedLogic, false) // New logic that only uses ExemptMaxClientsStatus and MaxClientsPerIP. Done on the loginserver. This mimics the P99-style special IP rules.
|
||||
RULE_INT (World, TellQueueSize, 20)
|
||||
RULE_BOOL(World, StartZoneSameAsBindOnCreation, true) //Should the start zone ALWAYS be the same location as your bind?
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Zone)
|
||||
@@ -256,6 +264,9 @@ RULE_INT(Zone, WeatherTimer, 600) // Weather timer when no duration is available
|
||||
RULE_BOOL(Zone, EnableLoggedOffReplenishments, true)
|
||||
RULE_INT(Zone, MinOfflineTimeToReplenishments, 21600) // 21600 seconds is 6 Hours
|
||||
RULE_BOOL(Zone, UseZoneController, true) // Enables the ability to use persistent quest based zone controllers (zone_controller.pl/lua)
|
||||
RULE_BOOL(Zone, EnableZoneControllerGlobals, false) // Enables the ability to use quest globals with the zone controller NPC
|
||||
RULE_INT(Zone, GlobalLootMultiplier, 1) // Sets Global Loot drop multiplier for database based drops, useful for double, triple loot etc.
|
||||
RULE_BOOL(Zone, IdleWhenEmpty, true) // Don't process NPCs while zone is empty. Defaults to true.
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Map)
|
||||
@@ -331,11 +342,11 @@ RULE_INT(Spells, SacrificeMinLevel, 46) //first level Sacrifice will work on
|
||||
RULE_INT(Spells, SacrificeMaxLevel, 69) //last level Sacrifice will work on
|
||||
RULE_INT(Spells, SacrificeItemID, 9963) //Item ID of the item Sacrifice will return (defaults to an EE)
|
||||
RULE_BOOL(Spells, EnableSpellGlobals, false) // If Enabled, spells check the spell_globals table and compare character data from the quest globals before allowing that spell to scribe with scribespells
|
||||
RULE_INT(Spells, MaxBuffSlotsNPC, 25)
|
||||
RULE_INT(Spells, MaxSongSlotsNPC, 10)
|
||||
RULE_INT(Spells, MaxDiscSlotsNPC, 1)
|
||||
RULE_INT(Spells, MaxTotalSlotsNPC, 36)
|
||||
RULE_INT(Spells, MaxTotalSlotsPET, 30) // do not set this higher than 25 until the player profile is removed from the blob
|
||||
RULE_INT(Spells, MaxBuffSlotsNPC, 60) // default to Tit's limit
|
||||
RULE_INT(Spells, MaxSongSlotsNPC, 0) // NPCs don't have songs ...
|
||||
RULE_INT(Spells, MaxDiscSlotsNPC, 0) // NPCs don't have discs ...
|
||||
RULE_INT(Spells, MaxTotalSlotsNPC, 60) // default to Tit's limit
|
||||
RULE_INT(Spells, MaxTotalSlotsPET, 30) // default to Tit's limit
|
||||
RULE_BOOL (Spells, EnableBlockedBuffs, true)
|
||||
RULE_INT(Spells, ReflectType, 1) //0 = disabled, 1 = single target player spells only, 2 = all player spells, 3 = all single target spells, 4 = all spells
|
||||
RULE_INT(Spells, VirusSpreadDistance, 30) // The distance a viral spell will jump to its next victim
|
||||
@@ -390,15 +401,13 @@ RULE_BOOL(Spells, NPCInnateProcOverride, true) // NPC innate procs override the
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Combat)
|
||||
RULE_INT(Combat, MeleeBaseCritChance, 0) //The base crit chance for non warriors, NOTE: This will apply to NPCs as well
|
||||
RULE_INT(Combat, WarBerBaseCritChance, 3) //The base crit chance for warriors and berserkers, only applies to clients
|
||||
RULE_INT(Combat, BerserkBaseCritChance, 6) //The bonus base crit chance you get when you're berserk
|
||||
RULE_INT(Combat, PetBaseCritChance, 0) // Pet Base crit chance
|
||||
RULE_INT(Combat, NPCBashKickLevel, 6) //The level that npcs can KICK/BASH
|
||||
RULE_INT(Combat, NPCBashKickStunChance, 15) //Percent chance that a bash/kick will stun
|
||||
RULE_INT(Combat, RogueCritThrowingChance, 25) //Rogue throwing crit bonus
|
||||
RULE_INT(Combat, RogueDeadlyStrikeChance, 80) //Rogue chance throwing from behind crit becomes a deadly strike
|
||||
RULE_INT(Combat, RogueDeadlyStrikeMod, 2) //Deadly strike modifier to crit damage
|
||||
RULE_INT(Combat, ClientBaseCritChance, 0) //The base crit chance for all clients, this will stack with warrior's/zerker's crit chance.
|
||||
RULE_INT(Combat, MeleeCritDifficulty, 8900) // lower is easier
|
||||
RULE_INT(Combat, ArcheryCritDifficulty, 3400) // lower is easier
|
||||
RULE_INT(Combat, ThrowingCritDifficulty, 1100) // lower is easier
|
||||
RULE_BOOL(Combat, NPCCanCrit, false) // true allows non PC pet NPCs to crit
|
||||
RULE_BOOL(Combat, UseIntervalAC, true)
|
||||
RULE_INT(Combat, PetAttackMagicLevel, 30)
|
||||
RULE_BOOL(Combat, EnableFearPathing, true)
|
||||
@@ -489,6 +498,8 @@ RULE_BOOL(Combat, UseLiveCombatRounds, true) // turn this false if you don't wan
|
||||
RULE_INT(Combat, NPCAssistCap, 5) // Maxiumium number of NPCs that will assist another NPC at once
|
||||
RULE_INT(Combat, NPCAssistCapTimer, 6000) // Time in milliseconds a NPC will take to clear assist aggro cap space
|
||||
RULE_BOOL(Combat, UseRevampHandToHand, false) // use h2h revamped dmg/delays I believe this was implemented during SoF
|
||||
RULE_BOOL(Combat, ClassicMasterWu, false) // classic master wu uses a random special, modern doesn't
|
||||
RULE_INT(Combat, LevelToStopDamageCaps, 0) // 1 will effectively disable them, 20 should give basically same results as old incorrect system
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(NPC)
|
||||
@@ -539,6 +550,20 @@ RULE_BOOL(TaskSystem, KeepOneRecordPerCompletedTask, true)
|
||||
RULE_BOOL(TaskSystem, EnableTaskProximity, true)
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Range)
|
||||
RULE_INT(Range, Say, 135)
|
||||
RULE_INT(Range, Emote, 135)
|
||||
RULE_INT(Range, BeginCast, 200)
|
||||
RULE_INT(Range, Anims, 135)
|
||||
RULE_INT(Range, SpellParticles, 135)
|
||||
RULE_INT(Range, DamageMessages, 50)
|
||||
RULE_INT(Range, SpellMessages, 75)
|
||||
RULE_INT(Range, SongMessages, 75)
|
||||
RULE_INT(Range, MobPositionUpdates, 600)
|
||||
RULE_INT(Range, CriticalDamage, 80)
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
|
||||
#ifdef BOTS
|
||||
RULE_CATEGORY(Bots)
|
||||
RULE_INT(Bots, AAExpansion, 8) // Bots get AAs through this expansion
|
||||
@@ -553,12 +578,15 @@ RULE_REAL(Bots, ManaRegen, 2.0) // Adjust mana regen for bots, 1 is fast and hig
|
||||
RULE_BOOL(Bots, PreferNoManaCommandSpells, true) // Give sorting priority to newer no-mana spells (i.e., 'Bind Affinity')
|
||||
RULE_BOOL(Bots, QuestableSpawnLimit, false) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl
|
||||
RULE_BOOL(Bots, QuestableSpells, false) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests.
|
||||
RULE_INT(Bots, SpawnLimit, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid
|
||||
RULE_INT(Bots, SpawnLimit, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group pseudo-raid (bots are not raidable at this time)
|
||||
RULE_BOOL(Bots, UpdatePositionWithTimer, false) // Sends a position update with every positive movement timer check
|
||||
RULE_BOOL(Bots, UsePathing, true) // Bots will use node pathing when moving
|
||||
RULE_BOOL(Bots, BotGroupXP, false) // Determines whether client gets xp for bots outside their group.
|
||||
RULE_BOOL(Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs (optional script)
|
||||
RULE_BOOL(Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior)
|
||||
RULE_BOOL(Bots, BotCharacterLevelEnabled, false) // Enables required level to spawn bots
|
||||
RULE_INT(Bots, BotCharacterLevel, 0) // 0 as default (if level > this value you can spawn bots if BotCharacterLevelEnabled is true)
|
||||
RULE_INT(Bots, CasterStopMeleeLevel, 13) // Level at which caster bots stop melee attacks
|
||||
RULE_CATEGORY_END()
|
||||
#endif
|
||||
|
||||
|
||||
+4
-4
@@ -21,8 +21,8 @@
|
||||
#include "emu_constants.h"
|
||||
|
||||
#include "string_util.h"
|
||||
#include "item.h"
|
||||
#include "item_base.h"
|
||||
#include "item_instance.h"
|
||||
#include "item_data.h"
|
||||
#include "../zone/zonedb.h"
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ void EQEmu::SayLinkEngine::generate_body()
|
||||
|
||||
memset(&m_LinkBodyStruct, 0, sizeof(SayLinkBody_Struct));
|
||||
|
||||
const EQEmu::ItemBase* item_data = nullptr;
|
||||
const EQEmu::ItemData* item_data = nullptr;
|
||||
|
||||
switch (m_LinkType) {
|
||||
case saylink::SayLinkBlank:
|
||||
@@ -250,7 +250,7 @@ void EQEmu::SayLinkEngine::generate_text()
|
||||
return;
|
||||
}
|
||||
|
||||
const EQEmu::ItemBase* item_data = nullptr;
|
||||
const EQEmu::ItemData* item_data = nullptr;
|
||||
|
||||
switch (m_LinkType) {
|
||||
case saylink::SayLinkBlank:
|
||||
|
||||
+6
-6
@@ -26,11 +26,11 @@
|
||||
|
||||
|
||||
struct ServerLootItem_Struct;
|
||||
class ItemInst;
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
struct ItemBase;
|
||||
struct ItemData;
|
||||
class ItemInstance;
|
||||
struct SayLinkBody_Struct;
|
||||
|
||||
namespace saylink {
|
||||
@@ -67,9 +67,9 @@ namespace EQEmu
|
||||
SayLinkEngine();
|
||||
|
||||
void SetLinkType(saylink::SayLinkType link_type) { m_LinkType = link_type; }
|
||||
void SetItemData(const EQEmu::ItemBase* item_data) { m_ItemData = item_data; }
|
||||
void SetItemData(const EQEmu::ItemData* item_data) { m_ItemData = item_data; }
|
||||
void SetLootData(const ServerLootItem_Struct* loot_data) { m_LootData = loot_data; }
|
||||
void SetItemInst(const ItemInst* item_inst) { m_ItemInst = item_inst; }
|
||||
void SetItemInst(const ItemInstance* item_inst) { m_ItemInst = item_inst; }
|
||||
|
||||
// mainly for saylinks..but, not limited to
|
||||
void SetProxyUnknown1(uint8 proxy_unknown_1) { m_Proxy_unknown_1 = proxy_unknown_1; }
|
||||
@@ -103,9 +103,9 @@ namespace EQEmu
|
||||
void generate_text();
|
||||
|
||||
int m_LinkType;
|
||||
const ItemBase* m_ItemData;
|
||||
const ItemData* m_ItemData;
|
||||
const ServerLootItem_Struct* m_LootData;
|
||||
const ItemInst* m_ItemInst;
|
||||
const ItemInstance* m_ItemInst;
|
||||
|
||||
uint8 m_Proxy_unknown_1;
|
||||
uint32 m_ProxyItemID;
|
||||
|
||||
@@ -663,6 +663,7 @@ struct UsertoWorldRequest_Struct {
|
||||
uint32 worldid;
|
||||
uint32 FromID;
|
||||
uint32 ToID;
|
||||
char IPAddr[64];
|
||||
};
|
||||
|
||||
struct UsertoWorldResponse_Struct {
|
||||
|
||||
+84
-71
@@ -29,7 +29,7 @@
|
||||
#include "faction.h"
|
||||
#include "features.h"
|
||||
#include "ipc_mutex.h"
|
||||
#include "item.h"
|
||||
#include "inventory_profile.h"
|
||||
#include "loottable.h"
|
||||
#include "memory_mapped_file.h"
|
||||
#include "mysql.h"
|
||||
@@ -38,6 +38,17 @@
|
||||
#include "string_util.h"
|
||||
#include "eqemu_config.h"
|
||||
|
||||
namespace ItemField
|
||||
{
|
||||
enum {
|
||||
source = 0,
|
||||
#define F(x) x,
|
||||
#include "item_fieldlist.h"
|
||||
#undef F
|
||||
updated
|
||||
};
|
||||
}
|
||||
|
||||
SharedDatabase::SharedDatabase()
|
||||
: Database()
|
||||
{
|
||||
@@ -99,13 +110,13 @@ uint32 SharedDatabase::GetTotalTimeEntitledOnAccount(uint32 AccountID) {
|
||||
return EntitledTime;
|
||||
}
|
||||
|
||||
bool SharedDatabase::SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end)
|
||||
bool SharedDatabase::SaveCursor(uint32 char_id, std::list<EQEmu::ItemInstance*>::const_iterator &start, std::list<EQEmu::ItemInstance*>::const_iterator &end)
|
||||
{
|
||||
// Delete cursor items
|
||||
std::string query = StringFormat("DELETE FROM inventory WHERE charid = %i "
|
||||
"AND ((slotid >= 8000 AND slotid <= 8999) "
|
||||
"OR slotid = %i OR (slotid >= %i AND slotid <= %i) )",
|
||||
char_id, EQEmu::legacy::SlotCursor,
|
||||
char_id, EQEmu::inventory::slotCursor,
|
||||
EQEmu::legacy::CURSOR_BAG_BEGIN, EQEmu::legacy::CURSOR_BAG_END);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
@@ -116,8 +127,8 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iter
|
||||
int i = 8000;
|
||||
for(auto it = start; it != end; ++it, i++) {
|
||||
if (i > 8999) { break; } // shouldn't be anything in the queue that indexes this high
|
||||
ItemInst *inst = *it;
|
||||
int16 use_slot = (i == 8000) ? EQEmu::legacy::SlotCursor : i;
|
||||
EQEmu::ItemInstance *inst = *it;
|
||||
int16 use_slot = (i == 8000) ? EQEmu::inventory::slotCursor : i;
|
||||
if (!SaveInventory(char_id, inst, use_slot)) {
|
||||
return false;
|
||||
}
|
||||
@@ -126,7 +137,7 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iter
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const ItemInst* inst)
|
||||
bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const EQEmu::ItemInstance* inst)
|
||||
{
|
||||
// Delete cursor items
|
||||
std::string query = StringFormat("SELECT itemid, charges FROM sharedbank "
|
||||
@@ -159,7 +170,7 @@ bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const Ite
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
||||
bool SharedDatabase::SaveInventory(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) {
|
||||
|
||||
//never save tribute slots:
|
||||
if (slot_id >= EQEmu::legacy::TRIBUTE_BEGIN && slot_id <= EQEmu::legacy::TRIBUTE_END)
|
||||
@@ -173,7 +184,7 @@ bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 s
|
||||
else {
|
||||
// Needed to clear out bag slots that 'REPLACE' in UpdateSharedBankSlot does not overwrite..otherwise, duplication occurs
|
||||
// (This requires that parent then child items be sent..which should be how they are currently passed)
|
||||
if (Inventory::SupportsContainers(slot_id))
|
||||
if (EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||
DeleteSharedBankSlot(char_id, slot_id);
|
||||
return UpdateSharedBankSlot(char_id, inst, slot_id);
|
||||
}
|
||||
@@ -184,18 +195,18 @@ bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 s
|
||||
|
||||
// Needed to clear out bag slots that 'REPLACE' in UpdateInventorySlot does not overwrite..otherwise, duplication occurs
|
||||
// (This requires that parent then child items be sent..which should be how they are currently passed)
|
||||
if (Inventory::SupportsContainers(slot_id))
|
||||
if (EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||
DeleteInventorySlot(char_id, slot_id);
|
||||
return UpdateInventorySlot(char_id, inst, slot_id);
|
||||
}
|
||||
|
||||
bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
||||
bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) {
|
||||
// need to check 'inst' argument for valid pointer
|
||||
|
||||
uint32 augslot[EQEmu::legacy::ITEM_COMMON_SIZE] = { 0, 0, 0, 0, 0, 0 };
|
||||
uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 };
|
||||
if (inst->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
ItemInst *auginst = inst->GetItem(i);
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
EQEmu::ItemInstance *auginst = inst->GetItem(i);
|
||||
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0;
|
||||
}
|
||||
}
|
||||
@@ -221,12 +232,12 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, i
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
// Save bag contents, if slot supports bag contents
|
||||
if (inst->IsClassBag() && Inventory::SupportsContainers(slot_id))
|
||||
if (inst->IsClassBag() && EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||
// Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID'
|
||||
// messages through attrition (and the modded code in SaveInventory)
|
||||
for (uint8 idx = SUB_INDEX_BEGIN; idx < inst->GetItem()->BagSlots && idx < EQEmu::legacy::ITEM_CONTAINER_SIZE; idx++) {
|
||||
const ItemInst* baginst = inst->GetItem(idx);
|
||||
SaveInventory(char_id, baginst, Inventory::CalcSlotId(slot_id, idx));
|
||||
for (uint8 idx = EQEmu::inventory::containerBegin; idx < inst->GetItem()->BagSlots && idx < EQEmu::inventory::ContainerCount; idx++) {
|
||||
const EQEmu::ItemInstance* baginst = inst->GetItem(idx);
|
||||
SaveInventory(char_id, baginst, EQEmu::InventoryProfile::CalcSlotId(slot_id, idx));
|
||||
}
|
||||
|
||||
if (!results.Success()) {
|
||||
@@ -236,13 +247,13 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, i
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
||||
bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) {
|
||||
// need to check 'inst' argument for valid pointer
|
||||
|
||||
uint32 augslot[EQEmu::legacy::ITEM_COMMON_SIZE] = { 0, 0, 0, 0, 0, 0 };
|
||||
uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 };
|
||||
if (inst->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
ItemInst *auginst = inst->GetItem(i);
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
EQEmu::ItemInstance *auginst = inst->GetItem(i);
|
||||
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0;
|
||||
}
|
||||
}
|
||||
@@ -267,12 +278,12 @@ bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst,
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
// Save bag contents, if slot supports bag contents
|
||||
if (inst->IsClassBag() && Inventory::SupportsContainers(slot_id)) {
|
||||
if (inst->IsClassBag() && EQEmu::InventoryProfile::SupportsContainers(slot_id)) {
|
||||
// Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID'
|
||||
// messages through attrition (and the modded code in SaveInventory)
|
||||
for (uint8 idx = SUB_INDEX_BEGIN; idx < inst->GetItem()->BagSlots && idx < EQEmu::legacy::ITEM_CONTAINER_SIZE; idx++) {
|
||||
const ItemInst* baginst = inst->GetItem(idx);
|
||||
SaveInventory(char_id, baginst, Inventory::CalcSlotId(slot_id, idx));
|
||||
for (uint8 idx = EQEmu::inventory::containerBegin; idx < inst->GetItem()->BagSlots && idx < EQEmu::inventory::ContainerCount; idx++) {
|
||||
const EQEmu::ItemInstance* baginst = inst->GetItem(idx);
|
||||
SaveInventory(char_id, baginst, EQEmu::InventoryProfile::CalcSlotId(slot_id, idx));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,10 +304,10 @@ bool SharedDatabase::DeleteInventorySlot(uint32 char_id, int16 slot_id) {
|
||||
}
|
||||
|
||||
// Delete bag slots, if need be
|
||||
if (!Inventory::SupportsContainers(slot_id))
|
||||
if (!EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||
return true;
|
||||
|
||||
int16 base_slot_id = Inventory::CalcSlotId(slot_id, SUB_INDEX_BEGIN);
|
||||
int16 base_slot_id = EQEmu::InventoryProfile::CalcSlotId(slot_id, EQEmu::inventory::containerBegin);
|
||||
query = StringFormat("DELETE FROM inventory WHERE charid = %i AND slotid >= %i AND slotid < %i",
|
||||
char_id, base_slot_id, (base_slot_id+10));
|
||||
results = QueryDatabase(query);
|
||||
@@ -319,10 +330,10 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) {
|
||||
}
|
||||
|
||||
// Delete bag slots, if need be
|
||||
if (!Inventory::SupportsContainers(slot_id))
|
||||
if (!EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||
return true;
|
||||
|
||||
int16 base_slot_id = Inventory::CalcSlotId(slot_id, SUB_INDEX_BEGIN);
|
||||
int16 base_slot_id = EQEmu::InventoryProfile::CalcSlotId(slot_id, EQEmu::inventory::containerBegin);
|
||||
query = StringFormat("DELETE FROM sharedbank WHERE acctid = %i "
|
||||
"AND slotid >= %i AND slotid < %i",
|
||||
account_id, base_slot_id, (base_slot_id+10));
|
||||
@@ -362,9 +373,9 @@ bool SharedDatabase::SetSharedPlatinum(uint32 account_id, int32 amount_to_add) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SharedDatabase::SetStartingItems(PlayerProfile_Struct* pp, Inventory* inv, uint32 si_race, uint32 si_class, uint32 si_deity, uint32 si_current_zone, char* si_name, int admin_level) {
|
||||
bool SharedDatabase::SetStartingItems(PlayerProfile_Struct* pp, EQEmu::InventoryProfile* inv, uint32 si_race, uint32 si_class, uint32 si_deity, uint32 si_current_zone, char* si_name, int admin_level) {
|
||||
|
||||
const EQEmu::ItemBase* myitem;
|
||||
const EQEmu::ItemData* myitem;
|
||||
|
||||
std::string query = StringFormat("SELECT itemid, item_charges, slot FROM starting_items "
|
||||
"WHERE (race = %i or race = 0) AND (class = %i or class = 0) AND "
|
||||
@@ -385,7 +396,7 @@ bool SharedDatabase::SetStartingItems(PlayerProfile_Struct* pp, Inventory* inv,
|
||||
if(!myitem)
|
||||
continue;
|
||||
|
||||
ItemInst* myinst = CreateBaseItem(myitem, charges);
|
||||
EQEmu::ItemInstance* myinst = CreateBaseItem(myitem, charges);
|
||||
|
||||
if(slot < 0)
|
||||
slot = inv->FindFreeSlot(0, 0);
|
||||
@@ -399,7 +410,7 @@ bool SharedDatabase::SetStartingItems(PlayerProfile_Struct* pp, Inventory* inv,
|
||||
|
||||
|
||||
// Retrieve shared bank inventory based on either account or character
|
||||
bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
||||
bool SharedDatabase::GetSharedBank(uint32 id, EQEmu::InventoryProfile *inv, bool is_charid)
|
||||
{
|
||||
std::string query;
|
||||
|
||||
@@ -428,7 +439,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
||||
uint32 item_id = (uint32)atoi(row[1]);
|
||||
int8 charges = (int8)atoi(row[2]);
|
||||
|
||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::inventory::SocketCount];
|
||||
aug[0] = (uint32)atoi(row[3]);
|
||||
aug[1] = (uint32)atoi(row[4]);
|
||||
aug[2] = (uint32)atoi(row[5]);
|
||||
@@ -436,7 +447,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
||||
aug[4] = (uint32)atoi(row[7]);
|
||||
aug[5] = (uint32)atoi(row[8]);
|
||||
|
||||
const EQEmu::ItemBase *item = GetItem(item_id);
|
||||
const EQEmu::ItemData *item = GetItem(item_id);
|
||||
|
||||
if (!item) {
|
||||
Log.Out(Logs::General, Logs::Error,
|
||||
@@ -447,9 +458,9 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
||||
|
||||
int16 put_slot_id = INVALID_INDEX;
|
||||
|
||||
ItemInst *inst = CreateBaseItem(item, charges);
|
||||
EQEmu::ItemInstance *inst = CreateBaseItem(item, charges);
|
||||
if (inst && item->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
@@ -500,7 +511,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
||||
}
|
||||
|
||||
// Overloaded: Retrieve character inventory based on character id
|
||||
bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv)
|
||||
{
|
||||
// Retrieve character inventory
|
||||
std::string query =
|
||||
@@ -524,7 +535,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
uint16 charges = atoi(row[2]);
|
||||
uint32 color = atoul(row[3]);
|
||||
|
||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::inventory::SocketCount];
|
||||
|
||||
aug[0] = (uint32)atoul(row[4]);
|
||||
aug[1] = (uint32)atoul(row[5]);
|
||||
@@ -539,7 +550,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
uint32 ornament_idfile = (uint32)atoul(row[13]);
|
||||
uint32 ornament_hero_model = (uint32)atoul(row[14]);
|
||||
|
||||
const EQEmu::ItemBase *item = GetItem(item_id);
|
||||
const EQEmu::ItemData *item = GetItem(item_id);
|
||||
|
||||
if (!item) {
|
||||
Log.Out(Logs::General, Logs::Error,
|
||||
@@ -550,7 +561,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
|
||||
int16 put_slot_id = INVALID_INDEX;
|
||||
|
||||
ItemInst *inst = CreateBaseItem(item, charges);
|
||||
EQEmu::ItemInstance *inst = CreateBaseItem(item, charges);
|
||||
|
||||
if (inst == nullptr)
|
||||
continue;
|
||||
@@ -583,11 +594,11 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
|
||||
inst->SetOrnamentIcon(ornament_icon);
|
||||
inst->SetOrnamentationIDFile(ornament_idfile);
|
||||
inst->SetOrnamentHeroModel(ornament_hero_model);
|
||||
inst->SetOrnamentHeroModel(item->HerosForgeModel);
|
||||
|
||||
if (instnodrop ||
|
||||
(((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) ||
|
||||
slot_id == EQEmu::legacy::SlotPowerSource) &&
|
||||
slot_id == EQEmu::inventory::slotPowerSource) &&
|
||||
inst->GetItem()->Attuneable))
|
||||
inst->SetAttuned(true);
|
||||
|
||||
@@ -609,7 +620,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
}
|
||||
|
||||
if (item->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
@@ -642,7 +653,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
}
|
||||
|
||||
// Overloaded: Retrieve character inventory based on account_id and character name
|
||||
bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
bool SharedDatabase::GetInventory(uint32 account_id, char *name, EQEmu::InventoryProfile *inv)
|
||||
{
|
||||
// Retrieve character inventory
|
||||
std::string query =
|
||||
@@ -666,7 +677,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
int8 charges = atoi(row[2]);
|
||||
uint32 color = atoul(row[3]);
|
||||
|
||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::inventory::SocketCount];
|
||||
aug[0] = (uint32)atoi(row[4]);
|
||||
aug[1] = (uint32)atoi(row[5]);
|
||||
aug[2] = (uint32)atoi(row[6]);
|
||||
@@ -679,12 +690,12 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
uint32 ornament_idfile = (uint32)atoul(row[13]);
|
||||
uint32 ornament_hero_model = (uint32)atoul(row[14]);
|
||||
|
||||
const EQEmu::ItemBase *item = GetItem(item_id);
|
||||
const EQEmu::ItemData *item = GetItem(item_id);
|
||||
int16 put_slot_id = INVALID_INDEX;
|
||||
if (!item)
|
||||
continue;
|
||||
|
||||
ItemInst *inst = CreateBaseItem(item, charges);
|
||||
EQEmu::ItemInstance *inst = CreateBaseItem(item, charges);
|
||||
|
||||
if (inst == nullptr)
|
||||
continue;
|
||||
@@ -719,7 +730,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
|
||||
inst->SetOrnamentIcon(ornament_icon);
|
||||
inst->SetOrnamentationIDFile(ornament_idfile);
|
||||
inst->SetOrnamentHeroModel(ornament_hero_model);
|
||||
inst->SetOrnamentHeroModel(item->HerosForgeModel);
|
||||
|
||||
if (color > 0)
|
||||
inst->SetColor(color);
|
||||
@@ -727,7 +738,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
inst->SetCharges(charges);
|
||||
|
||||
if (item->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
@@ -816,7 +827,7 @@ bool SharedDatabase::LoadItems(const std::string &prefix) {
|
||||
mutex.Lock();
|
||||
std::string file_name = Config->SharedMemDir + prefix + std::string("items");
|
||||
items_mmf = std::unique_ptr<EQEmu::MemoryMappedFile>(new EQEmu::MemoryMappedFile(file_name));
|
||||
items_hash = std::unique_ptr<EQEmu::FixedMemoryHashSet<EQEmu::ItemBase>>(new EQEmu::FixedMemoryHashSet<EQEmu::ItemBase>(reinterpret_cast<uint8*>(items_mmf->Get()), items_mmf->Size()));
|
||||
items_hash = std::unique_ptr<EQEmu::FixedMemoryHashSet<EQEmu::ItemData>>(new EQEmu::FixedMemoryHashSet<EQEmu::ItemData>(reinterpret_cast<uint8*>(items_mmf->Get()), items_mmf->Size()));
|
||||
mutex.Unlock();
|
||||
} catch(std::exception& ex) {
|
||||
Log.Out(Logs::General, Logs::Error, "Error Loading Items: %s", ex.what());
|
||||
@@ -828,7 +839,7 @@ bool SharedDatabase::LoadItems(const std::string &prefix) {
|
||||
|
||||
void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_item_id)
|
||||
{
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(reinterpret_cast<uint8 *>(data), size, items, max_item_id);
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(reinterpret_cast<uint8 *>(data), size, items, max_item_id);
|
||||
|
||||
std::string ndbuffer;
|
||||
bool disableNoRent = false;
|
||||
@@ -856,7 +867,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::ItemBase item;
|
||||
EQEmu::ItemData item;
|
||||
|
||||
const std::string query = "SELECT source,"
|
||||
#define F(x) "`"#x"`,"
|
||||
@@ -869,7 +880,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
||||
}
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
memset(&item, 0, sizeof(EQEmu::ItemBase));
|
||||
memset(&item, 0, sizeof(EQEmu::ItemData));
|
||||
|
||||
item.ItemClass = (uint8)atoi(row[ItemField::itemclass]);
|
||||
strcpy(item.Name, row[ItemField::name]);
|
||||
@@ -1086,7 +1097,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
||||
}
|
||||
}
|
||||
|
||||
const EQEmu::ItemBase* SharedDatabase::GetItem(uint32 id) {
|
||||
const EQEmu::ItemData* SharedDatabase::GetItem(uint32 id) {
|
||||
if (id == 0)
|
||||
{
|
||||
return nullptr;
|
||||
@@ -1105,7 +1116,7 @@ const EQEmu::ItemBase* SharedDatabase::GetItem(uint32 id) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const EQEmu::ItemBase* SharedDatabase::IterateItems(uint32* id) {
|
||||
const EQEmu::ItemData* SharedDatabase::IterateItems(uint32* id) {
|
||||
if(!items_hash || !id) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1125,13 +1136,13 @@ const EQEmu::ItemBase* SharedDatabase::IterateItems(uint32* id) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string SharedDatabase::GetBook(const char *txtfile)
|
||||
std::string SharedDatabase::GetBook(const char *txtfile, int16 *language)
|
||||
{
|
||||
char txtfile2[20];
|
||||
std::string txtout;
|
||||
strcpy(txtfile2, txtfile);
|
||||
|
||||
std::string query = StringFormat("SELECT txtfile FROM books WHERE name = '%s'", txtfile2);
|
||||
std::string query = StringFormat("SELECT txtfile, language FROM books WHERE name = '%s'", txtfile2);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
txtout.assign(" ",1);
|
||||
@@ -1146,6 +1157,7 @@ std::string SharedDatabase::GetBook(const char *txtfile)
|
||||
|
||||
auto row = results.begin();
|
||||
txtout.assign(row[0],strlen(row[0]));
|
||||
*language = static_cast<int16>(atoi(row[1]));
|
||||
|
||||
return txtout;
|
||||
}
|
||||
@@ -1250,18 +1262,18 @@ bool SharedDatabase::LoadNPCFactionLists(const std::string &prefix) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Create appropriate ItemInst class
|
||||
ItemInst* SharedDatabase::CreateItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6, uint8 attuned)
|
||||
// Create appropriate EQEmu::ItemInstance class
|
||||
EQEmu::ItemInstance* SharedDatabase::CreateItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6, uint8 attuned)
|
||||
{
|
||||
const EQEmu::ItemBase* item = nullptr;
|
||||
ItemInst* inst = nullptr;
|
||||
const EQEmu::ItemData* item = nullptr;
|
||||
EQEmu::ItemInstance* inst = nullptr;
|
||||
|
||||
item = GetItem(item_id);
|
||||
if (item) {
|
||||
inst = CreateBaseItem(item, charges);
|
||||
|
||||
if (inst == nullptr) {
|
||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
|
||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for EQEmu::ItemInstance creation in SharedDatabase::CreateItem()");
|
||||
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1279,15 +1291,15 @@ ItemInst* SharedDatabase::CreateItem(uint32 item_id, int16 charges, uint32 aug1,
|
||||
}
|
||||
|
||||
|
||||
// Create appropriate ItemInst class
|
||||
ItemInst* SharedDatabase::CreateItem(const EQEmu::ItemBase* item, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6, uint8 attuned)
|
||||
// Create appropriate EQEmu::ItemInstance class
|
||||
EQEmu::ItemInstance* SharedDatabase::CreateItem(const EQEmu::ItemData* item, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6, uint8 attuned)
|
||||
{
|
||||
ItemInst* inst = nullptr;
|
||||
EQEmu::ItemInstance* inst = nullptr;
|
||||
if (item) {
|
||||
inst = CreateBaseItem(item, charges);
|
||||
|
||||
if (inst == nullptr) {
|
||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
|
||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for EQEmu::ItemInstance creation in SharedDatabase::CreateItem()");
|
||||
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1304,8 +1316,8 @@ ItemInst* SharedDatabase::CreateItem(const EQEmu::ItemBase* item, int16 charges,
|
||||
return inst;
|
||||
}
|
||||
|
||||
ItemInst* SharedDatabase::CreateBaseItem(const EQEmu::ItemBase* item, int16 charges) {
|
||||
ItemInst* inst = nullptr;
|
||||
EQEmu::ItemInstance* SharedDatabase::CreateBaseItem(const EQEmu::ItemData* item, int16 charges) {
|
||||
EQEmu::ItemInstance* inst = nullptr;
|
||||
if (item) {
|
||||
// if maxcharges is -1 that means it is an unlimited use item.
|
||||
// set it to 1 charge so that it is usable on creation
|
||||
@@ -1315,10 +1327,10 @@ ItemInst* SharedDatabase::CreateBaseItem(const EQEmu::ItemBase* item, int16 char
|
||||
if(charges <= 0 && item->Stackable)
|
||||
charges = 1;
|
||||
|
||||
inst = new ItemInst(item, charges);
|
||||
inst = new EQEmu::ItemInstance(item, charges);
|
||||
|
||||
if (inst == nullptr) {
|
||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateBaseItem()");
|
||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for EQEmu::ItemInstance creation in SharedDatabase::CreateBaseItem()");
|
||||
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1689,6 +1701,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
||||
sp[tempid].pvpresistcalc=atoi(row[178]);
|
||||
sp[tempid].pvpresistcap=atoi(row[179]);
|
||||
sp[tempid].spell_category=atoi(row[180]);
|
||||
sp[tempid].pcnpc_only_flag=atoi(row[183]);
|
||||
sp[tempid].cast_not_standing = atoi(row[184]) != 0;
|
||||
sp[tempid].can_mgb=atoi(row[185]);
|
||||
sp[tempid].dispel_flag = atoi(row[186]);
|
||||
|
||||
+20
-20
@@ -33,8 +33,6 @@
|
||||
#include <memory>
|
||||
|
||||
class EvolveInfo;
|
||||
class Inventory;
|
||||
class ItemInst;
|
||||
struct BaseDataStruct;
|
||||
struct InspectMessage_Struct;
|
||||
struct PlayerProfile_Struct;
|
||||
@@ -45,7 +43,9 @@ struct LootDrop_Struct;
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
struct ItemBase;
|
||||
struct ItemData;
|
||||
class ItemInstance;
|
||||
class InventoryProfile;
|
||||
class MemoryMappedFile;
|
||||
}
|
||||
|
||||
@@ -74,34 +74,34 @@ class SharedDatabase : public Database
|
||||
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
||||
|
||||
/*
|
||||
Character Inventory
|
||||
Character InventoryProfile
|
||||
*/
|
||||
bool SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end);
|
||||
bool SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
||||
bool SaveCursor(uint32 char_id, std::list<EQEmu::ItemInstance*>::const_iterator &start, std::list<EQEmu::ItemInstance*>::const_iterator &end);
|
||||
bool SaveInventory(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id);
|
||||
bool DeleteSharedBankSlot(uint32 char_id, int16 slot_id);
|
||||
bool DeleteInventorySlot(uint32 char_id, int16 slot_id);
|
||||
bool UpdateInventorySlot(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
||||
bool UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
||||
bool VerifyInventory(uint32 account_id, int16 slot_id, const ItemInst* inst);
|
||||
bool GetSharedBank(uint32 id, Inventory* inv, bool is_charid);
|
||||
bool UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id);
|
||||
bool UpdateSharedBankSlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id);
|
||||
bool VerifyInventory(uint32 account_id, int16 slot_id, const EQEmu::ItemInstance* inst);
|
||||
bool GetSharedBank(uint32 id, EQEmu::InventoryProfile* inv, bool is_charid);
|
||||
int32 GetSharedPlatinum(uint32 account_id);
|
||||
bool SetSharedPlatinum(uint32 account_id, int32 amount_to_add);
|
||||
bool GetInventory(uint32 char_id, Inventory* inv);
|
||||
bool GetInventory(uint32 account_id, char* name, Inventory* inv);
|
||||
bool GetInventory(uint32 char_id, EQEmu::InventoryProfile* inv);
|
||||
bool GetInventory(uint32 account_id, char* name, EQEmu::InventoryProfile* inv);
|
||||
std::map<uint32, uint32> GetItemRecastTimestamps(uint32 char_id);
|
||||
uint32 GetItemRecastTimestamp(uint32 char_id, uint32 recast_type);
|
||||
void ClearOldRecastTimestamps(uint32 char_id);
|
||||
bool SetStartingItems(PlayerProfile_Struct* pp, Inventory* inv, uint32 si_race, uint32 si_class, uint32 si_deity, uint32 si_current_zone, char* si_name, int admin);
|
||||
bool SetStartingItems(PlayerProfile_Struct* pp, EQEmu::InventoryProfile* inv, uint32 si_race, uint32 si_class, uint32 si_deity, uint32 si_current_zone, char* si_name, int admin);
|
||||
|
||||
|
||||
std::string GetBook(const char *txtfile);
|
||||
std::string GetBook(const char *txtfile, int16 *language);
|
||||
|
||||
/*
|
||||
Item Methods
|
||||
*/
|
||||
ItemInst* CreateItem(uint32 item_id, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||
ItemInst* CreateItem(const EQEmu::ItemBase* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||
ItemInst* CreateBaseItem(const EQEmu::ItemBase* item, int16 charges = 0);
|
||||
EQEmu::ItemInstance* CreateItem(uint32 item_id, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||
EQEmu::ItemInstance* CreateItem(const EQEmu::ItemData* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||
EQEmu::ItemInstance* CreateBaseItem(const EQEmu::ItemData* item, int16 charges = 0);
|
||||
|
||||
/*
|
||||
Shared Memory crap
|
||||
@@ -111,8 +111,8 @@ class SharedDatabase : public Database
|
||||
void GetItemsCount(int32 &item_count, uint32 &max_id);
|
||||
void LoadItems(void *data, uint32 size, int32 items, uint32 max_item_id);
|
||||
bool LoadItems(const std::string &prefix);
|
||||
const EQEmu::ItemBase* IterateItems(uint32* id);
|
||||
const EQEmu::ItemBase* GetItem(uint32 id);
|
||||
const EQEmu::ItemData* IterateItems(uint32* id);
|
||||
const EQEmu::ItemData* GetItem(uint32 id);
|
||||
const EvolveInfo* GetEvolveInfo(uint32 loregroup);
|
||||
|
||||
//faction lists
|
||||
@@ -149,7 +149,7 @@ class SharedDatabase : public Database
|
||||
|
||||
std::unique_ptr<EQEmu::MemoryMappedFile> skill_caps_mmf;
|
||||
std::unique_ptr<EQEmu::MemoryMappedFile> items_mmf;
|
||||
std::unique_ptr<EQEmu::FixedMemoryHashSet<EQEmu::ItemBase>> items_hash;
|
||||
std::unique_ptr<EQEmu::FixedMemoryHashSet<EQEmu::ItemData>> items_hash;
|
||||
std::unique_ptr<EQEmu::MemoryMappedFile> faction_mmf;
|
||||
std::unique_ptr<EQEmu::FixedMemoryHashSet<NPCFactionList>> faction_hash;
|
||||
std::unique_ptr<EQEmu::MemoryMappedFile> loot_table_mmf;
|
||||
|
||||
@@ -124,6 +124,57 @@ bool EQEmu::skills::IsCastingSkill(SkillType skill)
|
||||
}
|
||||
}
|
||||
|
||||
int32 EQEmu::skills::GetBaseDamage(SkillType skill)
|
||||
{
|
||||
switch (skill) {
|
||||
case SkillBash:
|
||||
return 2;
|
||||
case SkillDragonPunch:
|
||||
return 12;
|
||||
case SkillEagleStrike:
|
||||
return 7;
|
||||
case SkillFlyingKick:
|
||||
return 25;
|
||||
case SkillKick:
|
||||
return 3;
|
||||
case SkillRoundKick:
|
||||
return 5;
|
||||
case SkillTigerClaw:
|
||||
return 4;
|
||||
case SkillFrenzy:
|
||||
return 10;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::skills::IsMeleeDmg(SkillType skill)
|
||||
{
|
||||
switch (skill) {
|
||||
case Skill1HBlunt:
|
||||
case Skill1HSlashing:
|
||||
case Skill2HBlunt:
|
||||
case Skill2HSlashing:
|
||||
case SkillBackstab:
|
||||
case SkillBash:
|
||||
case SkillDragonPunch:
|
||||
case SkillEagleStrike:
|
||||
case SkillFlyingKick:
|
||||
case SkillHandtoHand:
|
||||
case SkillKick:
|
||||
case Skill1HPiercing:
|
||||
case SkillRiposte:
|
||||
case SkillRoundKick:
|
||||
case SkillThrowing:
|
||||
case SkillTigerClaw:
|
||||
case SkillFrenzy:
|
||||
case Skill2HPiercing:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const std::map<EQEmu::skills::SkillType, std::string>& EQEmu::skills::GetSkillTypeMap()
|
||||
{
|
||||
/* VS2013 code
|
||||
|
||||
@@ -166,6 +166,8 @@ namespace EQEmu
|
||||
float GetSkillMeleePushForce(SkillType skill);
|
||||
bool IsBardInstrumentSkill(SkillType skill);
|
||||
bool IsCastingSkill(SkillType skill);
|
||||
int32 GetBaseDamage(SkillType skill);
|
||||
bool IsMeleeDmg(SkillType skill);
|
||||
|
||||
extern const std::map<SkillType, std::string>& GetSkillTypeMap();
|
||||
|
||||
|
||||
+14
-3
@@ -409,8 +409,19 @@ bool IsPartialCapableSpell(uint16 spell_id)
|
||||
if (spells[spell_id].no_partial_resist)
|
||||
return false;
|
||||
|
||||
if (IsPureNukeSpell(spell_id))
|
||||
return true;
|
||||
// spell uses 600 (partial) scale if first effect is damage, else it uses 200 scale.
|
||||
// this includes DoTs. no_partial_resist excludes spells like necro snares
|
||||
for (int o = 0; o < EFFECT_COUNT; o++) {
|
||||
auto tid = spells[spell_id].effectid[o];
|
||||
|
||||
if (IsBlankSpellEffect(spell_id, o))
|
||||
continue;
|
||||
|
||||
if ((tid == SE_CurrentHPOnce || tid == SE_CurrentHP) && spells[spell_id].base[o] < 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -929,7 +940,7 @@ bool IsRegularSingleTargetHealSpell(uint16 spell_id)
|
||||
{
|
||||
if(spells[spell_id].effectid[0] == 0 && spells[spell_id].base[0] > 0 &&
|
||||
spells[spell_id].targettype == ST_Target && spells[spell_id].buffduration == 0 &&
|
||||
!IsFastHealSpell(spell_id) && !IsCompleteHealSpell(spell_id) &&
|
||||
!IsCompleteHealSpell(spell_id) &&
|
||||
!IsHealOverTimeSpell(spell_id) && !IsGroupSpell(spell_id))
|
||||
return true;
|
||||
|
||||
|
||||
+87
-29
@@ -43,35 +43,93 @@
|
||||
|
||||
const int Z_AGGRO=10;
|
||||
|
||||
const int MobAISpellRange=100; // max range of buffs
|
||||
const int SpellType_Nuke=1;
|
||||
const int SpellType_Heal=2;
|
||||
const int SpellType_Root=4;
|
||||
const int SpellType_Buff=8;
|
||||
const int SpellType_Escape=16;
|
||||
const int SpellType_Pet=32;
|
||||
const int SpellType_Lifetap=64;
|
||||
const int SpellType_Snare=128;
|
||||
const int SpellType_DOT=256;
|
||||
const int SpellType_Dispel=512;
|
||||
const int SpellType_InCombatBuff=1024;
|
||||
const int SpellType_Mez=2048;
|
||||
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 uint32 MobAISpellRange=100; // max range of buffs
|
||||
|
||||
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;
|
||||
enum SpellTypes : uint32
|
||||
{
|
||||
SpellType_Nuke = (1 << 0),
|
||||
SpellType_Heal = (1 << 1),
|
||||
SpellType_Root = (1 << 2),
|
||||
SpellType_Buff = (1 << 3),
|
||||
SpellType_Escape = (1 << 4),
|
||||
SpellType_Pet = (1 << 5),
|
||||
SpellType_Lifetap = (1 << 6),
|
||||
SpellType_Snare = (1 << 7),
|
||||
SpellType_DOT = (1 << 8),
|
||||
SpellType_Dispel = (1 << 9),
|
||||
SpellType_InCombatBuff = (1 << 10),
|
||||
SpellType_Mez = (1 << 11),
|
||||
SpellType_Charm = (1 << 12),
|
||||
SpellType_Slow = (1 << 13),
|
||||
SpellType_Debuff = (1 << 14),
|
||||
SpellType_Cure = (1 << 15),
|
||||
SpellType_Resurrect = (1 << 16),
|
||||
SpellType_HateRedux = (1 << 17),
|
||||
SpellType_InCombatBuffSong = (1 << 18), // bard in-combat group/ae buffs
|
||||
SpellType_OutOfCombatBuffSong = (1 << 19), // bard out-of-combat group/ae buffs
|
||||
SpellType_PreCombatBuff = (1 << 20),
|
||||
SpellType_PreCombatBuffSong = (1 << 21),
|
||||
|
||||
#define SpellType_Any 0xFFFF
|
||||
SpellTypes_Detrimental = (SpellType_Nuke | SpellType_Root | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Charm | SpellType_Debuff | SpellType_Slow),
|
||||
SpellTypes_Beneficial = (SpellType_Heal | SpellType_Buff | SpellType_Escape | SpellType_Pet | SpellType_InCombatBuff | SpellType_Cure | SpellType_HateRedux | SpellType_InCombatBuffSong | SpellType_OutOfCombatBuffSong | SpellType_PreCombatBuff | SpellType_PreCombatBuffSong),
|
||||
|
||||
SpellType_Any = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
|
||||
// These should not be used to determine spell category..
|
||||
// They are a graphical affects (effects?) index only
|
||||
// TODO: import sai list
|
||||
enum SpellAffectIndex {
|
||||
SAI_Calm = 12, // Lull and Alliance Spells
|
||||
SAI_Dispell_Sight = 14, // Dispells and Spells like Bind Sight
|
||||
SAI_Memory_Blur = 27,
|
||||
SAI_Calm_Song = 43 // Lull and Alliance Songs
|
||||
SAI_Summon_Mount_Unclass = -1,
|
||||
SAI_Direct_Damage = 0,
|
||||
SAI_Heal_Cure = 1,
|
||||
SAI_AC_Buff = 2,
|
||||
SAI_AE_Damage = 3,
|
||||
SAI_Summon = 4, // Summoned Pets and Items
|
||||
SAI_Sight = 5,
|
||||
SAI_Mana_Regen_Resist_Song = 6,
|
||||
SAI_Stat_Buff = 7,
|
||||
SAI_Vanish = 9, // Invisibility and Gate/Port
|
||||
SAI_Appearance = 10, // Illusion and Size
|
||||
SAI_Enchanter_Pet = 11,
|
||||
SAI_Calm = 12, // Lull and Alliance Spells
|
||||
SAI_Fear = 13,
|
||||
SAI_Dispell_Sight = 14, // Dispells and Spells like Bind Sight
|
||||
SAI_Stun = 15,
|
||||
SAI_Haste_Runspeed = 16, // Haste and SoW
|
||||
SAI_Combat_Slow = 17,
|
||||
SAI_Damage_Shield = 18,
|
||||
SAI_Cannibalize_Weapon_Proc = 19,
|
||||
SAI_Weaken = 20,
|
||||
SAI_Banish = 21,
|
||||
SAI_Blind_Poison = 22,
|
||||
SAI_Cold_DD = 23,
|
||||
SAI_Poison_Disease_DD = 24,
|
||||
SAI_Fire_DD = 25,
|
||||
SAI_Memory_Blur = 27,
|
||||
SAI_Gravity_Fling = 28,
|
||||
SAI_Suffocate = 29,
|
||||
SAI_Lifetap_Over_Time = 30,
|
||||
SAI_Fire_AE = 31,
|
||||
SAI_Cold_AE = 33,
|
||||
SAI_Poison_Disease_AE = 34,
|
||||
SAI_Teleport = 40,
|
||||
SAI_Direct_Damage_Song = 41,
|
||||
SAI_Combat_Buff_Song = 42,
|
||||
SAI_Calm_Song = 43, // Lull and Alliance Songs
|
||||
SAI_Firework = 45,
|
||||
SAI_Firework_AE = 46,
|
||||
SAI_Weather_Rocket = 47,
|
||||
SAI_Convert_Vitals = 50,
|
||||
SAI_NPC_Special_60 = 60,
|
||||
SAI_NPC_Special_61 = 61,
|
||||
SAI_NPC_Special_62 = 62,
|
||||
SAI_NPC_Special_63 = 63,
|
||||
SAI_NPC_Special_70 = 70,
|
||||
SAI_NPC_Special_71 = 71,
|
||||
SAI_NPC_Special_80 = 80,
|
||||
SAI_Trap_Lock = 88
|
||||
};
|
||||
enum RESISTTYPE
|
||||
{
|
||||
@@ -485,7 +543,7 @@ typedef enum {
|
||||
#define SE_ManaAbsorbPercentDamage 329 // implemented
|
||||
#define SE_CriticalDamageMob 330 // implemented
|
||||
#define SE_Salvage 331 // implemented - chance to recover items that would be destroyed in failed tradeskill combine
|
||||
//#define SE_SummonToCorpse 332 // *not implemented AA - Call of the Wild (Druid/Shaman Res spell with no exp)
|
||||
#define SE_SummonToCorpse 332 // *not implemented AA - Call of the Wild (Druid/Shaman Res spell with no exp)
|
||||
#define SE_CastOnRuneFadeEffect 333 // implemented
|
||||
#define SE_BardAEDot 334 // implemented
|
||||
#define SE_BlockNextSpellFocus 335 // implemented - base1 chance to block next spell ie Puratus (8494)
|
||||
@@ -502,7 +560,7 @@ typedef enum {
|
||||
#define SE_HeadShotLevel 346 // implemented[AA] - HeadShot max level to kill
|
||||
#define SE_DoubleRangedAttack 347 // implemented - chance at an additional archery attack (consumes arrow)
|
||||
#define SE_LimitManaMin 348 // implemented
|
||||
#define SE_ShieldEquipHateMod 349 // implemented[AA] Increase melee hate when wearing a shield.
|
||||
#define SE_ShieldEquipDmgMod 349 // implemented[AA] Increase melee base damage (indirectly increasing hate) when wearing a shield.
|
||||
#define SE_ManaBurn 350 // implemented - Drains mana for damage/heal at a defined ratio up to a defined maximum amount of mana.
|
||||
//#define SE_PersistentEffect 351 // *not implemented. creates a trap/totem that casts a spell (spell id + base1?) when anything comes near it. can probably make a beacon for this
|
||||
//#define SE_IncreaseTrapCount 352 // *not implemented - looks to be some type of invulnerability? Test ITC (8755)
|
||||
@@ -519,7 +577,7 @@ typedef enum {
|
||||
#define SE_BandolierSlots 363 // *not implemented[AA] 'Battle Ready' expands the bandolier by one additional save slot per rank.
|
||||
#define SE_TripleAttackChance 364 // implemented
|
||||
#define SE_ProcOnSpellKillShot 365 // implemented - chance to trigger a spell on kill when the kill is caused by a specific spell with this effect in it (10470 Venin)
|
||||
#define SE_ShieldEquipDmgMod 366 // implemented[AA] Damage modifier to melee if shield equiped. (base1 = dmg mod , base2 = ?) ie Shield Specialist AA
|
||||
#define SE_GroupShielding 366 // *not implemented[AA] This gives you /shieldgroup
|
||||
#define SE_SetBodyType 367 // implemented - set body type of base1 so it can be affected by spells that are limited to that type (Plant, Animal, Undead, etc)
|
||||
//#define SE_FactionMod 368 // *not implemented - increases faction with base1 (faction id, live won't match up w/ ours) by base2
|
||||
#define SE_CorruptionCounter 369 // implemented
|
||||
@@ -735,7 +793,7 @@ struct SPDat_Spell_Struct
|
||||
/* 180 */ int spell_category; // -- GLOBAL_GROUP
|
||||
/* 181 */ //int pvp_duration; // buffdurationformula for PvP -- PVP_DURATION
|
||||
/* 182 */ //int pvp_duration_cap; // buffduration for PvP -- PVP_DURATION_CAP
|
||||
/* 183 */ //int pcnpc_only_flag; // valid values are 0, 1 = PCs (and mercs), and 2 = NPCs (and not mercs) -- PCNPC_ONLY_FLAG
|
||||
/* 183 */ int pcnpc_only_flag; // valid values are 0, 1 = PCs (and mercs), and 2 = NPCs (and not mercs) -- PCNPC_ONLY_FLAG
|
||||
/* 184 */ bool cast_not_standing; // this is checked in the client's EQ_Spell::IsCastWhileInvisSpell, this also blocks SE_InterruptCasting from affecting this spell -- CAST_NOT_STANDING
|
||||
/* 185 */ bool can_mgb; // 0=no, -1 or 1 = yes -- CAN_MGB
|
||||
/* 186 */ int dispel_flag; // -- NO_DISPELL
|
||||
|
||||
@@ -18,82 +18,3 @@
|
||||
*/
|
||||
|
||||
#include "textures.h"
|
||||
//#include "inventory_slot.h"
|
||||
|
||||
#include <string.h> // temp
|
||||
|
||||
|
||||
//int EQEmu::textures::ConvertEquipmentSlotToTextureSlot(int equipment_slot)
|
||||
//{
|
||||
// switch (equipment_slot) {
|
||||
// case inventory::PossessionsHead:
|
||||
// return textures::TextureHead;
|
||||
// case inventory::PossessionsChest:
|
||||
// return textures::TextureChest;
|
||||
// case inventory::PossessionsArms:
|
||||
// return textures::TextureArms;
|
||||
// case inventory::PossessionsWrist1:
|
||||
// return textures::TextureWrist;
|
||||
// case inventory::PossessionsHands:
|
||||
// return textures::TextureHands;
|
||||
// case inventory::PossessionsLegs:
|
||||
// return textures::TextureLegs;
|
||||
// case inventory::PossessionsFeet:
|
||||
// return textures::TextureFeet;
|
||||
// case inventory::PossessionsPrimary:
|
||||
// return textures::TexturePrimary;
|
||||
// case inventory::PossessionsSecondary:
|
||||
// return textures::TextureSecondary;
|
||||
// default:
|
||||
// return textures::TextureInvalid;
|
||||
// }
|
||||
//}
|
||||
|
||||
//int EQEmu::textures::ConvertEquipmentSlotToTextureSlot(const InventorySlot &equipment_slot)
|
||||
//{
|
||||
// if (equipment_slot.Type() != inventory::InvTypePossessions || equipment_slot.Bag() != inventory::InvBagInvalid || equipment_slot.Aug() != inventory::InvAugInvalid)
|
||||
// return textures::TextureInvalid;
|
||||
//
|
||||
// return ConvertEquipmentSlotToTextureSlot(equipment_slot.Slot());
|
||||
//}
|
||||
|
||||
//EQEmu::InventorySlot EQEmu::textures::ConvertTextureSlotToEquipmentSlot(int texture_slot)
|
||||
//{
|
||||
// switch (texture_slot) {
|
||||
// case textures::TextureHead:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsHead);
|
||||
// case textures::TextureChest:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsChest);
|
||||
// case textures::TextureArms:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsArms);
|
||||
// case textures::TextureWrist:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsWrist1);
|
||||
// case textures::TextureHands:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsHands);
|
||||
// case textures::TextureLegs:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsLegs);
|
||||
// case textures::TextureFeet:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsFeet);
|
||||
// case textures::TexturePrimary:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsPrimary);
|
||||
// case textures::TextureSecondary:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsSecondary);
|
||||
// default:
|
||||
// return EQEmu::InventorySlot();
|
||||
// }
|
||||
//}
|
||||
|
||||
EQEmu::TextureProfile::TextureProfile()
|
||||
{
|
||||
memset(&Slot, 0, (sizeof(Texture_Struct) * textures::TextureCount));
|
||||
}
|
||||
|
||||
EQEmu::TextureShortProfile::TextureShortProfile()
|
||||
{
|
||||
memset(&Slot, 0, (sizeof(uint32) * textures::TextureCount));
|
||||
}
|
||||
|
||||
EQEmu::TintProfile::TintProfile()
|
||||
{
|
||||
memset(&Slot, 0, (sizeof(uint32) * textures::TextureCount));
|
||||
}
|
||||
|
||||
+81
-84
@@ -25,116 +25,113 @@
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
//class InventorySlot;
|
||||
|
||||
namespace textures {
|
||||
//enum : int { TextureInvalid = -1, TextureBegin };
|
||||
enum : uint8 { TextureInvalid = 255, TextureBegin = 0 };
|
||||
enum : int8 { textureInvalid = -1, textureBegin };
|
||||
|
||||
//enum TextureSlot : int {
|
||||
enum TextureSlot : uint8 {
|
||||
TextureHead = TextureBegin,
|
||||
TextureChest,
|
||||
TextureArms,
|
||||
TextureWrist,
|
||||
TextureHands,
|
||||
TextureLegs,
|
||||
TextureFeet,
|
||||
TexturePrimary,
|
||||
TextureSecondary,
|
||||
TextureCount
|
||||
enum TextureSlot : int8 {
|
||||
armorHead = textureBegin,
|
||||
armorChest,
|
||||
armorArms,
|
||||
armorWrist,
|
||||
armorHands,
|
||||
armorLegs,
|
||||
armorFeet,
|
||||
weaponPrimary,
|
||||
weaponSecondary,
|
||||
materialCount,
|
||||
materialInvalid = textureInvalid
|
||||
};
|
||||
|
||||
const int LastTexture = TextureSecondary;
|
||||
const int LastTintableTexture = TextureFeet;
|
||||
enum TintSlot : int8 {
|
||||
tintHead = textureBegin,
|
||||
tintChest,
|
||||
tintArms,
|
||||
tintWrist,
|
||||
tintHands,
|
||||
tintLegs,
|
||||
tintFeet,
|
||||
tintCount,
|
||||
tintInvalid = textureInvalid
|
||||
};
|
||||
|
||||
//extern int ConvertEquipmentSlotToTextureSlot(int equipment_slot);
|
||||
//extern int ConvertEquipmentSlotToTextureSlot(const InventorySlot &equipment_slot);
|
||||
//extern InventorySlot ConvertTextureSlotToEquipmentSlot(int texture_slot);
|
||||
const int8 LastTexture = weaponSecondary;
|
||||
const int8 LastTintableTexture = tintFeet;
|
||||
|
||||
struct Texture_Struct {
|
||||
uint32 Material;
|
||||
uint32 Unknown1;
|
||||
uint32 EliteModel;
|
||||
uint32 HerosForgeModel;
|
||||
uint32 Unknown2; // same as material?
|
||||
};
|
||||
|
||||
struct TextureMaterial_Struct {
|
||||
uint32 Material;
|
||||
};
|
||||
|
||||
struct Tint_Struct {
|
||||
union {
|
||||
struct {
|
||||
uint8 Blue;
|
||||
uint8 Green;
|
||||
uint8 Red;
|
||||
uint8 UseTint; // if there's a tint, this is FF
|
||||
};
|
||||
uint32 Color;
|
||||
};
|
||||
};
|
||||
|
||||
} /*textures*/
|
||||
|
||||
struct Texture_Struct {
|
||||
uint32 Material;
|
||||
uint32 Unknown1;
|
||||
uint32 EliteMaterial;
|
||||
uint32 HeroForgeModel;
|
||||
uint32 Material2; // Same as material?
|
||||
};
|
||||
|
||||
struct TextureProfile {
|
||||
union {
|
||||
struct {
|
||||
Texture_Struct Head;
|
||||
Texture_Struct Chest;
|
||||
Texture_Struct Arms;
|
||||
Texture_Struct Wrist;
|
||||
Texture_Struct Hands;
|
||||
Texture_Struct Legs;
|
||||
Texture_Struct Feet;
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
textures::Texture_Struct Head;
|
||||
textures::Texture_Struct Chest;
|
||||
textures::Texture_Struct Arms;
|
||||
textures::Texture_Struct Wrist;
|
||||
textures::Texture_Struct Hands;
|
||||
textures::Texture_Struct Legs;
|
||||
textures::Texture_Struct Feet;
|
||||
textures::Texture_Struct Primary;
|
||||
textures::Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[textures::TextureCount];
|
||||
textures::Texture_Struct Slot[textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
};
|
||||
|
||||
struct TextureShort_Struct {
|
||||
uint32 Material;
|
||||
};
|
||||
|
||||
struct TextureShortProfile {
|
||||
struct TextureMaterialProfile {
|
||||
union {
|
||||
struct {
|
||||
TextureShort_Struct Head;
|
||||
TextureShort_Struct Chest;
|
||||
TextureShort_Struct Arms;
|
||||
TextureShort_Struct Wrist;
|
||||
TextureShort_Struct Hands;
|
||||
TextureShort_Struct Legs;
|
||||
TextureShort_Struct Feet;
|
||||
TextureShort_Struct Primary;
|
||||
TextureShort_Struct Secondary;
|
||||
textures::TextureMaterial_Struct Head;
|
||||
textures::TextureMaterial_Struct Chest;
|
||||
textures::TextureMaterial_Struct Arms;
|
||||
textures::TextureMaterial_Struct Wrist;
|
||||
textures::TextureMaterial_Struct Hands;
|
||||
textures::TextureMaterial_Struct Legs;
|
||||
textures::TextureMaterial_Struct Feet;
|
||||
textures::TextureMaterial_Struct Primary;
|
||||
textures::TextureMaterial_Struct Secondary;
|
||||
};
|
||||
TextureShort_Struct Slot[textures::TextureCount];
|
||||
textures::TextureMaterial_Struct Slot[textures::materialCount];
|
||||
};
|
||||
|
||||
TextureShortProfile();
|
||||
};
|
||||
|
||||
struct Tint_Struct {
|
||||
union {
|
||||
struct {
|
||||
uint8 Blue;
|
||||
uint8 Green;
|
||||
uint8 Red;
|
||||
uint8 UseTint; // if there's a tint this is FF
|
||||
};
|
||||
uint32 Color;
|
||||
};
|
||||
|
||||
//Tint_Struct();
|
||||
};
|
||||
|
||||
struct TintProfile {
|
||||
union {
|
||||
struct {
|
||||
Tint_Struct Head;
|
||||
Tint_Struct Chest;
|
||||
Tint_Struct Arms;
|
||||
Tint_Struct Wrist;
|
||||
Tint_Struct Hands;
|
||||
Tint_Struct Legs;
|
||||
Tint_Struct Feet;
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
textures::Tint_Struct Head;
|
||||
textures::Tint_Struct Chest;
|
||||
textures::Tint_Struct Arms;
|
||||
textures::Tint_Struct Wrist;
|
||||
textures::Tint_Struct Hands;
|
||||
textures::Tint_Struct Legs;
|
||||
textures::Tint_Struct Feet;
|
||||
textures::Tint_Struct Primary;
|
||||
textures::Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[textures::TextureCount];
|
||||
textures::Tint_Struct Slot[textures::materialCount]; // materialCount is correct..but, {[weaponPrimary],[weaponSecondary]} are not tintable...
|
||||
};
|
||||
|
||||
TintProfile();
|
||||
};
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
+2
-2
@@ -30,9 +30,9 @@
|
||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9100
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9107
|
||||
#ifdef BOTS
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9008
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9015
|
||||
#else
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
|
||||
#endif
|
||||
|
||||
@@ -99,9 +99,11 @@ bool Client::Process()
|
||||
}
|
||||
default:
|
||||
{
|
||||
char dump[64];
|
||||
app->build_header_dump(dump);
|
||||
Log.Out(Logs::General, Logs::Error, "Recieved unhandled application packet from the client: %s.", dump);
|
||||
if (Log.log_settings[Logs::Client_Server_Packet_Unhandled].is_category_enabled == 1) {
|
||||
char dump[64];
|
||||
app->build_header_dump(dump);
|
||||
Log.Out(Logs::General, Logs::Error, "Recieved unhandled application packet from the client: %s.", dump);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ void Config::Parse(const char *file_name)
|
||||
*/
|
||||
void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
||||
{
|
||||
char c = fgetc(input);
|
||||
auto c = fgetc(input);
|
||||
std::string lexeme;
|
||||
|
||||
while(c != EOF)
|
||||
@@ -162,7 +162,7 @@ void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
||||
|
||||
if(isalnum(c))
|
||||
{
|
||||
lexeme.append((const char *)&c, 1);
|
||||
lexeme += c;
|
||||
c = fgetc(input);
|
||||
continue;
|
||||
}
|
||||
@@ -193,14 +193,14 @@ void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
||||
lexeme.clear();
|
||||
}
|
||||
|
||||
lexeme.append((const char *)&c, 1);
|
||||
lexeme += c;
|
||||
tokens.push_back(lexeme);
|
||||
lexeme.clear();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
lexeme.append((const char *)&c, 1);
|
||||
lexeme += c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "../common/ipc_mutex.h"
|
||||
#include "../common/memory_mapped_file.h"
|
||||
#include "../common/eqemu_exception.h"
|
||||
#include "../common/item_base.h"
|
||||
#include "../common/item_data.h"
|
||||
|
||||
void LoadItems(SharedDatabase *database, const std::string &prefix) {
|
||||
EQEmu::IPCMutex mutex("items");
|
||||
@@ -35,7 +35,7 @@ void LoadItems(SharedDatabase *database, const std::string &prefix) {
|
||||
EQ_EXCEPT("Shared Memory", "Unable to get any items from the database.");
|
||||
}
|
||||
|
||||
uint32 size = static_cast<uint32>(EQEmu::FixedMemoryHashSet<EQEmu::ItemBase>::estimated_size(items, max_item));
|
||||
uint32 size = static_cast<uint32>(EQEmu::FixedMemoryHashSet<EQEmu::ItemData>::estimated_size(items, max_item));
|
||||
|
||||
auto Config = EQEmuConfig::get();
|
||||
std::string file_name = Config->SharedMemDir + prefix + std::string("items");
|
||||
|
||||
@@ -36,6 +36,39 @@
|
||||
|
||||
EQEmuLogSys Log;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include <direct.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
inline bool MakeDirectory(const std::string &directory_name)
|
||||
{
|
||||
#ifdef _WINDOWS
|
||||
struct _stat st;
|
||||
if (_stat(directory_name.c_str(), &st) == 0) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
_mkdir(directory_name.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
struct stat st;
|
||||
if (stat(directory_name.c_str(), &st) == 0) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
mkdir(directory_name.c_str(), 0755);
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
RegisterExecutablePlatform(ExePlatformSharedMemory);
|
||||
Log.LoadLogSettingsDefaults();
|
||||
@@ -62,6 +95,11 @@ int main(int argc, char **argv) {
|
||||
database.LoadLogSettings(Log.log_settings);
|
||||
Log.StartFileLogs();
|
||||
|
||||
std::string shared_mem_directory = Config->SharedMemDir;
|
||||
if (MakeDirectory(shared_mem_directory)) {
|
||||
Log.Out(Logs::General, Logs::Status, "Shared Memory folder doesn't exist, so we created it... '%s'", shared_mem_directory.c_str());
|
||||
}
|
||||
|
||||
database.LoadVariables();
|
||||
|
||||
/* If we're running shared memory and hotfix has no custom name, we probably want to start from scratch... */
|
||||
|
||||
+24
-24
@@ -21,13 +21,13 @@
|
||||
|
||||
#include "cppunit/cpptest.h"
|
||||
#include "../common/fixed_memory_hash_set.h"
|
||||
#include "../common/item.h"
|
||||
#include "../common/item_instance.h"
|
||||
|
||||
class FixedMemoryHashTest : public Test::Suite {
|
||||
typedef void(FixedMemoryHashTest::*TestFunction)(void);
|
||||
public:
|
||||
FixedMemoryHashTest() {
|
||||
size_ = EQEmu::FixedMemoryHashSet<EQEmu::ItemBase>::estimated_size(72000, 190000);
|
||||
size_ = EQEmu::FixedMemoryHashSet<EQEmu::ItemData>::estimated_size(72000, 190000);
|
||||
data_ = new uint8[size_];
|
||||
memset(data_, 0, size_);
|
||||
TEST_ADD(FixedMemoryHashTest::InitTest);
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
private:
|
||||
void InitTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_, 72000, 190000);
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_, 72000, 190000);
|
||||
TEST_ASSERT(!hash.exists(1001));
|
||||
TEST_ASSERT(hash.size() == 0);
|
||||
TEST_ASSERT(hash.max_size() == 72000);
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
}
|
||||
|
||||
void LoadTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
TEST_ASSERT(!hash.exists(1001));
|
||||
TEST_ASSERT(hash.size() == 0);
|
||||
TEST_ASSERT(hash.max_size() == 72000);
|
||||
@@ -65,8 +65,8 @@ public:
|
||||
}
|
||||
|
||||
void InsertTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::ItemBase item;
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
EQEmu::ItemData item;
|
||||
memset(&item, 0, sizeof(item));
|
||||
strcpy(item.Name, "Iron Sword");
|
||||
item.ID = 1001;
|
||||
@@ -79,20 +79,20 @@ public:
|
||||
}
|
||||
|
||||
void RetrieveTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
TEST_ASSERT(hash.exists(1001));
|
||||
TEST_ASSERT(hash.size() == 1);
|
||||
TEST_ASSERT(hash.max_size() == 72000);
|
||||
TEST_ASSERT(!hash.empty());
|
||||
|
||||
EQEmu::ItemBase item = hash[1001];
|
||||
EQEmu::ItemData item = hash[1001];
|
||||
TEST_ASSERT(strcmp(item.Name, "Iron Sword") == 0);
|
||||
TEST_ASSERT(item.ID == 1001);
|
||||
}
|
||||
|
||||
void OverwriteTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::ItemBase item;
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
EQEmu::ItemData item;
|
||||
memset(&item, 0, sizeof(item));
|
||||
strcpy(item.Name, "Steel Sword");
|
||||
item.ID = 1001;
|
||||
@@ -105,20 +105,20 @@ public:
|
||||
}
|
||||
|
||||
void OverwriteRetrieveTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
TEST_ASSERT(hash.exists(1001));
|
||||
TEST_ASSERT(hash.size() == 1);
|
||||
TEST_ASSERT((hash.max_size() == 72000));
|
||||
TEST_ASSERT(!hash.empty());
|
||||
|
||||
EQEmu::ItemBase item = hash[1001];
|
||||
EQEmu::ItemData item = hash[1001];
|
||||
TEST_ASSERT(strcmp(item.Name, "Steel Sword") == 0);
|
||||
TEST_ASSERT(item.ID == 1001);
|
||||
}
|
||||
|
||||
void InsertAgainTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::ItemBase item;
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
EQEmu::ItemData item;
|
||||
memset(&item, 0, sizeof(item));
|
||||
strcpy(item.Name, "Iron Sword");
|
||||
item.ID = 1000;
|
||||
@@ -132,14 +132,14 @@ public:
|
||||
}
|
||||
|
||||
void RetrieveAgainTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
TEST_ASSERT(hash.exists(1000));
|
||||
TEST_ASSERT(hash.exists(1001));
|
||||
TEST_ASSERT(hash.size() == 2);
|
||||
TEST_ASSERT(hash.max_size() == 72000);
|
||||
TEST_ASSERT(!hash.empty());
|
||||
|
||||
EQEmu::ItemBase item = hash[1000];
|
||||
EQEmu::ItemData item = hash[1000];
|
||||
TEST_ASSERT(strcmp(item.Name, "Iron Sword") == 0);
|
||||
TEST_ASSERT(item.ID == 1000);
|
||||
|
||||
@@ -149,8 +149,8 @@ public:
|
||||
}
|
||||
|
||||
void InsertBeginTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::ItemBase item;
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
EQEmu::ItemData item;
|
||||
memset(&item, 0, sizeof(item));
|
||||
strcpy(item.Name, "Bronze Sword");
|
||||
item.ID = 0;
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
}
|
||||
|
||||
void RetrieveBeginTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
TEST_ASSERT(hash.exists(1000));
|
||||
TEST_ASSERT(hash.exists(1001));
|
||||
TEST_ASSERT(hash.exists(0));
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
TEST_ASSERT(hash.max_size() == 72000);
|
||||
TEST_ASSERT(!hash.empty());
|
||||
|
||||
EQEmu::ItemBase item = hash[1000];
|
||||
EQEmu::ItemData item = hash[1000];
|
||||
TEST_ASSERT(strcmp(item.Name, "Iron Sword") == 0);
|
||||
TEST_ASSERT(item.ID == 1000);
|
||||
|
||||
@@ -187,8 +187,8 @@ public:
|
||||
}
|
||||
|
||||
void InsertEndTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::ItemBase item;
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
EQEmu::ItemData item;
|
||||
memset(&item, 0, sizeof(item));
|
||||
strcpy(item.Name, "Jade Sword");
|
||||
item.ID = 190000;
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
}
|
||||
|
||||
void RetrieveEndTest() {
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemBase> hash(data_, size_);
|
||||
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(data_, size_);
|
||||
TEST_ASSERT(hash.exists(1000));
|
||||
TEST_ASSERT(hash.exists(1001));
|
||||
TEST_ASSERT(hash.exists(0));
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
TEST_ASSERT(hash.max_size() == 72000);
|
||||
TEST_ASSERT(!hash.empty());
|
||||
|
||||
EQEmu::ItemBase item = hash[1000];
|
||||
EQEmu::ItemData item = hash[1000];
|
||||
TEST_ASSERT(strcmp(item.Name, "Iron Sword") == 0);
|
||||
TEST_ASSERT(item.ID == 1000);
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
var app = angular.module('app', ['nvd3']);
|
||||
|
||||
app.controller('MainCtrl', function($scope, $interval) {
|
||||
$scope.options = {
|
||||
chart: {
|
||||
type: 'discreteBarChart',
|
||||
height: 450,
|
||||
margin: {
|
||||
top: 20,
|
||||
right: 20,
|
||||
bottom: 50,
|
||||
left: 55
|
||||
},
|
||||
x: function(d) {
|
||||
return d.label;
|
||||
},
|
||||
y: function(d) {
|
||||
return d.value + (1e-10);
|
||||
},
|
||||
showValues: true,
|
||||
valueFormat: function(d) {
|
||||
return d3.format(',.2r')(d);
|
||||
},
|
||||
duration: 500,
|
||||
xAxis: {
|
||||
axisLabel: 'D1-D20'
|
||||
},
|
||||
yAxis: {
|
||||
axisLabel: 'Count'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$scope.offense = 100;
|
||||
$scope.mitigation = 100;
|
||||
|
||||
$scope.data = [{
|
||||
key: "Cumulative Return",
|
||||
values: []
|
||||
}];
|
||||
|
||||
for (var i = 0; i < 20; ++i) {
|
||||
var value = {
|
||||
"label": i + 1,
|
||||
"value": 0
|
||||
};
|
||||
$scope.data[0].values.push(value);
|
||||
}
|
||||
|
||||
function addRoll(interval) {
|
||||
$scope.data[0].values[interval - 1].value += 1;
|
||||
}
|
||||
|
||||
var stop;
|
||||
$scope.clearData = function() {
|
||||
console.log('Clearing data');
|
||||
for (var i = 0; i < 20; ++i) {
|
||||
$scope.data[0].values[i].value = 0;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.start = function() {
|
||||
if (angular.isDefined(stop))
|
||||
return;
|
||||
|
||||
stop = $interval(doCombatRound, 100);
|
||||
};
|
||||
|
||||
$scope.stop = function() {
|
||||
if (angular.isDefined(stop)) {
|
||||
$interval.cancel(stop);
|
||||
stop = undefined;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.$on('$destroy', function() {
|
||||
$scope.stop();
|
||||
});
|
||||
|
||||
var damage_mods = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
|
||||
|
||||
function getRandomInt(min, max) {
|
||||
min = Math.ceil(min);
|
||||
max = Math.floor(max);
|
||||
return Math.floor(Math.random() * (max - min)) + min;
|
||||
}
|
||||
|
||||
function getRandom(min, max) {
|
||||
return Math.random() * (max - min) + min;
|
||||
}
|
||||
|
||||
function addChance(bucket, chance, value) {
|
||||
for (var i = 0; i < chance; ++i) {
|
||||
bucket.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
function doCombatRound() {
|
||||
var offense = getRandomInt(0, $scope.offense + 5);
|
||||
var mitigation = getRandomInt(0, $scope.mitigation + 5);
|
||||
var avg = parseInt(($scope.offense + $scope.mitigation + 10) / 2);
|
||||
var index = parseInt((offense - mitigation) + (avg / 2));
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
index = parseInt((index * 20) / avg);
|
||||
if (index >= 20)
|
||||
index = 19;
|
||||
if (index < 0)
|
||||
index = 0;
|
||||
var roll = damage_mods[index];
|
||||
addRoll(roll);
|
||||
};
|
||||
});
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="app">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Combat Visualization</title>
|
||||
<script>document.write('<base href="' + document.location + '" />');</script>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.1/nv.d3.min.css"/>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.1/nv.d3.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-nvd3/1.0.5/angular-nvd3.min.js"></script>
|
||||
<script src="app.js"></script>
|
||||
</head>
|
||||
|
||||
<body ng-controller="MainCtrl">
|
||||
<nvd3 options="options" data="data"></nvd3>
|
||||
<button ng-click=clearData()>Clear Data</button>
|
||||
<button ng-click=start()>Start</button>
|
||||
<button ng-click=stop()>Stop</button>
|
||||
<div class="input-row">
|
||||
<label>Offense:</label>
|
||||
<input type="number" name="Offense" ng-model="offense"></input>
|
||||
</div>
|
||||
<div class="input-row">
|
||||
<label>Mitigation:</label>
|
||||
<input type="number" name="mitigation" ng-model="mitigation"></input>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
.input-row {
|
||||
padding: 8px;
|
||||
}
|
||||
@@ -359,6 +359,9 @@ OP_OpenContainer=0x654f
|
||||
OP_Marquee=0x288a
|
||||
OP_Fling=0x6b8e
|
||||
OP_CancelSneakHide=0x265f
|
||||
OP_AggroMeterLockTarget=0x70b7
|
||||
OP_AggroMeterTargetInfo=0x18fe
|
||||
OP_AggroMeterUpdate=0x75aa
|
||||
|
||||
OP_DzQuit=0x5fc8
|
||||
OP_DzListTimers=0x67b9
|
||||
|
||||
@@ -150,7 +150,7 @@ OP_GMZoneRequest=0x62ac
|
||||
OP_GMZoneRequest2=0x7e1a
|
||||
OP_GMGoto=0x7d8e
|
||||
OP_GMSearchCorpse=0x357c
|
||||
OP_GMHideMe=0x79c5
|
||||
OP_GMHideMe=0x2fab
|
||||
OP_GMDelCorpse=0x607e
|
||||
OP_GMApproval=0x6db5
|
||||
OP_GMToggle=0x2097
|
||||
@@ -360,6 +360,9 @@ OP_ItemRecastDelay=0x15a9
|
||||
OP_ResetAA=0x1669
|
||||
OP_Fling=0x6f80
|
||||
OP_CancelSneakHide=0x0927
|
||||
OP_AggroMeterLockTarget=0x1643
|
||||
OP_AggroMeterTargetInfo=0x16bc
|
||||
OP_AggroMeterUpdate=0x1781
|
||||
|
||||
# Expeditions
|
||||
OP_DzAddPlayer=0x4701
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
DELIMITER $$
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetBodyTypeToken`;
|
||||
|
||||
-- This function converts a numeric body type to a string label based on server code designations
|
||||
-- Note: A preceeding '*' indicates a non-client verified token
|
||||
--
|
||||
-- example:
|
||||
-- SELECT `id`, `name`, GetBodyTypeToken(`bodytype`) FROM `npc_types` WHERE `id` IN ('116539', '154086', '164042');
|
||||
CREATE FUNCTION `GetBodyTypeToken` (`body_type` INT(11)) RETURNS VARCHAR(64)
|
||||
BEGIN
|
||||
DECLARE `token` VARCHAR(64) DEFAULT '';
|
||||
|
||||
CASE `body_type`
|
||||
WHEN '1' THEN SET `token` = 'BT_Humanoid';
|
||||
WHEN '2' THEN SET `token` = 'BT_Lycanthrope';
|
||||
WHEN '3' THEN SET `token` = 'BT_Undead';
|
||||
WHEN '4' THEN SET `token` = 'BT_Giant';
|
||||
WHEN '5' THEN SET `token` = 'BT_Construct';
|
||||
WHEN '6' THEN SET `token` = 'BT_Extraplanar';
|
||||
WHEN '7' THEN SET `token` = 'BT_Magical';
|
||||
WHEN '8' THEN SET `token` = '*BT_SummonedUndead';
|
||||
WHEN '9' THEN SET `token` = '*BT_RaidGiant';
|
||||
WHEN '11' THEN SET `token` = '*BT_NoTarget';
|
||||
WHEN '12' THEN SET `token` = 'BT_Vampyre';
|
||||
WHEN '13' THEN SET `token` = 'BT_Atenha_Ra';
|
||||
WHEN '14' THEN SET `token` = 'BT_Greater_Akheva';
|
||||
WHEN '15' THEN SET `token` = 'BT_Khati_Sha';
|
||||
WHEN '16' THEN SET `token` = '*BT_Seru';
|
||||
WHEN '18' THEN SET `token` = 'BT_Draz_Nurakk';
|
||||
WHEN '19' THEN SET `token` = 'BT_Zek';
|
||||
WHEN '20' THEN SET `token` = 'BT_Luggald';
|
||||
WHEN '21' THEN SET `token` = 'BT_Animal';
|
||||
WHEN '22' THEN SET `token` = 'BT_Insect';
|
||||
WHEN '23' THEN SET `token` = 'BT_Monster';
|
||||
WHEN '24' THEN SET `token` = 'BT_Elemental/*BT_Summoned';
|
||||
WHEN '25' THEN SET `token` = 'BT_Plant';
|
||||
WHEN '26' THEN SET `token` = 'BT_Dragon';
|
||||
WHEN '27' THEN SET `token` = '*BT_Summoned2';
|
||||
WHEN '28' THEN SET `token` = 'BT_Summoned_Creature/*BT_Summoned3';
|
||||
WHEN '30' THEN SET `token` = '*BT_VeliousDragon';
|
||||
WHEN '32' THEN SET `token` = '*BT_Dragon3';
|
||||
WHEN '33' THEN SET `token` = '*BT_Boxes';
|
||||
WHEN '34' THEN SET `token` = 'BT_Muramite';
|
||||
WHEN '60' THEN SET `token` = '*BT_NoTarget2';
|
||||
WHEN '63' THEN SET `token` = '*BT_SwarmPet';
|
||||
WHEN '66' THEN SET `token` = '*BT_InvisMan';
|
||||
WHEN '67' THEN SET `token` = '*BT_Special';
|
||||
ELSE SET `token` = 'BT_UNKNOWN_BODYTYPE';
|
||||
END CASE;
|
||||
|
||||
SET `token` = CONCAT(`token`, '(', `body_type`, ')');
|
||||
|
||||
RETURN `token`;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -0,0 +1,756 @@
|
||||
DELIMITER $$
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetRaceToken`;
|
||||
|
||||
-- This function converts a numeric race id to a string label based on server code designations
|
||||
--
|
||||
-- example:
|
||||
-- SELECT `id`, `name`, GetRaceToken(`race`) FROM `npc_types` WHERE `id` IN ('644', '105153', '261131');
|
||||
CREATE FUNCTION `GetRaceToken` (`race_id` INT(11)) RETURNS VARCHAR(64)
|
||||
BEGIN
|
||||
DECLARE `token` VARCHAR(64) DEFAULT '';
|
||||
|
||||
CASE `race_id`
|
||||
WHEN '0' THEN SET `token` = 'UNKNOWN RACE';
|
||||
WHEN '1' THEN SET `token` = 'Human';
|
||||
WHEN '2' THEN SET `token` = 'Barbarian';
|
||||
WHEN '3' THEN SET `token` = 'Erudite';
|
||||
WHEN '4' THEN SET `token` = 'Wood Elf';
|
||||
WHEN '5' THEN SET `token` = 'High Elf';
|
||||
WHEN '6' THEN SET `token` = 'Dark Elf';
|
||||
WHEN '7' THEN SET `token` = 'Half Elf';
|
||||
WHEN '8' THEN SET `token` = 'Dwarf';
|
||||
WHEN '9' THEN SET `token` = 'Troll';
|
||||
WHEN '10' THEN SET `token` = 'Ogre';
|
||||
WHEN '11' THEN SET `token` = 'Halfling';
|
||||
WHEN '12' THEN SET `token` = 'Gnome';
|
||||
WHEN '13' THEN SET `token` = 'Aviak';
|
||||
WHEN '14' THEN SET `token` = 'Werewolf';
|
||||
WHEN '15' THEN SET `token` = 'Brownie';
|
||||
WHEN '16' THEN SET `token` = 'Centaur';
|
||||
WHEN '17' THEN SET `token` = 'Golem';
|
||||
WHEN '18' THEN SET `token` = 'Giant';
|
||||
WHEN '19' THEN SET `token` = 'Trakanon';
|
||||
WHEN '20' THEN SET `token` = 'Venril Sathir';
|
||||
WHEN '21' THEN SET `token` = 'Evil Eye';
|
||||
WHEN '22' THEN SET `token` = 'Beetle';
|
||||
WHEN '23' THEN SET `token` = 'Kerran';
|
||||
WHEN '24' THEN SET `token` = 'Fish';
|
||||
WHEN '25' THEN SET `token` = 'Fairy';
|
||||
WHEN '26' THEN SET `token` = 'Froglok';
|
||||
WHEN '27' THEN SET `token` = 'Froglok';
|
||||
WHEN '28' THEN SET `token` = 'Fungusman';
|
||||
WHEN '29' THEN SET `token` = 'Gargoyle';
|
||||
WHEN '30' THEN SET `token` = 'Gasbag';
|
||||
WHEN '31' THEN SET `token` = 'Gelatinous Cube';
|
||||
WHEN '32' THEN SET `token` = 'Ghost';
|
||||
WHEN '33' THEN SET `token` = 'Ghoul';
|
||||
WHEN '34' THEN SET `token` = 'Bat';
|
||||
WHEN '35' THEN SET `token` = 'Eel';
|
||||
WHEN '36' THEN SET `token` = 'Rat';
|
||||
WHEN '37' THEN SET `token` = 'Snake';
|
||||
WHEN '38' THEN SET `token` = 'Spider';
|
||||
WHEN '39' THEN SET `token` = 'Gnoll';
|
||||
WHEN '40' THEN SET `token` = 'Goblin';
|
||||
WHEN '41' THEN SET `token` = 'Gorilla';
|
||||
WHEN '42' THEN SET `token` = 'Wolf';
|
||||
WHEN '43' THEN SET `token` = 'Bear';
|
||||
WHEN '44' THEN SET `token` = 'Guard';
|
||||
WHEN '45' THEN SET `token` = 'Demi Lich';
|
||||
WHEN '46' THEN SET `token` = 'Imp';
|
||||
WHEN '47' THEN SET `token` = 'Griffin';
|
||||
WHEN '48' THEN SET `token` = 'Kobold';
|
||||
WHEN '49' THEN SET `token` = 'Dragon';
|
||||
WHEN '50' THEN SET `token` = 'Lion';
|
||||
WHEN '51' THEN SET `token` = 'Lizard Man';
|
||||
WHEN '52' THEN SET `token` = 'Mimic';
|
||||
WHEN '53' THEN SET `token` = 'Minotaur';
|
||||
WHEN '54' THEN SET `token` = 'Orc';
|
||||
WHEN '55' THEN SET `token` = 'Beggar';
|
||||
WHEN '56' THEN SET `token` = 'Pixie';
|
||||
WHEN '57' THEN SET `token` = 'Drachnid';
|
||||
WHEN '58' THEN SET `token` = 'Solusek Ro';
|
||||
WHEN '59' THEN SET `token` = 'Goblin';
|
||||
WHEN '60' THEN SET `token` = 'Skeleton';
|
||||
WHEN '61' THEN SET `token` = 'Shark';
|
||||
WHEN '62' THEN SET `token` = 'Tunare';
|
||||
WHEN '63' THEN SET `token` = 'Tiger';
|
||||
WHEN '64' THEN SET `token` = 'Treant';
|
||||
WHEN '65' THEN SET `token` = 'Vampire';
|
||||
WHEN '66' THEN SET `token` = 'Rallos Zek';
|
||||
WHEN '67' THEN SET `token` = 'Human';
|
||||
WHEN '68' THEN SET `token` = 'Tentacle Terror';
|
||||
WHEN '69' THEN SET `token` = 'Will-O-Wisp';
|
||||
WHEN '70' THEN SET `token` = 'Zombie';
|
||||
WHEN '71' THEN SET `token` = 'Human';
|
||||
WHEN '72' THEN SET `token` = 'Ship';
|
||||
WHEN '73' THEN SET `token` = 'Launch';
|
||||
WHEN '74' THEN SET `token` = 'Piranha';
|
||||
WHEN '75' THEN SET `token` = 'Elemental';
|
||||
WHEN '76' THEN SET `token` = 'Puma';
|
||||
WHEN '77' THEN SET `token` = 'Dark Elf';
|
||||
WHEN '78' THEN SET `token` = 'Erudite';
|
||||
WHEN '79' THEN SET `token` = 'Bixie';
|
||||
WHEN '80' THEN SET `token` = 'Reanimated Hand';
|
||||
WHEN '81' THEN SET `token` = 'Halfling';
|
||||
WHEN '82' THEN SET `token` = 'Scarecrow';
|
||||
WHEN '83' THEN SET `token` = 'Skunk';
|
||||
WHEN '84' THEN SET `token` = 'Snake Elemental';
|
||||
WHEN '85' THEN SET `token` = 'Spectre';
|
||||
WHEN '86' THEN SET `token` = 'Sphinx';
|
||||
WHEN '87' THEN SET `token` = 'Armadillo';
|
||||
WHEN '88' THEN SET `token` = 'Clockwork Gnome';
|
||||
WHEN '89' THEN SET `token` = 'Drake';
|
||||
WHEN '90' THEN SET `token` = 'Barbarian';
|
||||
WHEN '91' THEN SET `token` = 'Alligator';
|
||||
WHEN '92' THEN SET `token` = 'Troll';
|
||||
WHEN '93' THEN SET `token` = 'Ogre';
|
||||
WHEN '94' THEN SET `token` = 'Dwarf';
|
||||
WHEN '95' THEN SET `token` = 'Cazic Thule';
|
||||
WHEN '96' THEN SET `token` = 'Cockatrice';
|
||||
WHEN '97' THEN SET `token` = 'Daisy Man';
|
||||
WHEN '98' THEN SET `token` = 'Vampire';
|
||||
WHEN '99' THEN SET `token` = 'Amygdalan';
|
||||
WHEN '100' THEN SET `token` = 'Dervish';
|
||||
WHEN '101' THEN SET `token` = 'Efreeti';
|
||||
WHEN '102' THEN SET `token` = 'Tadpole';
|
||||
WHEN '103' THEN SET `token` = 'Kedge';
|
||||
WHEN '104' THEN SET `token` = 'Leech';
|
||||
WHEN '105' THEN SET `token` = 'Swordfish';
|
||||
WHEN '106' THEN SET `token` = 'Guard';
|
||||
WHEN '107' THEN SET `token` = 'Mammoth';
|
||||
WHEN '108' THEN SET `token` = 'Eye';
|
||||
WHEN '109' THEN SET `token` = 'Wasp';
|
||||
WHEN '110' THEN SET `token` = 'Mermaid';
|
||||
WHEN '111' THEN SET `token` = 'Harpy';
|
||||
WHEN '112' THEN SET `token` = 'Guard';
|
||||
WHEN '113' THEN SET `token` = 'Drixie';
|
||||
WHEN '114' THEN SET `token` = 'Ghost Ship';
|
||||
WHEN '115' THEN SET `token` = 'Clam';
|
||||
WHEN '116' THEN SET `token` = 'Seahorse';
|
||||
WHEN '117' THEN SET `token` = 'Ghost';
|
||||
WHEN '118' THEN SET `token` = 'Ghost';
|
||||
WHEN '119' THEN SET `token` = 'Saber-toothed Cat';
|
||||
WHEN '120' THEN SET `token` = 'Wolf';
|
||||
WHEN '121' THEN SET `token` = 'Gorgon';
|
||||
WHEN '122' THEN SET `token` = 'Dragon';
|
||||
WHEN '123' THEN SET `token` = 'Innoruuk';
|
||||
WHEN '124' THEN SET `token` = 'Unicorn';
|
||||
WHEN '125' THEN SET `token` = 'Pegasus';
|
||||
WHEN '126' THEN SET `token` = 'Djinn';
|
||||
WHEN '127' THEN SET `token` = 'Invisible Man';
|
||||
WHEN '128' THEN SET `token` = 'Iksar';
|
||||
WHEN '129' THEN SET `token` = 'Scorpion';
|
||||
WHEN '130' THEN SET `token` = 'Vah Shir';
|
||||
WHEN '131' THEN SET `token` = 'Sarnak';
|
||||
WHEN '132' THEN SET `token` = 'Draglock';
|
||||
WHEN '133' THEN SET `token` = 'Drolvarg';
|
||||
WHEN '134' THEN SET `token` = 'Mosquito';
|
||||
WHEN '135' THEN SET `token` = 'Rhinoceros';
|
||||
WHEN '136' THEN SET `token` = 'Xalgoz';
|
||||
WHEN '137' THEN SET `token` = 'Goblin';
|
||||
WHEN '138' THEN SET `token` = 'Yeti';
|
||||
WHEN '139' THEN SET `token` = 'Iksar';
|
||||
WHEN '140' THEN SET `token` = 'Giant';
|
||||
WHEN '141' THEN SET `token` = 'Boat';
|
||||
WHEN '142' THEN SET `token` = 'UNKNOWN RACE';
|
||||
WHEN '143' THEN SET `token` = 'UNKNOWN RACE';
|
||||
WHEN '144' THEN SET `token` = 'Burynai';
|
||||
WHEN '145' THEN SET `token` = 'Goo';
|
||||
WHEN '146' THEN SET `token` = 'Sarnak Spirit';
|
||||
WHEN '147' THEN SET `token` = 'Iksar Spirit';
|
||||
WHEN '148' THEN SET `token` = 'Fish';
|
||||
WHEN '149' THEN SET `token` = 'Scorpion';
|
||||
WHEN '150' THEN SET `token` = 'Erollisi';
|
||||
WHEN '151' THEN SET `token` = 'Tribunal';
|
||||
WHEN '152' THEN SET `token` = 'Bertoxxulous';
|
||||
WHEN '153' THEN SET `token` = 'Bristlebane';
|
||||
WHEN '154' THEN SET `token` = 'Fay Drake';
|
||||
WHEN '155' THEN SET `token` = 'Undead Sarnak';
|
||||
WHEN '156' THEN SET `token` = 'Ratman';
|
||||
WHEN '157' THEN SET `token` = 'Wyvern';
|
||||
WHEN '158' THEN SET `token` = 'Wurm';
|
||||
WHEN '159' THEN SET `token` = 'Devourer';
|
||||
WHEN '160' THEN SET `token` = 'Iksar Golem';
|
||||
WHEN '161' THEN SET `token` = 'Undead Iksar';
|
||||
WHEN '162' THEN SET `token` = 'Man-Eating Plant';
|
||||
WHEN '163' THEN SET `token` = 'Raptor';
|
||||
WHEN '164' THEN SET `token` = 'Sarnak Golem';
|
||||
WHEN '165' THEN SET `token` = 'Dragon';
|
||||
WHEN '166' THEN SET `token` = 'Animated Hand';
|
||||
WHEN '167' THEN SET `token` = 'Succulent';
|
||||
WHEN '168' THEN SET `token` = 'Holgresh';
|
||||
WHEN '169' THEN SET `token` = 'Brontotherium';
|
||||
WHEN '170' THEN SET `token` = 'Snow Dervish';
|
||||
WHEN '171' THEN SET `token` = 'Dire Wolf';
|
||||
WHEN '172' THEN SET `token` = 'Manticore';
|
||||
WHEN '173' THEN SET `token` = 'Totem';
|
||||
WHEN '174' THEN SET `token` = 'Ice Spectre';
|
||||
WHEN '175' THEN SET `token` = 'Enchanted Armor';
|
||||
WHEN '176' THEN SET `token` = 'Snow Rabbit';
|
||||
WHEN '177' THEN SET `token` = 'Walrus';
|
||||
WHEN '178' THEN SET `token` = 'Geonid';
|
||||
WHEN '179' THEN SET `token` = 'UNKNOWN RACE';
|
||||
WHEN '180' THEN SET `token` = 'UNKNOWN RACE';
|
||||
WHEN '181' THEN SET `token` = 'Yakkar';
|
||||
WHEN '182' THEN SET `token` = 'Faun';
|
||||
WHEN '183' THEN SET `token` = 'Coldain';
|
||||
WHEN '184' THEN SET `token` = 'Dragon';
|
||||
WHEN '185' THEN SET `token` = 'Hag';
|
||||
WHEN '186' THEN SET `token` = 'Hippogriff';
|
||||
WHEN '187' THEN SET `token` = 'Siren';
|
||||
WHEN '188' THEN SET `token` = 'Giant';
|
||||
WHEN '189' THEN SET `token` = 'Giant';
|
||||
WHEN '190' THEN SET `token` = 'Othmir';
|
||||
WHEN '191' THEN SET `token` = 'Ulthork';
|
||||
WHEN '192' THEN SET `token` = 'Dragon';
|
||||
WHEN '193' THEN SET `token` = 'Abhorrent';
|
||||
WHEN '194' THEN SET `token` = 'Sea Turtle';
|
||||
WHEN '195' THEN SET `token` = 'Dragon';
|
||||
WHEN '196' THEN SET `token` = 'Dragon';
|
||||
WHEN '197' THEN SET `token` = 'Ronnie Test';
|
||||
WHEN '198' THEN SET `token` = 'Dragon';
|
||||
WHEN '199' THEN SET `token` = 'Shik\'Nar';
|
||||
WHEN '200' THEN SET `token` = 'Rockhopper';
|
||||
WHEN '201' THEN SET `token` = 'Underbulk';
|
||||
WHEN '202' THEN SET `token` = 'Grimling';
|
||||
WHEN '203' THEN SET `token` = 'Worm';
|
||||
WHEN '204' THEN SET `token` = 'Evan Test';
|
||||
WHEN '205' THEN SET `token` = 'Shadel';
|
||||
WHEN '206' THEN SET `token` = 'Owlbear';
|
||||
WHEN '207' THEN SET `token` = 'Rhino Beetle';
|
||||
WHEN '208' THEN SET `token` = 'Vampire';
|
||||
WHEN '209' THEN SET `token` = 'Earth Elemental';
|
||||
WHEN '210' THEN SET `token` = 'Air Elemental';
|
||||
WHEN '211' THEN SET `token` = 'Water Elemental';
|
||||
WHEN '212' THEN SET `token` = 'Fire Elemental';
|
||||
WHEN '213' THEN SET `token` = 'Wetfang Minnow';
|
||||
WHEN '214' THEN SET `token` = 'Thought Horror';
|
||||
WHEN '215' THEN SET `token` = 'Tegi';
|
||||
WHEN '216' THEN SET `token` = 'Horse';
|
||||
WHEN '217' THEN SET `token` = 'Shissar';
|
||||
WHEN '218' THEN SET `token` = 'Fungal Fiend';
|
||||
WHEN '219' THEN SET `token` = 'Vampire';
|
||||
WHEN '220' THEN SET `token` = 'Stonegrabber';
|
||||
WHEN '221' THEN SET `token` = 'Scarlet Cheetah';
|
||||
WHEN '222' THEN SET `token` = 'Zelniak';
|
||||
WHEN '223' THEN SET `token` = 'Lightcrawler';
|
||||
WHEN '224' THEN SET `token` = 'Shade';
|
||||
WHEN '225' THEN SET `token` = 'Sunflower';
|
||||
WHEN '226' THEN SET `token` = 'Sun Revenant';
|
||||
WHEN '227' THEN SET `token` = 'Shrieker';
|
||||
WHEN '228' THEN SET `token` = 'Galorian';
|
||||
WHEN '229' THEN SET `token` = 'Netherbian';
|
||||
WHEN '230' THEN SET `token` = 'Akheva';
|
||||
WHEN '231' THEN SET `token` = 'Grieg Veneficus';
|
||||
WHEN '232' THEN SET `token` = 'Sonic Wolf';
|
||||
WHEN '233' THEN SET `token` = 'Ground Shaker';
|
||||
WHEN '234' THEN SET `token` = 'Vah Shir Skeleton';
|
||||
WHEN '235' THEN SET `token` = 'Wretch';
|
||||
WHEN '236' THEN SET `token` = 'Seru';
|
||||
WHEN '237' THEN SET `token` = 'Recuso';
|
||||
WHEN '238' THEN SET `token` = 'Vah Shir';
|
||||
WHEN '239' THEN SET `token` = 'Guard';
|
||||
WHEN '240' THEN SET `token` = 'Teleport Man';
|
||||
WHEN '241' THEN SET `token` = 'Werewolf';
|
||||
WHEN '242' THEN SET `token` = 'Nymph';
|
||||
WHEN '243' THEN SET `token` = 'Dryad';
|
||||
WHEN '244' THEN SET `token` = 'Treant';
|
||||
WHEN '245' THEN SET `token` = 'Fly';
|
||||
WHEN '246' THEN SET `token` = 'Tarew Marr';
|
||||
WHEN '247' THEN SET `token` = 'Solusek Ro';
|
||||
WHEN '248' THEN SET `token` = 'Clockwork Golem';
|
||||
WHEN '249' THEN SET `token` = 'Clockwork Brain';
|
||||
WHEN '250' THEN SET `token` = 'Banshee';
|
||||
WHEN '251' THEN SET `token` = 'Guard of Justice';
|
||||
WHEN '252' THEN SET `token` = 'Mini POM';
|
||||
WHEN '253' THEN SET `token` = 'Diseased Fiend';
|
||||
WHEN '254' THEN SET `token` = 'Solusek Ro Guard';
|
||||
WHEN '255' THEN SET `token` = 'Bertoxxulous';
|
||||
WHEN '256' THEN SET `token` = 'The Tribunal';
|
||||
WHEN '257' THEN SET `token` = 'Terris Thule';
|
||||
WHEN '258' THEN SET `token` = 'Vegerog';
|
||||
WHEN '259' THEN SET `token` = 'Crocodile';
|
||||
WHEN '260' THEN SET `token` = 'Bat';
|
||||
WHEN '261' THEN SET `token` = 'Hraquis';
|
||||
WHEN '262' THEN SET `token` = 'Tranquilion';
|
||||
WHEN '263' THEN SET `token` = 'Tin Soldier';
|
||||
WHEN '264' THEN SET `token` = 'Nightmare Wraith';
|
||||
WHEN '265' THEN SET `token` = 'Malarian';
|
||||
WHEN '266' THEN SET `token` = 'Knight of Pestilence';
|
||||
WHEN '267' THEN SET `token` = 'Lepertoloth';
|
||||
WHEN '268' THEN SET `token` = 'Bubonian';
|
||||
WHEN '269' THEN SET `token` = 'Bubonian Underling';
|
||||
WHEN '270' THEN SET `token` = 'Pusling';
|
||||
WHEN '271' THEN SET `token` = 'Water Mephit';
|
||||
WHEN '272' THEN SET `token` = 'Stormrider';
|
||||
WHEN '273' THEN SET `token` = 'Junk Beast';
|
||||
WHEN '274' THEN SET `token` = 'Broken Clockwork';
|
||||
WHEN '275' THEN SET `token` = 'Giant Clockwork';
|
||||
WHEN '276' THEN SET `token` = 'Clockwork Beetle';
|
||||
WHEN '277' THEN SET `token` = 'Nightmare Goblin';
|
||||
WHEN '278' THEN SET `token` = 'Karana';
|
||||
WHEN '279' THEN SET `token` = 'Blood Raven';
|
||||
WHEN '280' THEN SET `token` = 'Nightmare Gargoyle';
|
||||
WHEN '281' THEN SET `token` = 'Mouth of Insanity';
|
||||
WHEN '282' THEN SET `token` = 'Skeletal Horse';
|
||||
WHEN '283' THEN SET `token` = 'Saryrn';
|
||||
WHEN '284' THEN SET `token` = 'Fennin Ro';
|
||||
WHEN '285' THEN SET `token` = 'Tormentor';
|
||||
WHEN '286' THEN SET `token` = 'Soul Devourer';
|
||||
WHEN '287' THEN SET `token` = 'Nightmare';
|
||||
WHEN '288' THEN SET `token` = 'Rallos Zek';
|
||||
WHEN '289' THEN SET `token` = 'Vallon Zek';
|
||||
WHEN '290' THEN SET `token` = 'Tallon Zek';
|
||||
WHEN '291' THEN SET `token` = 'Air Mephit';
|
||||
WHEN '292' THEN SET `token` = 'Earth Mephit';
|
||||
WHEN '293' THEN SET `token` = 'Fire Mephit';
|
||||
WHEN '294' THEN SET `token` = 'Nightmare Mephit';
|
||||
WHEN '295' THEN SET `token` = 'Zebuxoruk';
|
||||
WHEN '296' THEN SET `token` = 'Mithaniel Marr';
|
||||
WHEN '297' THEN SET `token` = 'Undead Knight';
|
||||
WHEN '298' THEN SET `token` = 'The Rathe';
|
||||
WHEN '299' THEN SET `token` = 'Xegony';
|
||||
WHEN '300' THEN SET `token` = 'Fiend';
|
||||
WHEN '301' THEN SET `token` = 'Test Object';
|
||||
WHEN '302' THEN SET `token` = 'Crab';
|
||||
WHEN '303' THEN SET `token` = 'Phoenix';
|
||||
WHEN '304' THEN SET `token` = 'Dragon';
|
||||
WHEN '305' THEN SET `token` = 'Bear';
|
||||
WHEN '306' THEN SET `token` = 'Giant';
|
||||
WHEN '307' THEN SET `token` = 'Giant';
|
||||
WHEN '308' THEN SET `token` = 'Giant';
|
||||
WHEN '309' THEN SET `token` = 'Giant';
|
||||
WHEN '310' THEN SET `token` = 'Giant';
|
||||
WHEN '311' THEN SET `token` = 'Giant';
|
||||
WHEN '312' THEN SET `token` = 'Giant';
|
||||
WHEN '313' THEN SET `token` = 'War Wraith';
|
||||
WHEN '314' THEN SET `token` = 'Wrulon';
|
||||
WHEN '315' THEN SET `token` = 'Kraken';
|
||||
WHEN '316' THEN SET `token` = 'Poison Frog';
|
||||
WHEN '317' THEN SET `token` = 'Nilborien';
|
||||
WHEN '318' THEN SET `token` = 'Valorian';
|
||||
WHEN '319' THEN SET `token` = 'War Boar';
|
||||
WHEN '320' THEN SET `token` = 'Efreeti';
|
||||
WHEN '321' THEN SET `token` = 'War Boar';
|
||||
WHEN '322' THEN SET `token` = 'Valorian';
|
||||
WHEN '323' THEN SET `token` = 'Animated Armor';
|
||||
WHEN '324' THEN SET `token` = 'Undead Footman';
|
||||
WHEN '325' THEN SET `token` = 'Rallos Zek Minion';
|
||||
WHEN '326' THEN SET `token` = 'Arachnid';
|
||||
WHEN '327' THEN SET `token` = 'Crystal Spider';
|
||||
WHEN '328' THEN SET `token` = 'Zebuxoruk\'s Cage';
|
||||
WHEN '329' THEN SET `token` = 'BoT Portal';
|
||||
WHEN '330' THEN SET `token` = 'Froglok';
|
||||
WHEN '331' THEN SET `token` = 'Troll';
|
||||
WHEN '332' THEN SET `token` = 'Troll';
|
||||
WHEN '333' THEN SET `token` = 'Troll';
|
||||
WHEN '334' THEN SET `token` = 'Ghost';
|
||||
WHEN '335' THEN SET `token` = 'Pirate';
|
||||
WHEN '336' THEN SET `token` = 'Pirate';
|
||||
WHEN '337' THEN SET `token` = 'Pirate';
|
||||
WHEN '338' THEN SET `token` = 'Pirate';
|
||||
WHEN '339' THEN SET `token` = 'Pirate';
|
||||
WHEN '340' THEN SET `token` = 'Pirate';
|
||||
WHEN '341' THEN SET `token` = 'Pirate';
|
||||
WHEN '342' THEN SET `token` = 'Pirate';
|
||||
WHEN '343' THEN SET `token` = 'Frog';
|
||||
WHEN '344' THEN SET `token` = 'Troll Zombie';
|
||||
WHEN '345' THEN SET `token` = 'Luggald';
|
||||
WHEN '346' THEN SET `token` = 'Luggald';
|
||||
WHEN '347' THEN SET `token` = 'Luggalds';
|
||||
WHEN '348' THEN SET `token` = 'Drogmore';
|
||||
WHEN '349' THEN SET `token` = 'Froglok Skeleton';
|
||||
WHEN '350' THEN SET `token` = 'Undead Froglok';
|
||||
WHEN '351' THEN SET `token` = 'Knight of Hate';
|
||||
WHEN '352' THEN SET `token` = 'Arcanist of Hate';
|
||||
WHEN '353' THEN SET `token` = 'Veksar';
|
||||
WHEN '354' THEN SET `token` = 'Veksar';
|
||||
WHEN '355' THEN SET `token` = 'Veksar';
|
||||
WHEN '356' THEN SET `token` = 'Chokidai';
|
||||
WHEN '357' THEN SET `token` = 'Undead Chokidai';
|
||||
WHEN '358' THEN SET `token` = 'Undead Veksar';
|
||||
WHEN '359' THEN SET `token` = 'Vampire';
|
||||
WHEN '360' THEN SET `token` = 'Vampire';
|
||||
WHEN '361' THEN SET `token` = 'Rujarkian Orc';
|
||||
WHEN '362' THEN SET `token` = 'Bone Golem';
|
||||
WHEN '363' THEN SET `token` = 'Synarcana';
|
||||
WHEN '364' THEN SET `token` = 'Sand Elf';
|
||||
WHEN '365' THEN SET `token` = 'Vampire';
|
||||
WHEN '366' THEN SET `token` = 'Rujarkian Orc';
|
||||
WHEN '367' THEN SET `token` = 'Skeleton';
|
||||
WHEN '368' THEN SET `token` = 'Mummy';
|
||||
WHEN '369' THEN SET `token` = 'Goblin';
|
||||
WHEN '370' THEN SET `token` = 'Insect';
|
||||
WHEN '371' THEN SET `token` = 'Froglok Ghost';
|
||||
WHEN '372' THEN SET `token` = 'Dervish';
|
||||
WHEN '373' THEN SET `token` = 'Shade';
|
||||
WHEN '374' THEN SET `token` = 'Golem';
|
||||
WHEN '375' THEN SET `token` = 'Evil Eye';
|
||||
WHEN '376' THEN SET `token` = 'Box';
|
||||
WHEN '377' THEN SET `token` = 'Barrel';
|
||||
WHEN '378' THEN SET `token` = 'Chest';
|
||||
WHEN '379' THEN SET `token` = 'Vase';
|
||||
WHEN '380' THEN SET `token` = 'Table';
|
||||
WHEN '381' THEN SET `token` = 'Weapon Rack';
|
||||
WHEN '382' THEN SET `token` = 'Coffin';
|
||||
WHEN '383' THEN SET `token` = 'Bones';
|
||||
WHEN '384' THEN SET `token` = 'Jokester';
|
||||
WHEN '385' THEN SET `token` = 'Nihil';
|
||||
WHEN '386' THEN SET `token` = 'Trusik';
|
||||
WHEN '387' THEN SET `token` = 'Stone Worker';
|
||||
WHEN '388' THEN SET `token` = 'Hynid';
|
||||
WHEN '389' THEN SET `token` = 'Turepta';
|
||||
WHEN '390' THEN SET `token` = 'Cragbeast';
|
||||
WHEN '391' THEN SET `token` = 'Stonemite';
|
||||
WHEN '392' THEN SET `token` = 'Ukun';
|
||||
WHEN '393' THEN SET `token` = 'Ixt';
|
||||
WHEN '394' THEN SET `token` = 'Ikaav';
|
||||
WHEN '395' THEN SET `token` = 'Aneuk';
|
||||
WHEN '396' THEN SET `token` = 'Kyv';
|
||||
WHEN '397' THEN SET `token` = 'Noc';
|
||||
WHEN '398' THEN SET `token` = 'Ra`tuk';
|
||||
WHEN '399' THEN SET `token` = 'Taneth';
|
||||
WHEN '400' THEN SET `token` = 'Huvul';
|
||||
WHEN '401' THEN SET `token` = 'Mutna';
|
||||
WHEN '402' THEN SET `token` = 'Mastruq';
|
||||
WHEN '403' THEN SET `token` = 'Taelosian';
|
||||
WHEN '404' THEN SET `token` = 'Discord Ship';
|
||||
WHEN '405' THEN SET `token` = 'Stone Worker';
|
||||
WHEN '406' THEN SET `token` = 'Mata Muram';
|
||||
WHEN '407' THEN SET `token` = 'Lightning Warrior';
|
||||
WHEN '408' THEN SET `token` = 'Succubus';
|
||||
WHEN '409' THEN SET `token` = 'Bazu';
|
||||
WHEN '410' THEN SET `token` = 'Feran';
|
||||
WHEN '411' THEN SET `token` = 'Pyrilen';
|
||||
WHEN '412' THEN SET `token` = 'Chimera';
|
||||
WHEN '413' THEN SET `token` = 'Dragorn';
|
||||
WHEN '414' THEN SET `token` = 'Murkglider';
|
||||
WHEN '415' THEN SET `token` = 'Rat';
|
||||
WHEN '416' THEN SET `token` = 'Bat';
|
||||
WHEN '417' THEN SET `token` = 'Gelidran';
|
||||
WHEN '418' THEN SET `token` = 'Discordling';
|
||||
WHEN '419' THEN SET `token` = 'Girplan';
|
||||
WHEN '420' THEN SET `token` = 'Minotaur';
|
||||
WHEN '421' THEN SET `token` = 'Dragorn Box';
|
||||
WHEN '422' THEN SET `token` = 'Runed Orb';
|
||||
WHEN '423' THEN SET `token` = 'Dragon Bones';
|
||||
WHEN '424' THEN SET `token` = 'Muramite Armor Pile';
|
||||
WHEN '425' THEN SET `token` = 'Crystal Shard';
|
||||
WHEN '426' THEN SET `token` = 'Portal';
|
||||
WHEN '427' THEN SET `token` = 'Coin Purse';
|
||||
WHEN '428' THEN SET `token` = 'Rock Pile';
|
||||
WHEN '429' THEN SET `token` = 'Murkglider Egg Sac';
|
||||
WHEN '430' THEN SET `token` = 'Drake';
|
||||
WHEN '431' THEN SET `token` = 'Dervish';
|
||||
WHEN '432' THEN SET `token` = 'Drake';
|
||||
WHEN '433' THEN SET `token` = 'Goblin';
|
||||
WHEN '434' THEN SET `token` = 'Kirin';
|
||||
WHEN '435' THEN SET `token` = 'Dragon';
|
||||
WHEN '436' THEN SET `token` = 'Basilisk';
|
||||
WHEN '437' THEN SET `token` = 'Dragon';
|
||||
WHEN '438' THEN SET `token` = 'Dragon';
|
||||
WHEN '439' THEN SET `token` = 'Puma';
|
||||
WHEN '440' THEN SET `token` = 'Spider';
|
||||
WHEN '441' THEN SET `token` = 'Spider Queen';
|
||||
WHEN '442' THEN SET `token` = 'Animated Statue';
|
||||
WHEN '443' THEN SET `token` = 'UNKNOWN RACE';
|
||||
WHEN '444' THEN SET `token` = 'UNKNOWN RACE';
|
||||
WHEN '445' THEN SET `token` = 'Dragon Egg';
|
||||
WHEN '446' THEN SET `token` = 'Dragon Statue';
|
||||
WHEN '447' THEN SET `token` = 'Lava Rock';
|
||||
WHEN '448' THEN SET `token` = 'Animated Statue';
|
||||
WHEN '449' THEN SET `token` = 'Spider Egg Sack';
|
||||
WHEN '450' THEN SET `token` = 'Lava Spider';
|
||||
WHEN '451' THEN SET `token` = 'Lava Spider Queen';
|
||||
WHEN '452' THEN SET `token` = 'Dragon';
|
||||
WHEN '453' THEN SET `token` = 'Giant';
|
||||
WHEN '454' THEN SET `token` = 'Werewolf';
|
||||
WHEN '455' THEN SET `token` = 'Kobold';
|
||||
WHEN '456' THEN SET `token` = 'Sporali';
|
||||
WHEN '457' THEN SET `token` = 'Gnomework';
|
||||
WHEN '458' THEN SET `token` = 'Orc';
|
||||
WHEN '459' THEN SET `token` = 'Corathus';
|
||||
WHEN '460' THEN SET `token` = 'Coral';
|
||||
WHEN '461' THEN SET `token` = 'Drachnid';
|
||||
WHEN '462' THEN SET `token` = 'Drachnid Cocoon';
|
||||
WHEN '463' THEN SET `token` = 'Fungus Patch';
|
||||
WHEN '464' THEN SET `token` = 'Gargoyle';
|
||||
WHEN '465' THEN SET `token` = 'Witheran';
|
||||
WHEN '466' THEN SET `token` = 'Dark Lord';
|
||||
WHEN '467' THEN SET `token` = 'Shiliskin';
|
||||
WHEN '468' THEN SET `token` = 'Snake';
|
||||
WHEN '469' THEN SET `token` = 'Evil Eye';
|
||||
WHEN '470' THEN SET `token` = 'Minotaur';
|
||||
WHEN '471' THEN SET `token` = 'Zombie';
|
||||
WHEN '472' THEN SET `token` = 'Clockwork Boar';
|
||||
WHEN '473' THEN SET `token` = 'Fairy';
|
||||
WHEN '474' THEN SET `token` = 'Witheran';
|
||||
WHEN '475' THEN SET `token` = 'Air Elemental';
|
||||
WHEN '476' THEN SET `token` = 'Earth Elemental';
|
||||
WHEN '477' THEN SET `token` = 'Fire Elemental';
|
||||
WHEN '478' THEN SET `token` = 'Water Elemental';
|
||||
WHEN '479' THEN SET `token` = 'Alligator';
|
||||
WHEN '480' THEN SET `token` = 'Bear';
|
||||
WHEN '481' THEN SET `token` = 'Scaled Wolf';
|
||||
WHEN '482' THEN SET `token` = 'Wolf';
|
||||
WHEN '483' THEN SET `token` = 'Spirit Wolf';
|
||||
WHEN '484' THEN SET `token` = 'Skeleton';
|
||||
WHEN '485' THEN SET `token` = 'Spectre';
|
||||
WHEN '486' THEN SET `token` = 'Bolvirk';
|
||||
WHEN '487' THEN SET `token` = 'Banshee';
|
||||
WHEN '488' THEN SET `token` = 'Banshee';
|
||||
WHEN '489' THEN SET `token` = 'Elddar';
|
||||
WHEN '490' THEN SET `token` = 'Forest Giant';
|
||||
WHEN '491' THEN SET `token` = 'Bone Golem';
|
||||
WHEN '492' THEN SET `token` = 'Horse';
|
||||
WHEN '493' THEN SET `token` = 'Pegasus';
|
||||
WHEN '494' THEN SET `token` = 'Shambling Mound';
|
||||
WHEN '495' THEN SET `token` = 'Scrykin';
|
||||
WHEN '496' THEN SET `token` = 'Treant';
|
||||
WHEN '497' THEN SET `token` = 'Vampire';
|
||||
WHEN '498' THEN SET `token` = 'Ayonae Ro';
|
||||
WHEN '499' THEN SET `token` = 'Sullon Zek';
|
||||
WHEN '500' THEN SET `token` = 'Banner';
|
||||
WHEN '501' THEN SET `token` = 'Flag';
|
||||
WHEN '502' THEN SET `token` = 'Rowboat';
|
||||
WHEN '503' THEN SET `token` = 'Bear Trap';
|
||||
WHEN '504' THEN SET `token` = 'Clockwork Bomb';
|
||||
WHEN '505' THEN SET `token` = 'Dynamite Keg';
|
||||
WHEN '506' THEN SET `token` = 'Pressure Plate';
|
||||
WHEN '507' THEN SET `token` = 'Puffer Spore';
|
||||
WHEN '508' THEN SET `token` = 'Stone Ring';
|
||||
WHEN '509' THEN SET `token` = 'Root Tentacle';
|
||||
WHEN '510' THEN SET `token` = 'Runic Symbol';
|
||||
WHEN '511' THEN SET `token` = 'Saltpetter Bomb';
|
||||
WHEN '512' THEN SET `token` = 'Floating Skull';
|
||||
WHEN '513' THEN SET `token` = 'Spike Trap';
|
||||
WHEN '514' THEN SET `token` = 'Totem';
|
||||
WHEN '515' THEN SET `token` = 'Web';
|
||||
WHEN '516' THEN SET `token` = 'Wicker Basket';
|
||||
WHEN '517' THEN SET `token` = 'Nightmare/Unicorn';
|
||||
WHEN '518' THEN SET `token` = 'Horse';
|
||||
WHEN '519' THEN SET `token` = 'Nightmare/Unicorn';
|
||||
WHEN '520' THEN SET `token` = 'Bixie';
|
||||
WHEN '521' THEN SET `token` = 'Centaur';
|
||||
WHEN '522' THEN SET `token` = 'Drakkin';
|
||||
WHEN '523' THEN SET `token` = 'Giant';
|
||||
WHEN '524' THEN SET `token` = 'Gnoll';
|
||||
WHEN '525' THEN SET `token` = 'Griffin';
|
||||
WHEN '526' THEN SET `token` = 'Giant Shade';
|
||||
WHEN '527' THEN SET `token` = 'Harpy';
|
||||
WHEN '528' THEN SET `token` = 'Mammoth';
|
||||
WHEN '529' THEN SET `token` = 'Satyr';
|
||||
WHEN '530' THEN SET `token` = 'Dragon';
|
||||
WHEN '531' THEN SET `token` = 'Dragon';
|
||||
WHEN '532' THEN SET `token` = 'Dyn\'Leth';
|
||||
WHEN '533' THEN SET `token` = 'Boat';
|
||||
WHEN '534' THEN SET `token` = 'Weapon Rack';
|
||||
WHEN '535' THEN SET `token` = 'Armor Rack';
|
||||
WHEN '536' THEN SET `token` = 'Honey Pot';
|
||||
WHEN '537' THEN SET `token` = 'Jum Jum Bucket';
|
||||
WHEN '538' THEN SET `token` = 'Toolbox';
|
||||
WHEN '539' THEN SET `token` = 'Stone Jug';
|
||||
WHEN '540' THEN SET `token` = 'Small Plant';
|
||||
WHEN '541' THEN SET `token` = 'Medium Plant';
|
||||
WHEN '542' THEN SET `token` = 'Tall Plant';
|
||||
WHEN '543' THEN SET `token` = 'Wine Cask';
|
||||
WHEN '544' THEN SET `token` = 'Elven Boat';
|
||||
WHEN '545' THEN SET `token` = 'Gnomish Boat';
|
||||
WHEN '546' THEN SET `token` = 'Barrel Barge Ship';
|
||||
WHEN '547' THEN SET `token` = 'Goo';
|
||||
WHEN '548' THEN SET `token` = 'Goo';
|
||||
WHEN '549' THEN SET `token` = 'Goo';
|
||||
WHEN '550' THEN SET `token` = 'Merchant Ship';
|
||||
WHEN '551' THEN SET `token` = 'Pirate Ship';
|
||||
WHEN '552' THEN SET `token` = 'Ghost Ship';
|
||||
WHEN '553' THEN SET `token` = 'Banner';
|
||||
WHEN '554' THEN SET `token` = 'Banner';
|
||||
WHEN '555' THEN SET `token` = 'Banner';
|
||||
WHEN '556' THEN SET `token` = 'Banner';
|
||||
WHEN '557' THEN SET `token` = 'Banner';
|
||||
WHEN '558' THEN SET `token` = 'Aviak';
|
||||
WHEN '559' THEN SET `token` = 'Beetle';
|
||||
WHEN '560' THEN SET `token` = 'Gorilla';
|
||||
WHEN '561' THEN SET `token` = 'Kedge';
|
||||
WHEN '562' THEN SET `token` = 'Kerran';
|
||||
WHEN '563' THEN SET `token` = 'Shissar';
|
||||
WHEN '564' THEN SET `token` = 'Siren';
|
||||
WHEN '565' THEN SET `token` = 'Sphinx';
|
||||
WHEN '566' THEN SET `token` = 'Human';
|
||||
WHEN '567' THEN SET `token` = 'Campfire';
|
||||
WHEN '568' THEN SET `token` = 'Brownie';
|
||||
WHEN '569' THEN SET `token` = 'Dragon';
|
||||
WHEN '570' THEN SET `token` = 'Exoskeleton';
|
||||
WHEN '571' THEN SET `token` = 'Ghoul';
|
||||
WHEN '572' THEN SET `token` = 'Clockwork Guardian';
|
||||
WHEN '573' THEN SET `token` = 'Mantrap';
|
||||
WHEN '574' THEN SET `token` = 'Minotaur';
|
||||
WHEN '575' THEN SET `token` = 'Scarecrow';
|
||||
WHEN '576' THEN SET `token` = 'Shade';
|
||||
WHEN '577' THEN SET `token` = 'Rotocopter';
|
||||
WHEN '578' THEN SET `token` = 'Tentacle Terror';
|
||||
WHEN '579' THEN SET `token` = 'Wereorc';
|
||||
WHEN '580' THEN SET `token` = 'Worg';
|
||||
WHEN '581' THEN SET `token` = 'Wyvern';
|
||||
WHEN '582' THEN SET `token` = 'Chimera';
|
||||
WHEN '583' THEN SET `token` = 'Kirin';
|
||||
WHEN '584' THEN SET `token` = 'Puma';
|
||||
WHEN '585' THEN SET `token` = 'Boulder';
|
||||
WHEN '586' THEN SET `token` = 'Banner';
|
||||
WHEN '587' THEN SET `token` = 'Elven Ghost';
|
||||
WHEN '588' THEN SET `token` = 'Human Ghost';
|
||||
WHEN '589' THEN SET `token` = 'Chest';
|
||||
WHEN '590' THEN SET `token` = 'Chest';
|
||||
WHEN '591' THEN SET `token` = 'Crystal';
|
||||
WHEN '592' THEN SET `token` = 'Coffin';
|
||||
WHEN '593' THEN SET `token` = 'Guardian CPU';
|
||||
WHEN '594' THEN SET `token` = 'Worg';
|
||||
WHEN '595' THEN SET `token` = 'Mansion';
|
||||
WHEN '596' THEN SET `token` = 'Floating Island';
|
||||
WHEN '597' THEN SET `token` = 'Cragslither';
|
||||
WHEN '598' THEN SET `token` = 'Wrulon';
|
||||
WHEN '599' THEN SET `token` = 'Spell Particle 1';
|
||||
WHEN '600' THEN SET `token` = 'Invisible Man of Zomm';
|
||||
WHEN '601' THEN SET `token` = 'Robocopter of Zomm';
|
||||
WHEN '602' THEN SET `token` = 'Burynai';
|
||||
WHEN '603' THEN SET `token` = 'Frog';
|
||||
WHEN '604' THEN SET `token` = 'Dracolich';
|
||||
WHEN '605' THEN SET `token` = 'Iksar Ghost';
|
||||
WHEN '606' THEN SET `token` = 'Iksar Skeleton';
|
||||
WHEN '607' THEN SET `token` = 'Mephit';
|
||||
WHEN '608' THEN SET `token` = 'Muddite';
|
||||
WHEN '609' THEN SET `token` = 'Raptor';
|
||||
WHEN '610' THEN SET `token` = 'Sarnak';
|
||||
WHEN '611' THEN SET `token` = 'Scorpion';
|
||||
WHEN '612' THEN SET `token` = 'T THEN SET sian';
|
||||
WHEN '613' THEN SET `token` = 'Wurm';
|
||||
WHEN '614' THEN SET `token` = 'Nekhon';
|
||||
WHEN '615' THEN SET `token` = 'Hydra Crystal';
|
||||
WHEN '616' THEN SET `token` = 'Crystal Sphere';
|
||||
WHEN '617' THEN SET `token` = 'Gnoll';
|
||||
WHEN '618' THEN SET `token` = 'Sokokar';
|
||||
WHEN '619' THEN SET `token` = 'Stone Pylon';
|
||||
WHEN '620' THEN SET `token` = 'Demon Vulture';
|
||||
WHEN '621' THEN SET `token` = 'Wagon';
|
||||
WHEN '622' THEN SET `token` = 'God of Discord';
|
||||
WHEN '623' THEN SET `token` = 'Feran Mount';
|
||||
WHEN '624' THEN SET `token` = 'Ogre NPC - Male';
|
||||
WHEN '625' THEN SET `token` = 'Sokokar Mount';
|
||||
WHEN '626' THEN SET `token` = 'Giant (Rallosian mats)';
|
||||
WHEN '627' THEN SET `token` = 'Sokokar (w saddle)';
|
||||
WHEN '628' THEN SET `token` = '10th Anniversary Banner';
|
||||
WHEN '629' THEN SET `token` = '10th Anniversary Cake';
|
||||
WHEN '630' THEN SET `token` = 'Wine Cask';
|
||||
WHEN '631' THEN SET `token` = 'Hydra Mount';
|
||||
WHEN '632' THEN SET `token` = 'Hydra NPC';
|
||||
WHEN '633' THEN SET `token` = 'Wedding Flowers';
|
||||
WHEN '634' THEN SET `token` = 'Wedding Arbor';
|
||||
WHEN '635' THEN SET `token` = 'Wedding Altar';
|
||||
WHEN '636' THEN SET `token` = 'Powder Keg';
|
||||
WHEN '637' THEN SET `token` = 'Apexus';
|
||||
WHEN '638' THEN SET `token` = 'Bellikos';
|
||||
WHEN '639' THEN SET `token` = 'Brell\'s First Creation';
|
||||
WHEN '640' THEN SET `token` = 'Brell';
|
||||
WHEN '641' THEN SET `token` = 'Crystalskin Ambuloid';
|
||||
WHEN '642' THEN SET `token` = 'Cliknar Queen';
|
||||
WHEN '643' THEN SET `token` = 'Cliknar Soldier';
|
||||
WHEN '644' THEN SET `token` = 'Cliknar Worker';
|
||||
WHEN '645' THEN SET `token` = 'Coldain';
|
||||
WHEN '646' THEN SET `token` = 'Coldain';
|
||||
WHEN '647' THEN SET `token` = 'Crystalskin Sessiloid';
|
||||
WHEN '648' THEN SET `token` = 'Genari';
|
||||
WHEN '649' THEN SET `token` = 'Gigyn';
|
||||
WHEN '650' THEN SET `token` = 'Greken - Young Adult';
|
||||
WHEN '651' THEN SET `token` = 'Greken - Young';
|
||||
WHEN '652' THEN SET `token` = 'Cliknar Mount';
|
||||
WHEN '653' THEN SET `token` = 'Telmira';
|
||||
WHEN '654' THEN SET `token` = 'Spider Mount';
|
||||
WHEN '655' THEN SET `token` = 'Bear Mount';
|
||||
WHEN '656' THEN SET `token` = 'Rat Mount';
|
||||
WHEN '657' THEN SET `token` = 'Sessiloid Mount';
|
||||
WHEN '658' THEN SET `token` = 'Morell Thule';
|
||||
WHEN '659' THEN SET `token` = 'Marionette';
|
||||
WHEN '660' THEN SET `token` = 'Book Dervish';
|
||||
WHEN '661' THEN SET `token` = 'Topiary Lion';
|
||||
WHEN '662' THEN SET `token` = 'Rotdog';
|
||||
WHEN '663' THEN SET `token` = 'Amygdalan';
|
||||
WHEN '664' THEN SET `token` = 'Sandman';
|
||||
WHEN '665' THEN SET `token` = 'Grandfather Clock';
|
||||
WHEN '666' THEN SET `token` = 'Gingerbread Man';
|
||||
WHEN '667' THEN SET `token` = 'Royal Guard';
|
||||
WHEN '668' THEN SET `token` = 'Rabbit';
|
||||
WHEN '669' THEN SET `token` = 'Blind Dreamer';
|
||||
WHEN '670' THEN SET `token` = 'Cazic Thule';
|
||||
WHEN '671' THEN SET `token` = 'Topiary Lion Mount';
|
||||
WHEN '672' THEN SET `token` = 'Rot Dog Mount';
|
||||
WHEN '673' THEN SET `token` = 'Goral Mount';
|
||||
WHEN '674' THEN SET `token` = 'Selyrah Mount';
|
||||
WHEN '675' THEN SET `token` = 'Sclera Mount';
|
||||
WHEN '676' THEN SET `token` = 'Braxi Mount';
|
||||
WHEN '677' THEN SET `token` = 'Kangon Mount';
|
||||
WHEN '678' THEN SET `token` = 'Erudite';
|
||||
WHEN '679' THEN SET `token` = 'Wurm Mount';
|
||||
WHEN '680' THEN SET `token` = 'Raptor Mount';
|
||||
WHEN '681' THEN SET `token` = 'Invisible Man';
|
||||
WHEN '682' THEN SET `token` = 'Whirligig';
|
||||
WHEN '683' THEN SET `token` = 'Gnomish Balloon';
|
||||
WHEN '684' THEN SET `token` = 'Gnomish Rocket Pack';
|
||||
WHEN '685' THEN SET `token` = 'Gnomish Hovering Transport';
|
||||
WHEN '686' THEN SET `token` = 'Selyrah';
|
||||
WHEN '687' THEN SET `token` = 'Goral';
|
||||
WHEN '688' THEN SET `token` = 'Braxi';
|
||||
WHEN '689' THEN SET `token` = 'Kangon';
|
||||
WHEN '690' THEN SET `token` = 'Invisible Man';
|
||||
WHEN '691' THEN SET `token` = 'Floating Tower';
|
||||
WHEN '692' THEN SET `token` = 'Explosive Cart';
|
||||
WHEN '693' THEN SET `token` = 'Blimp Ship';
|
||||
WHEN '694' THEN SET `token` = 'Tumbleweed';
|
||||
WHEN '695' THEN SET `token` = 'Alaran';
|
||||
WHEN '696' THEN SET `token` = 'Swinetor';
|
||||
WHEN '697' THEN SET `token` = 'Triumvirate';
|
||||
WHEN '698' THEN SET `token` = 'Hadal';
|
||||
WHEN '699' THEN SET `token` = 'Hovering Platform';
|
||||
WHEN '700' THEN SET `token` = 'Parasitic Scavenger';
|
||||
WHEN '701' THEN SET `token` = 'Grendlaen';
|
||||
WHEN '702' THEN SET `token` = 'Ship in a Bottle';
|
||||
WHEN '703' THEN SET `token` = 'Alaran Sentry Stone';
|
||||
WHEN '704' THEN SET `token` = 'Dervish';
|
||||
WHEN '705' THEN SET `token` = 'Regeneration Pool';
|
||||
WHEN '706' THEN SET `token` = 'Teleportation Stand';
|
||||
WHEN '707' THEN SET `token` = 'Relic Case';
|
||||
WHEN '708' THEN SET `token` = 'Alaran Ghost';
|
||||
WHEN '709' THEN SET `token` = 'Skystrider';
|
||||
WHEN '710' THEN SET `token` = 'Water Spout';
|
||||
WHEN '711' THEN SET `token` = 'Aviak Pull Along';
|
||||
WHEN '712' THEN SET `token` = 'Gelatinous Cube';
|
||||
WHEN '713' THEN SET `token` = 'Cat';
|
||||
WHEN '714' THEN SET `token` = 'Elk Head';
|
||||
WHEN '715' THEN SET `token` = 'Holgresh';
|
||||
WHEN '716' THEN SET `token` = 'Beetle';
|
||||
WHEN '717' THEN SET `token` = 'Vine Maw';
|
||||
WHEN '718' THEN SET `token` = 'Ratman';
|
||||
WHEN '719' THEN SET `token` = 'Fallen Knight';
|
||||
WHEN '720' THEN SET `token` = 'Flying Carpet';
|
||||
WHEN '721' THEN SET `token` = 'Carrier Hand';
|
||||
WHEN '722' THEN SET `token` = 'Akheva';
|
||||
WHEN '723' THEN SET `token` = 'Servant of Shadow';
|
||||
WHEN '724' THEN SET `token` = 'Luclin';
|
||||
WHEN '725' THEN SET `token` = 'Xaric the Unspoken';
|
||||
WHEN '726' THEN SET `token` = 'Dervish (Ver. 5)';
|
||||
WHEN '727' THEN SET `token` = 'Dervish (Ver. 6)';
|
||||
WHEN '728' THEN SET `token` = 'God - Luclin (Ver. 2)';
|
||||
WHEN '729' THEN SET `token` = 'God - Luclin (Ver. 3)';
|
||||
WHEN '730' THEN SET `token` = 'Orb';
|
||||
WHEN '731' THEN SET `token` = 'God - Luclin (Ver. 4)';
|
||||
WHEN '732' THEN SET `token` = 'Pegasus';
|
||||
WHEN '2250' THEN SET `token` = 'Interactive Object';
|
||||
ELSE SET `token` = 'unk';
|
||||
END CASE;
|
||||
|
||||
SET `token` = CONCAT(`token`, '(', `race_id`, ')');
|
||||
|
||||
RETURN `token`;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -0,0 +1,71 @@
|
||||
DELIMITER $$
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetSpellAffectIndexToken`;
|
||||
|
||||
-- This function converts a numeric spell affect index id to a string label based on server code designations
|
||||
--
|
||||
-- example:
|
||||
-- SELECT `id`, `name`, GetSpellAffectIndexToken(`SpellAffectIndex`) FROM `spells_new` WHERE `id` IN ('73', '2253', '2319');
|
||||
CREATE FUNCTION `GetSpellAffectIndexToken` (`affect_index_id` INT(11)) RETURNS VARCHAR(64)
|
||||
BEGIN
|
||||
DECLARE `token` VARCHAR(64) DEFAULT '';
|
||||
|
||||
CASE `affect_index_id`
|
||||
WHEN '-1' THEN SET `token` = 'SAI_Summon_Mount_Unclass';
|
||||
WHEN '0' THEN SET `token` = 'SAI_Direct_Damage';
|
||||
WHEN '1' THEN SET `token` = 'SAI_Heal_Cure';
|
||||
WHEN '2' THEN SET `token` = 'SAI_AC_Buff';
|
||||
WHEN '3' THEN SET `token` = 'SAI_AE_Damage';
|
||||
WHEN '4' THEN SET `token` = 'SAI_Summon';
|
||||
WHEN '5' THEN SET `token` = 'SAI_Sight';
|
||||
WHEN '6' THEN SET `token` = 'SAI_Mana_Regen_Resist_Song';
|
||||
WHEN '7' THEN SET `token` = 'SAI_Stat_Buff';
|
||||
WHEN '9' THEN SET `token` = 'SAI_Vanish';
|
||||
WHEN '10' THEN SET `token` = 'SAI_Appearance';
|
||||
WHEN '11' THEN SET `token` = 'SAI_Enchanter_Pet';
|
||||
WHEN '12' THEN SET `token` = 'SAI_Calm';
|
||||
WHEN '13' THEN SET `token` = 'SAI_Fear';
|
||||
WHEN '14' THEN SET `token` = 'SAI_Dispell_Sight';
|
||||
WHEN '15' THEN SET `token` = 'SAI_Stun';
|
||||
WHEN '16' THEN SET `token` = 'SAI_Haste_Runspeed';
|
||||
WHEN '17' THEN SET `token` = 'SAI_Combat_Slow';
|
||||
WHEN '18' THEN SET `token` = 'SAI_Damage_Shield';
|
||||
WHEN '19' THEN SET `token` = 'SAI_Cannibalize_Weapon_Proc';
|
||||
WHEN '20' THEN SET `token` = 'SAI_Weaken';
|
||||
WHEN '21' THEN SET `token` = 'SAI_Banish';
|
||||
WHEN '22' THEN SET `token` = 'SAI_Blind_Poison';
|
||||
WHEN '23' THEN SET `token` = 'SAI_Cold_DD';
|
||||
WHEN '24' THEN SET `token` = 'SAI_Poison_Disease_DD';
|
||||
WHEN '25' THEN SET `token` = 'SAI_Fire_DD';
|
||||
WHEN '27' THEN SET `token` = 'SAI_Memory_Blur';
|
||||
WHEN '28' THEN SET `token` = 'SAI_Gravity_Fling';
|
||||
WHEN '29' THEN SET `token` = 'SAI_Suffocate';
|
||||
WHEN '30' THEN SET `token` = 'SAI_Lifetap_Over_Time';
|
||||
WHEN '31' THEN SET `token` = 'SAI_Fire_AE';
|
||||
WHEN '33' THEN SET `token` = 'SAI_Cold_AE';
|
||||
WHEN '34' THEN SET `token` = 'SAI_Poison_Disease_AE';
|
||||
WHEN '40' THEN SET `token` = 'SAI_Teleport';
|
||||
WHEN '41' THEN SET `token` = 'SAI_Direct_Damage_Song';
|
||||
WHEN '42' THEN SET `token` = 'SAI_Combat_Buff_Song';
|
||||
WHEN '43' THEN SET `token` = 'SAI_Calm_Song';
|
||||
WHEN '45' THEN SET `token` = 'SAI_Firework';
|
||||
WHEN '46' THEN SET `token` = 'SAI_Firework_AE';
|
||||
WHEN '47' THEN SET `token` = 'SAI_Weather_Rocket';
|
||||
WHEN '50' THEN SET `token` = 'SAI_Convert_Vitals';
|
||||
WHEN '60' THEN SET `token` = 'SAI_NPC_Special_60';
|
||||
WHEN '61' THEN SET `token` = 'SAI_NPC_Special_61';
|
||||
WHEN '62' THEN SET `token` = 'SAI_NPC_Special_62';
|
||||
WHEN '63' THEN SET `token` = 'SAI_NPC_Special_63';
|
||||
WHEN '70' THEN SET `token` = 'SAI_NPC_Special_70';
|
||||
WHEN '71' THEN SET `token` = 'SAI_NPC_Special_71';
|
||||
WHEN '80' THEN SET `token` = 'SAI_NPC_Special_80';
|
||||
WHEN '88' THEN SET `token` = 'SAI_Lock_Trap';
|
||||
ELSE SET `token` = 'unk';
|
||||
END CASE;
|
||||
|
||||
SET `token` = CONCAT(`token`, '(', `affect_index_id`, ')');
|
||||
|
||||
RETURN `token`;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -0,0 +1,206 @@
|
||||
DELIMITER $$
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetSpellCategoryToken`;
|
||||
|
||||
-- This function converts numeric spell category ids to a string label based on server code designations
|
||||
--
|
||||
-- example:
|
||||
-- SELECT `id`, `name`, GetSpellCategoryToken(`spell_category`) FROM `spells_new` WHERE `id` IN ('39', '129', '3468');
|
||||
CREATE FUNCTION `GetSpellCategoryToken` (`spell_category` INT(11)) RETURNS VARCHAR(256)
|
||||
BEGIN
|
||||
DECLARE `token` VARCHAR(256) DEFAULT '';
|
||||
|
||||
CASE `spell_category`
|
||||
WHEN '-99' THEN SET `token` = 'neg99#';
|
||||
WHEN '-1' THEN SET `token` = 'neg1#';
|
||||
WHEN '0' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
WHEN '1' THEN SET `token` = 'DD';
|
||||
WHEN '2' THEN SET `token` = 'DD_Undead';
|
||||
WHEN '3' THEN SET `token` = 'DD_Summoned';
|
||||
WHEN '4' THEN SET `token` = 'Lifetap_to_Self';
|
||||
WHEN '5' THEN SET `token` = 'DoT_Plant';
|
||||
WHEN '6' THEN SET `token` = 'DD_Body_Type';
|
||||
WHEN '7' THEN SET `token` = 'DoT';
|
||||
WHEN '8' THEN SET `token` = 'Divine_DoT';
|
||||
WHEN '9' THEN SET `token` = 'Lifetap_to_Self_2';
|
||||
WHEN '10' THEN SET `token` = 'AoE_DD';
|
||||
WHEN '11' THEN SET `token` = 'AoE_DD_Earth';
|
||||
WHEN '12' THEN SET `token` = 'AoE_DD_Nature';
|
||||
WHEN '13' THEN SET `token` = 'Bolt_Fire_Cold';
|
||||
WHEN '14' THEN SET `token` = 'Stun_Damage';
|
||||
WHEN '15' THEN SET `token` = 'Target_Stun';
|
||||
WHEN '16' THEN SET `token` = 'Group_Stun';
|
||||
WHEN '17' THEN SET `token` = 'Leech_to_Group';
|
||||
WHEN '18' THEN SET `token` = 'Siphon_Strength';
|
||||
WHEN '19' THEN SET `token` = 'Weapon_Proc';
|
||||
WHEN '20' THEN SET `token` = 'Target_Heal';
|
||||
WHEN '21' THEN SET `token` = 'Target_HoT';
|
||||
WHEN '22' THEN SET `token` = 'Group_Heal_Cure';
|
||||
WHEN '23' THEN SET `token` = 'Group_HoT';
|
||||
WHEN '24' THEN SET `token` = 'Target_Health_Regen';
|
||||
WHEN '25' THEN SET `token` = 'Group_Health_Regen';
|
||||
WHEN '26' THEN SET `token` = 'Pet_Heal';
|
||||
WHEN '27' THEN SET `token` = 'Resurrection';
|
||||
WHEN '28' THEN SET `token` = 'Dark_Empathy';
|
||||
WHEN '29' THEN SET `token` = 'Cure_Poison';
|
||||
WHEN '30' THEN SET `token` = 'Resolution';
|
||||
WHEN '32' THEN SET `token` = 'Blur';
|
||||
WHEN '34' THEN SET `token` = 'Hate_Buff';
|
||||
WHEN '35' THEN SET `token` = 'Attack_Speed_Buff';
|
||||
WHEN '36' THEN SET `token` = 'Pet_Combat_Buff';
|
||||
WHEN '37' THEN SET `token` = 'Attack_Speed_Buff_Song';
|
||||
WHEN '38' THEN SET `token` = 'Attack_Speed_Debuff';
|
||||
WHEN '39' THEN SET `token` = 'Attack_Speed_Debuff_2';
|
||||
WHEN '40' THEN SET `token` = 'Cannibalize';
|
||||
WHEN '41' THEN SET `token` = 'Target_Movement_Speed';
|
||||
WHEN '42' THEN SET `token` = 'Group_Movement_Speed';
|
||||
WHEN '43' THEN SET `token` = 'Wolf_Form';
|
||||
WHEN '44' THEN SET `token` = 'Elemental_Pet_Movement_Speed';
|
||||
WHEN '45' THEN SET `token` = 'Illusion';
|
||||
WHEN '46' THEN SET `token` = 'Dark_Pact';
|
||||
WHEN '47' THEN SET `token` = 'Form_of_the_Bear';
|
||||
WHEN '48' THEN SET `token` = 'Treeform';
|
||||
WHEN '49' THEN SET `token` = 'Dead_Man_Floating';
|
||||
WHEN '50' THEN SET `token` = 'Root';
|
||||
WHEN '51' THEN SET `token` = 'Summon_Pet';
|
||||
WHEN '52' THEN SET `token` = 'Summon_Corpse';
|
||||
WHEN '53' THEN SET `token` = 'Sense';
|
||||
WHEN '54' THEN SET `token` = 'Divine_Aura';
|
||||
WHEN '55' THEN SET `token` = 'Evacuate';
|
||||
WHEN '56' THEN SET `token` = 'Gate';
|
||||
WHEN '58' THEN SET `token` = 'Teleport_Bind';
|
||||
WHEN '59' THEN SET `token` = 'Shadow_Step';
|
||||
WHEN '60' THEN SET `token` = 'Enchant_Material';
|
||||
WHEN '61' THEN SET `token` = 'Summon_Common_Item';
|
||||
WHEN '62' THEN SET `token` = 'Fear';
|
||||
WHEN '63' THEN SET `token` = 'Fear_Animal';
|
||||
WHEN '64' THEN SET `token` = 'Fear_Undead';
|
||||
WHEN '65' THEN SET `token` = 'Damage_Shield';
|
||||
WHEN '66' THEN SET `token` = 'Resist_Buff_Song';
|
||||
WHEN '67' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
WHEN '68' THEN SET `token` = 'Damage_Shield_2';
|
||||
WHEN '69' THEN SET `token` = 'Resist_Redux';
|
||||
WHEN '70' THEN SET `token` = 'Resist_Buff';
|
||||
WHEN '71' THEN SET `token` = 'Warder';
|
||||
WHEN '72' THEN SET `token` = 'Familiar';
|
||||
WHEN '73' THEN SET `token` = 'Strength_Buff';
|
||||
WHEN '74' THEN SET `token` = 'Dexterity_Buff';
|
||||
WHEN '75' THEN SET `token` = 'Agility_Buff';
|
||||
WHEN '76' THEN SET `token` = 'Stamina_Buff';
|
||||
WHEN '77' THEN SET `token` = 'Intelligence_Wisdom_Buff';
|
||||
WHEN '78' THEN SET `token` = 'Charisma_Buff';
|
||||
WHEN '79' THEN SET `token` = 'Weaken';
|
||||
WHEN '80' THEN SET `token` = 'Invisibility_v_Undead';
|
||||
WHEN '81' THEN SET `token` = 'Invisibility_v_Animals';
|
||||
WHEN '82' THEN SET `token` = 'Invisibility';
|
||||
WHEN '83' THEN SET `token` = 'Damage_Absorbtion';
|
||||
WHEN '84' THEN SET `token` = 'Fizzle_Redux';
|
||||
WHEN '85' THEN SET `token` = 'Clarity';
|
||||
WHEN '86' THEN SET `token` = 'Gift_of_Magic';
|
||||
WHEN '87' THEN SET `token` = 'Mana_Drain';
|
||||
WHEN '88' THEN SET `token` = 'Mana_Subversion';
|
||||
WHEN '89' THEN SET `token` = 'Harvest_Mana';
|
||||
WHEN '90' THEN SET `token` = 'Hate_Redux';
|
||||
WHEN '91' THEN SET `token` = 'Increase_Aim';
|
||||
WHEN '92' THEN SET `token` = 'Combat_Buff';
|
||||
WHEN '93' THEN SET `token` = 'Bind_Sight';
|
||||
WHEN '94' THEN SET `token` = 'Enduring_Breath';
|
||||
WHEN '95' THEN SET `token` = 'Alliance';
|
||||
WHEN '96' THEN SET `token` = 'Charm';
|
||||
WHEN '97' THEN SET `token` = 'Strip_Enchantment';
|
||||
WHEN '98' THEN SET `token` = 'Lull';
|
||||
WHEN '99' THEN SET `token` = 'Mesmerize';
|
||||
WHEN '100' THEN SET `token` = 'Casting_Enhancement';
|
||||
WHEN '101' THEN SET `token` = 'Snare_Hamstring';
|
||||
WHEN '102' THEN SET `token` = 'Shackle';
|
||||
WHEN '105' THEN SET `token` = 'Feign_Death';
|
||||
WHEN '106' THEN SET `token` = 'Identify';
|
||||
WHEN '107' THEN SET `token` = 'Reclaim_Energy';
|
||||
WHEN '108' THEN SET `token` = 'Locate_Corpse';
|
||||
WHEN '109' THEN SET `token` = 'Call_of_the_Hero';
|
||||
WHEN '110' THEN SET `token` = 'Mana_Shield';
|
||||
WHEN '112' THEN SET `token` = 'Blind';
|
||||
WHEN '113' THEN SET `token` = 'Gravity_is_for_Suckers'; -- 'Levitation'
|
||||
WHEN '114' THEN SET `token` = 'Bard_Nerf';
|
||||
WHEN '115' THEN SET `token` = 'Divine_Intervention';
|
||||
WHEN '116' THEN SET `token` = 'Memory_Blur';
|
||||
WHEN '118' THEN SET `token` = 'Size_Change';
|
||||
WHEN '119' THEN SET `token` = 'Hate_Buff_2';
|
||||
WHEN '120' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
WHEN '121' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
WHEN '122' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
WHEN '125' THEN SET `token` = 'DD_Fire';
|
||||
WHEN '126' THEN SET `token` = 'DD_Cold';
|
||||
WHEN '127' THEN SET `token` = 'Bolt_Poison';
|
||||
WHEN '128' THEN SET `token` = 'Bolt_Disease';
|
||||
WHEN '129' THEN SET `token` = 'DoT_Fire';
|
||||
WHEN '130' THEN SET `token` = 'DoT_Cold';
|
||||
WHEN '131' THEN SET `token` = 'DoT_Poison';
|
||||
WHEN '132' THEN SET `token` = 'DoT_Disease';
|
||||
WHEN '133' THEN SET `token` = 'Destroy_Lock';
|
||||
WHEN '134' THEN SET `token` = 'Sense_Trap';
|
||||
WHEN '135' THEN SET `token` = 'Disarm_Trap';
|
||||
WHEN '136' THEN SET `token` = 'Destroy_Cursed_Lock';
|
||||
WHEN '137' THEN SET `token` = 'Sense_Cursed_Trap';
|
||||
WHEN '138' THEN SET `token` = 'Disarm_Cursed_Trap';
|
||||
WHEN '140' THEN SET `token` = 'Banish_Undead';
|
||||
WHEN '141' THEN SET `token` = 'Banish';
|
||||
WHEN '142' THEN SET `token` = 'AoE_DD_Fire_Column';
|
||||
WHEN '143' THEN SET `token` = 'AoE_DD_Cold_Column';
|
||||
WHEN '146' THEN SET `token` = 'AoE_DD_Fire';
|
||||
WHEN '147' THEN SET `token` = 'AoE_DD_Cold';
|
||||
WHEN '150' THEN SET `token` = 'AoE_DoT_Fire';
|
||||
WHEN '151' THEN SET `token` = 'AoE_DoT_Cold';
|
||||
WHEN '152' THEN SET `token` = 'AoE_DoT_Poison';
|
||||
WHEN '154' THEN SET `token` = 'AoE_Fear_Song';
|
||||
WHEN '155' THEN SET `token` = 'Target_Heal_2';
|
||||
WHEN '156' THEN SET `token` = 'Mana_to_HP';
|
||||
WHEN '157' THEN SET `token` = 'Symbiosis';
|
||||
WHEN '159' THEN SET `token` = 'Cure_Corruption';
|
||||
WHEN '160' THEN SET `token` = 'Remove_Curse';
|
||||
WHEN '161' THEN SET `token` = 'Cure';
|
||||
WHEN '162' THEN SET `token` = 'Cure_Blindness';
|
||||
WHEN '163' THEN SET `token` = 'Divine_Cure';
|
||||
WHEN '164' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
WHEN '165' THEN SET `token` = 'Magic_Combat_Buff';
|
||||
WHEN '166' THEN SET `token` = 'Nature_HP_Attack_Buff';
|
||||
WHEN '167' THEN SET `token` = 'Divine_HP_Buff';
|
||||
WHEN '168' THEN SET `token` = 'Divine_HP_AC_Buff';
|
||||
WHEN '169' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
WHEN '170' THEN SET `token` = 'Spell_Rune';
|
||||
WHEN '171' THEN SET `token` = 'Pet_Rune';
|
||||
WHEN '172' THEN SET `token` = 'Spell_Reflection';
|
||||
WHEN '173' THEN SET `token` = 'Damage_Shield_3';
|
||||
WHEN '174' THEN SET `token` = 'Vital_Regen';
|
||||
WHEN '175' THEN SET `token` = 'Aggro_Redux';
|
||||
WHEN '200' THEN SET `token` = 'Cantrips';
|
||||
WHEN '201' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
WHEN '202' THEN SET `token` = 'Combat_Buff_Song';
|
||||
WHEN '203' THEN SET `token` = 'Summon_Swarm';
|
||||
WHEN '204' THEN SET `token` = 'Summon_Air_Elemental';
|
||||
WHEN '205' THEN SET `token` = 'Summon_Water_Elemental';
|
||||
WHEN '206' THEN SET `token` = 'Summon_Fire_Elemental';
|
||||
WHEN '207' THEN SET `token` = 'Summon_Earth_Elemental';
|
||||
WHEN '208' THEN SET `token` = 'Monster_Summoning';
|
||||
WHEN '209' THEN SET `token` = 'Teleport_Antonica';
|
||||
WHEN '210' THEN SET `token` = 'Teleport_Odus';
|
||||
WHEN '211' THEN SET `token` = 'Teleport_Faydwer';
|
||||
WHEN '212' THEN SET `token` = 'Teleport_Combine';
|
||||
WHEN '213' THEN SET `token` = 'Teleport_Velious';
|
||||
WHEN '214' THEN SET `token` = 'Teleport_Luclin';
|
||||
WHEN '215' THEN SET `token` = 'Teleport_Planes';
|
||||
WHEN '216' THEN SET `token` = 'Teleport_Gates';
|
||||
WHEN '217' THEN SET `token` = 'Summon_Weapon';
|
||||
WHEN '218' THEN SET `token` = 'Summon_Jewelry';
|
||||
WHEN '219' THEN SET `token` = 'Summon_Sustenance';
|
||||
WHEN '220' THEN SET `token` = 'Summon_Armor';
|
||||
WHEN '999' THEN SET `token` = CONCAT('#', `spell_category`);
|
||||
ELSE SET `token` = 'unk';
|
||||
END CASE;
|
||||
|
||||
SET `token` = CONCAT(`token`, '(', `spell_category`, ')');
|
||||
|
||||
RETURN `token`;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -0,0 +1,519 @@
|
||||
DELIMITER $$
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetSpellEffectToken`;
|
||||
|
||||
-- This function converts a numeric spell effect id to a string label based on server code designations
|
||||
--
|
||||
-- example:
|
||||
-- SELECT `id`, `name`, GetSpellEffectToken(`effectid1`), GetSpellEffectToken(`effectid2`) FROM `spells_new` WHERE `id` IN ('1011', '1602', '11091');
|
||||
CREATE FUNCTION `GetSpellEffectToken` (`effect_id` INT(11)) RETURNS VARCHAR(64)
|
||||
BEGIN
|
||||
DECLARE `token` VARCHAR(64) DEFAULT '';
|
||||
|
||||
CASE `effect_id`
|
||||
WHEN '0' THEN SET `token` = 'SE_CurrentHP';
|
||||
WHEN '1' THEN SET `token` = 'SE_ArmorClass';
|
||||
WHEN '2' THEN SET `token` = 'SE_ATK';
|
||||
WHEN '3' THEN SET `token` = 'SE_MovementSpeed';
|
||||
WHEN '4' THEN SET `token` = 'SE_STR';
|
||||
WHEN '5' THEN SET `token` = 'SE_DEX';
|
||||
WHEN '6' THEN SET `token` = 'SE_AGI';
|
||||
WHEN '7' THEN SET `token` = 'SE_STA';
|
||||
WHEN '8' THEN SET `token` = 'SE_INT';
|
||||
WHEN '9' THEN SET `token` = 'SE_WIS';
|
||||
WHEN '10' THEN SET `token` = 'SE_CHA';
|
||||
WHEN '11' THEN SET `token` = 'SE_AttackSpeed';
|
||||
WHEN '12' THEN SET `token` = 'SE_Invisibility';
|
||||
WHEN '13' THEN SET `token` = 'SE_SeeInvis';
|
||||
WHEN '14' THEN SET `token` = 'SE_WaterBreathing';
|
||||
WHEN '15' THEN SET `token` = 'SE_CurrentMana';
|
||||
WHEN '16' THEN SET `token` = 'NI_NPCFrenzy';
|
||||
WHEN '17' THEN SET `token` = 'NI_NPCAwareness';
|
||||
WHEN '18' THEN SET `token` = 'SE_Lull';
|
||||
WHEN '19' THEN SET `token` = 'SE_AddFaction';
|
||||
WHEN '20' THEN SET `token` = 'SE_Blind';
|
||||
WHEN '21' THEN SET `token` = 'SE_Stun';
|
||||
WHEN '22' THEN SET `token` = 'SE_Charm';
|
||||
WHEN '23' THEN SET `token` = 'SE_Fear';
|
||||
WHEN '24' THEN SET `token` = 'SE_Stamina';
|
||||
WHEN '25' THEN SET `token` = 'SE_BindAffinity';
|
||||
WHEN '26' THEN SET `token` = 'SE_Gate';
|
||||
WHEN '27' THEN SET `token` = 'SE_CancelMagic';
|
||||
WHEN '28' THEN SET `token` = 'SE_InvisVsUndead';
|
||||
WHEN '29' THEN SET `token` = 'SE_InvisVsAnimals';
|
||||
WHEN '30' THEN SET `token` = 'SE_ChangeFrenzyRad';
|
||||
WHEN '31' THEN SET `token` = 'SE_Mez';
|
||||
WHEN '32' THEN SET `token` = 'SE_SummonItem';
|
||||
WHEN '33' THEN SET `token` = 'SE_SummonPet';
|
||||
WHEN '34' THEN SET `token` = 'NI_Confuse';
|
||||
WHEN '35' THEN SET `token` = 'SE_DiseaseCounter';
|
||||
WHEN '36' THEN SET `token` = 'SE_PoisonCounter';
|
||||
WHEN '37' THEN SET `token` = 'NI_DetectHostile';
|
||||
WHEN '38' THEN SET `token` = 'NI_DetectMagic';
|
||||
WHEN '39' THEN SET `token` = 'NI_DetectPoison';
|
||||
WHEN '40' THEN SET `token` = 'SE_DivineAura';
|
||||
WHEN '41' THEN SET `token` = 'SE_Destroy';
|
||||
WHEN '42' THEN SET `token` = 'SE_ShadowStep';
|
||||
WHEN '43' THEN SET `token` = 'SE_Berserk';
|
||||
WHEN '44' THEN SET `token` = 'SE_Lycanthropy';
|
||||
WHEN '45' THEN SET `token` = 'SE_Vampirism';
|
||||
WHEN '46' THEN SET `token` = 'SE_ResistFire';
|
||||
WHEN '47' THEN SET `token` = 'SE_ResistCold';
|
||||
WHEN '48' THEN SET `token` = 'SE_ResistPoison';
|
||||
WHEN '49' THEN SET `token` = 'SE_ResistDisease';
|
||||
WHEN '50' THEN SET `token` = 'SE_ResistMagic';
|
||||
WHEN '51' THEN SET `token` = 'NI_DetectTraps';
|
||||
WHEN '52' THEN SET `token` = 'SE_SenseDead';
|
||||
WHEN '53' THEN SET `token` = 'SE_SenseSummoned';
|
||||
WHEN '54' THEN SET `token` = 'SE_SenseAnimals';
|
||||
WHEN '55' THEN SET `token` = 'SE_Rune';
|
||||
WHEN '56' THEN SET `token` = 'SE_TrueNorth';
|
||||
WHEN '57' THEN SET `token` = 'SE_Levitate';
|
||||
WHEN '58' THEN SET `token` = 'SE_Illusion';
|
||||
WHEN '59' THEN SET `token` = 'SE_DamageShield';
|
||||
WHEN '60' THEN SET `token` = 'NI_TransferItem';
|
||||
WHEN '61' THEN SET `token` = 'SE_Identify';
|
||||
WHEN '62' THEN SET `token` = 'NI_ItemID';
|
||||
WHEN '63' THEN SET `token` = 'SE_WipeHateList';
|
||||
WHEN '64' THEN SET `token` = 'SE_SpinTarget';
|
||||
WHEN '65' THEN SET `token` = 'SE_InfraVision';
|
||||
WHEN '66' THEN SET `token` = 'SE_UltraVision';
|
||||
WHEN '67' THEN SET `token` = 'SE_EyeOfZomm';
|
||||
WHEN '68' THEN SET `token` = 'SE_ReclaimPet';
|
||||
WHEN '69' THEN SET `token` = 'SE_TotalHP';
|
||||
WHEN '70' THEN SET `token` = 'NI_CorpseBomb';
|
||||
WHEN '71' THEN SET `token` = 'SE_NecPet';
|
||||
WHEN '72' THEN SET `token` = 'NI_PreserveCorpse';
|
||||
WHEN '73' THEN SET `token` = 'SE_BindSight';
|
||||
WHEN '74' THEN SET `token` = 'SE_FeignDeath';
|
||||
WHEN '75' THEN SET `token` = 'SE_VoiceGraft';
|
||||
WHEN '76' THEN SET `token` = 'SE_Sentinel';
|
||||
WHEN '77' THEN SET `token` = 'SE_LocateCorpse';
|
||||
WHEN '78' THEN SET `token` = 'SE_AbsorbMagicAtt';
|
||||
WHEN '79' THEN SET `token` = 'SE_CurrentHPOnce';
|
||||
WHEN '80' THEN SET `token` = 'NI_EnchantLight';
|
||||
WHEN '81' THEN SET `token` = 'SE_Revive';
|
||||
WHEN '82' THEN SET `token` = 'SE_SummonPC';
|
||||
WHEN '83' THEN SET `token` = 'SE_Teleport';
|
||||
WHEN '84' THEN SET `token` = 'SE_TossUp';
|
||||
WHEN '85' THEN SET `token` = 'SE_WeaponProc';
|
||||
WHEN '86' THEN SET `token` = 'SE_Harmony';
|
||||
WHEN '87' THEN SET `token` = 'SE_MagnifyVision';
|
||||
WHEN '88' THEN SET `token` = 'SE_Succor';
|
||||
WHEN '89' THEN SET `token` = 'SE_ModelSize';
|
||||
WHEN '90' THEN SET `token` = 'NI_Cloak';
|
||||
WHEN '91' THEN SET `token` = 'SE_SummonCorpse';
|
||||
WHEN '92' THEN SET `token` = 'SE_InstantHate';
|
||||
WHEN '93' THEN SET `token` = 'SE_StopRain';
|
||||
WHEN '94' THEN SET `token` = 'SE_NegateIfCombat';
|
||||
WHEN '95' THEN SET `token` = 'SE_Sacrifice';
|
||||
WHEN '96' THEN SET `token` = 'SE_Silence';
|
||||
WHEN '97' THEN SET `token` = 'SE_ManaPool';
|
||||
WHEN '98' THEN SET `token` = 'SE_AttackSpeed2';
|
||||
WHEN '99' THEN SET `token` = 'SE_Root';
|
||||
WHEN '100' THEN SET `token` = 'SE_HealOverTime';
|
||||
WHEN '101' THEN SET `token` = 'SE_CompleteHeal';
|
||||
WHEN '102' THEN SET `token` = 'SE_Fearless';
|
||||
WHEN '103' THEN SET `token` = 'SE_CallPet';
|
||||
WHEN '104' THEN SET `token` = 'SE_Translocate';
|
||||
WHEN '105' THEN SET `token` = 'SE_AntiGate';
|
||||
WHEN '106' THEN SET `token` = 'SE_SummonBSTPet';
|
||||
WHEN '107' THEN SET `token` = 'SE_AlterNPCLevel';
|
||||
WHEN '108' THEN SET `token` = 'SE_Familiar';
|
||||
WHEN '109' THEN SET `token` = 'SE_SummonItemIntoBag';
|
||||
WHEN '110' THEN SET `token` = 'NI_IncreaseArchery';
|
||||
WHEN '111' THEN SET `token` = 'SE_ResistAll';
|
||||
WHEN '112' THEN SET `token` = 'SE_CastingLevel';
|
||||
WHEN '113' THEN SET `token` = 'SE_SummonHorse';
|
||||
WHEN '114' THEN SET `token` = 'SE_ChangeAggro';
|
||||
WHEN '115' THEN SET `token` = 'SE_Hunger';
|
||||
WHEN '116' THEN SET `token` = 'SE_CurseCounter';
|
||||
WHEN '117' THEN SET `token` = 'SE_MagicWeapon';
|
||||
WHEN '118' THEN SET `token` = 'SE_Amplification';
|
||||
WHEN '119' THEN SET `token` = 'SE_AttackSpeed3';
|
||||
WHEN '120' THEN SET `token` = 'SE_HealRate';
|
||||
WHEN '121' THEN SET `token` = 'SE_ReverseDS';
|
||||
WHEN '122' THEN SET `token` = 'NI_ReduceSkill';
|
||||
WHEN '123' THEN SET `token` = 'SE_Screech';
|
||||
WHEN '124' THEN SET `token` = 'SE_ImprovedDamage';
|
||||
WHEN '125' THEN SET `token` = 'SE_ImprovedHeal';
|
||||
WHEN '126' THEN SET `token` = 'SE_SpellResistReduction';
|
||||
WHEN '127' THEN SET `token` = 'SE_IncreaseSpellHaste';
|
||||
WHEN '128' THEN SET `token` = 'SE_IncreaseSpellDuration';
|
||||
WHEN '129' THEN SET `token` = 'SE_IncreaseRange';
|
||||
WHEN '130' THEN SET `token` = 'SE_SpellHateMod';
|
||||
WHEN '131' THEN SET `token` = 'SE_ReduceReagentCost';
|
||||
WHEN '132' THEN SET `token` = 'SE_ReduceManaCost';
|
||||
WHEN '133' THEN SET `token` = 'SE_FcStunTimeMod';
|
||||
WHEN '134' THEN SET `token` = 'SE_LimitMaxLevel';
|
||||
WHEN '135' THEN SET `token` = 'SE_LimitResist';
|
||||
WHEN '136' THEN SET `token` = 'SE_LimitTarget';
|
||||
WHEN '137' THEN SET `token` = 'SE_LimitEffect';
|
||||
WHEN '138' THEN SET `token` = 'SE_LimitSpellType';
|
||||
WHEN '139' THEN SET `token` = 'SE_LimitSpell';
|
||||
WHEN '140' THEN SET `token` = 'SE_LimitMinDur';
|
||||
WHEN '141' THEN SET `token` = 'SE_LimitInstant';
|
||||
WHEN '142' THEN SET `token` = 'SE_LimitMinLevel';
|
||||
WHEN '143' THEN SET `token` = 'SE_LimitCastTimeMin';
|
||||
WHEN '144' THEN SET `token` = 'SE_LimitCastTimeMax';
|
||||
WHEN '145' THEN SET `token` = 'SE_Teleport2';
|
||||
WHEN '146' THEN SET `token` = 'NI_ElectricityResist';
|
||||
WHEN '147' THEN SET `token` = 'SE_PercentalHeal';
|
||||
WHEN '148' THEN SET `token` = 'SE_StackingCommand_Block';
|
||||
WHEN '149' THEN SET `token` = 'SE_StackingCommand_Overwrite';
|
||||
WHEN '150' THEN SET `token` = 'SE_DeathSave';
|
||||
WHEN '151' THEN SET `token` = 'SE_SuspendPet';
|
||||
WHEN '152' THEN SET `token` = 'SE_TemporaryPets';
|
||||
WHEN '153' THEN SET `token` = 'SE_BalanceHP';
|
||||
WHEN '154' THEN SET `token` = 'SE_DispelDetrimental';
|
||||
WHEN '155' THEN SET `token` = 'SE_SpellCritDmgIncrease';
|
||||
WHEN '156' THEN SET `token` = 'SE_IllusionCopy';
|
||||
WHEN '157' THEN SET `token` = 'SE_SpellDamageShield';
|
||||
WHEN '158' THEN SET `token` = 'SE_Reflect';
|
||||
WHEN '159' THEN SET `token` = 'SE_AllStats';
|
||||
WHEN '160' THEN SET `token` = 'NI_MakeDrunk';
|
||||
WHEN '161' THEN SET `token` = 'SE_MitigateSpellDamage';
|
||||
WHEN '162' THEN SET `token` = 'SE_MitigateMeleeDamage';
|
||||
WHEN '163' THEN SET `token` = 'SE_NegateAttacks';
|
||||
WHEN '164' THEN SET `token` = 'SE_AppraiseLDonChest';
|
||||
WHEN '165' THEN SET `token` = 'SE_DisarmLDoNTrap';
|
||||
WHEN '166' THEN SET `token` = 'SE_UnlockLDoNChest';
|
||||
WHEN '167' THEN SET `token` = 'SE_PetPowerIncrease';
|
||||
WHEN '168' THEN SET `token` = 'SE_MeleeMitigation';
|
||||
WHEN '169' THEN SET `token` = 'SE_CriticalHitChance';
|
||||
WHEN '170' THEN SET `token` = 'SE_SpellCritChance';
|
||||
WHEN '171' THEN SET `token` = 'SE_CrippBlowChance';
|
||||
WHEN '172' THEN SET `token` = 'SE_AvoidMeleeChance';
|
||||
WHEN '173' THEN SET `token` = 'SE_RiposteChance';
|
||||
WHEN '174' THEN SET `token` = 'SE_DodgeChance';
|
||||
WHEN '175' THEN SET `token` = 'SE_ParryChance';
|
||||
WHEN '176' THEN SET `token` = 'SE_DualWieldChance';
|
||||
WHEN '177' THEN SET `token` = 'SE_DoubleAttackChance';
|
||||
WHEN '178' THEN SET `token` = 'SE_MeleeLifetap';
|
||||
WHEN '179' THEN SET `token` = 'SE_AllInstrumentMod';
|
||||
WHEN '180' THEN SET `token` = 'SE_ResistSpellChance';
|
||||
WHEN '181' THEN SET `token` = 'SE_ResistFearChance';
|
||||
WHEN '182' THEN SET `token` = 'SE_HundredHands';
|
||||
WHEN '183' THEN SET `token` = 'SE_MeleeSkillCheck';
|
||||
WHEN '184' THEN SET `token` = 'SE_HitChance';
|
||||
WHEN '185' THEN SET `token` = 'SE_DamageModifier';
|
||||
WHEN '186' THEN SET `token` = 'SE_MinDamageModifier';
|
||||
WHEN '187' THEN SET `token` = 'SE_BalanceMana';
|
||||
WHEN '188' THEN SET `token` = 'SE_IncreaseBlockChance';
|
||||
WHEN '189' THEN SET `token` = 'SE_CurrentEndurance';
|
||||
WHEN '190' THEN SET `token` = 'SE_EndurancePool';
|
||||
WHEN '191' THEN SET `token` = 'SE_Amnesia';
|
||||
WHEN '192' THEN SET `token` = 'SE_Hate';
|
||||
WHEN '193' THEN SET `token` = 'SE_SkillAttack';
|
||||
WHEN '194' THEN SET `token` = 'SE_FadingMemories';
|
||||
WHEN '195' THEN SET `token` = 'SE_StunResist';
|
||||
WHEN '196' THEN SET `token` = 'SE_StrikeThrough';
|
||||
WHEN '197' THEN SET `token` = 'SE_SkillDamageTaken';
|
||||
WHEN '198' THEN SET `token` = 'SE_CurrentEnduranceOnce';
|
||||
WHEN '199' THEN SET `token` = 'SE_Taunt';
|
||||
WHEN '200' THEN SET `token` = 'SE_ProcChance';
|
||||
WHEN '201' THEN SET `token` = 'SE_RangedProc';
|
||||
WHEN '202' THEN SET `token` = 'SE_IllusionOther';
|
||||
WHEN '203' THEN SET `token` = 'SE_MassGroupBuff';
|
||||
WHEN '204' THEN SET `token` = 'SE_GroupFearImmunity';
|
||||
WHEN '205' THEN SET `token` = 'SE_Rampage';
|
||||
WHEN '206' THEN SET `token` = 'SE_AETaunt';
|
||||
WHEN '207' THEN SET `token` = 'SE_FleshToBone';
|
||||
WHEN '208' THEN SET `token` = 'NI_PurgePoison';
|
||||
WHEN '209' THEN SET `token` = 'SE_DispelBeneficial';
|
||||
WHEN '210' THEN SET `token` = 'NI_PetShield';
|
||||
WHEN '211' THEN SET `token` = 'SE_AEMelee';
|
||||
WHEN '212' THEN SET `token` = 'SE_FrenziedDevastation';
|
||||
WHEN '213' THEN SET `token` = 'SE_PetMaxHP';
|
||||
WHEN '214' THEN SET `token` = 'SE_MaxHPChange';
|
||||
WHEN '215' THEN SET `token` = 'SE_PetAvoidance';
|
||||
WHEN '216' THEN SET `token` = 'SE_Accuracy';
|
||||
WHEN '217' THEN SET `token` = 'SE_HeadShot';
|
||||
WHEN '218' THEN SET `token` = 'SE_PetCriticalHit';
|
||||
WHEN '219' THEN SET `token` = 'SE_SlayUndead';
|
||||
WHEN '220' THEN SET `token` = 'SE_SkillDamageAmount';
|
||||
WHEN '221' THEN SET `token` = 'SE_Packrat';
|
||||
WHEN '222' THEN SET `token` = 'SE_BlockBehind';
|
||||
WHEN '223' THEN SET `token` = 'SE_DoubleRiposte';
|
||||
WHEN '224' THEN SET `token` = 'SE_GiveDoubleRiposte';
|
||||
WHEN '225' THEN SET `token` = 'SE_GiveDoubleAttack';
|
||||
WHEN '226' THEN SET `token` = 'SE_TwoHandBash';
|
||||
WHEN '227' THEN SET `token` = 'SE_ReduceSkillTimer';
|
||||
WHEN '228' THEN SET `token` = 'SE_ReduceFallDamage';
|
||||
WHEN '229' THEN SET `token` = 'SE_PersistantCasting';
|
||||
WHEN '230' THEN SET `token` = 'SE_ExtendedShielding';
|
||||
WHEN '231' THEN SET `token` = 'SE_StunBashChance';
|
||||
WHEN '232' THEN SET `token` = 'SE_DivineSave';
|
||||
WHEN '233' THEN SET `token` = 'SE_Metabolism';
|
||||
WHEN '234' THEN SET `token` = 'SE_ReduceApplyPoisonTime';
|
||||
WHEN '235' THEN SET `token` = 'SE_ChannelChanceSpells';
|
||||
WHEN '236' THEN SET `token` = 'NI_FreePet';
|
||||
WHEN '237' THEN SET `token` = 'SE_GivePetGroupTarget';
|
||||
WHEN '238' THEN SET `token` = 'SE_IllusionPersistence';
|
||||
WHEN '239' THEN SET `token` = 'SE_FeignedCastOnChance';
|
||||
WHEN '240' THEN SET `token` = 'NI_StringUnbreakable';
|
||||
WHEN '241' THEN SET `token` = 'SE_ImprovedReclaimEnergy';
|
||||
WHEN '242' THEN SET `token` = 'SE_IncreaseChanceMemwipe';
|
||||
WHEN '243' THEN SET `token` = 'SE_CharmBreakChance';
|
||||
WHEN '244' THEN SET `token` = 'SE_RootBreakChance';
|
||||
WHEN '245' THEN SET `token` = 'SE_TrapCircumvention';
|
||||
WHEN '246' THEN SET `token` = 'SE_SetBreathLevel';
|
||||
WHEN '247' THEN SET `token` = 'SE_RaiseSkillCap';
|
||||
WHEN '248' THEN SET `token` = 'SE_SecondaryForte';
|
||||
WHEN '249' THEN SET `token` = 'SE_SecondaryDmgInc';
|
||||
WHEN '250' THEN SET `token` = 'SE_SpellProcChance';
|
||||
WHEN '251' THEN SET `token` = 'SE_ConsumeProjectile';
|
||||
WHEN '252' THEN SET `token` = 'SE_FrontalBackstabChance';
|
||||
WHEN '253' THEN SET `token` = 'SE_FrontalBackstabMinDmg';
|
||||
WHEN '254' THEN SET `token` = 'SE_Blank';
|
||||
WHEN '255' THEN SET `token` = 'SE_ShieldDuration';
|
||||
WHEN '256' THEN SET `token` = 'SE_ShroudofStealth';
|
||||
WHEN '257' THEN SET `token` = 'SE_PetDiscipline';
|
||||
WHEN '258' THEN SET `token` = 'SE_TripleBackstab';
|
||||
WHEN '259' THEN SET `token` = 'SE_CombatStability';
|
||||
WHEN '260' THEN SET `token` = 'SE_AddSingingMod';
|
||||
WHEN '261' THEN SET `token` = 'SE_SongModCap';
|
||||
WHEN '262' THEN SET `token` = 'SE_RaiseStatCap';
|
||||
WHEN '263' THEN SET `token` = 'SE_TradeSkillMastery';
|
||||
WHEN '264' THEN SET `token` = 'SE_HastenedAASkill';
|
||||
WHEN '265' THEN SET `token` = 'SE_MasteryofPast';
|
||||
WHEN '266' THEN SET `token` = 'SE_ExtraAttackChance';
|
||||
WHEN '267' THEN SET `token` = 'SE_PetDiscipline2';
|
||||
WHEN '268' THEN SET `token` = 'SE_ReduceTradeskillFail';
|
||||
WHEN '269' THEN SET `token` = 'SE_MaxBindWound';
|
||||
WHEN '270' THEN SET `token` = 'SE_BardSongRange';
|
||||
WHEN '271' THEN SET `token` = 'SE_BaseMovementSpeed';
|
||||
WHEN '272' THEN SET `token` = 'SE_CastingLevel2';
|
||||
WHEN '273' THEN SET `token` = 'SE_CriticalDoTChance';
|
||||
WHEN '274' THEN SET `token` = 'SE_CriticalHealChance';
|
||||
WHEN '275' THEN SET `token` = 'SE_CriticalMend';
|
||||
WHEN '276' THEN SET `token` = 'SE_Ambidexterity';
|
||||
WHEN '277' THEN SET `token` = 'SE_UnfailingDivinity';
|
||||
WHEN '278' THEN SET `token` = 'SE_FinishingBlow';
|
||||
WHEN '279' THEN SET `token` = 'SE_Flurry';
|
||||
WHEN '280' THEN SET `token` = 'SE_PetFlurry';
|
||||
WHEN '281' THEN SET `token` = 'SE_FeignedMinion';
|
||||
WHEN '282' THEN SET `token` = 'SE_ImprovedBindWound';
|
||||
WHEN '283' THEN SET `token` = 'SE_DoubleSpecialAttack';
|
||||
WHEN '284' THEN SET `token` = 'NI_LoHSetHeal';
|
||||
WHEN '285' THEN SET `token` = 'SE_NimbleEvasion';
|
||||
WHEN '286' THEN SET `token` = 'SE_FcDamageAmt';
|
||||
WHEN '287' THEN SET `token` = 'SE_SpellDurationIncByTic';
|
||||
WHEN '288' THEN SET `token` = 'SE_SkillAttackProc';
|
||||
WHEN '289' THEN SET `token` = 'SE_CastOnFadeEffect';
|
||||
WHEN '290' THEN SET `token` = 'SE_IncreaseRunSpeedCap';
|
||||
WHEN '291' THEN SET `token` = 'SE_Purify';
|
||||
WHEN '292' THEN SET `token` = 'SE_StrikeThrough2';
|
||||
WHEN '293' THEN SET `token` = 'SE_FrontalStunResist';
|
||||
WHEN '294' THEN SET `token` = 'SE_CriticalSpellChance';
|
||||
WHEN '295' THEN SET `token` = 'NI_ReduceTimerSpecial';
|
||||
WHEN '296' THEN SET `token` = 'SE_FcSpellVulnerability';
|
||||
WHEN '297' THEN SET `token` = 'SE_FcDamageAmtIncoming';
|
||||
WHEN '298' THEN SET `token` = 'SE_ChangeHeight';
|
||||
WHEN '299' THEN SET `token` = 'SE_WakeTheDead';
|
||||
WHEN '300' THEN SET `token` = 'SE_Doppelganger';
|
||||
WHEN '301' THEN SET `token` = 'SE_ArcheryDamageModifier';
|
||||
WHEN '302' THEN SET `token` = 'SE_FcDamagePctCrit';
|
||||
WHEN '303' THEN SET `token` = 'SE_FcDamageAmtCrit';
|
||||
WHEN '304' THEN SET `token` = 'SE_OffhandRiposteFail';
|
||||
WHEN '305' THEN SET `token` = 'SE_MitigateDamageShield';
|
||||
WHEN '306' THEN SET `token` = 'NI_ArmyOfTheDead';
|
||||
WHEN '307' THEN SET `token` = 'NI_Appraisal';
|
||||
WHEN '308' THEN SET `token` = 'SE_SuspendMinion';
|
||||
WHEN '309' THEN SET `token` = 'SE_GateCastersBindpoint';
|
||||
WHEN '310' THEN SET `token` = 'SE_ReduceReuseTimer';
|
||||
WHEN '311' THEN SET `token` = 'SE_LimitCombatSkills';
|
||||
WHEN '312' THEN SET `token` = 'SE_Sanctuary';
|
||||
WHEN '313' THEN SET `token` = 'SE_ForageAdditionalItems';
|
||||
WHEN '314' THEN SET `token` = 'SE_Invisibility2';
|
||||
WHEN '315' THEN SET `token` = 'SE_InvisVsUndead2';
|
||||
WHEN '316' THEN SET `token` = 'NI_ImprovedInvisAnimals';
|
||||
WHEN '317' THEN SET `token` = 'SE_ItemHPRegenCapIncrease';
|
||||
WHEN '318' THEN SET `token` = 'SE_ItemManaRegenCapIncrease';
|
||||
WHEN '319' THEN SET `token` = 'SE_CriticalHealOverTime';
|
||||
WHEN '320' THEN SET `token` = 'SE_ShieldBlock';
|
||||
WHEN '321' THEN SET `token` = 'SE_ReduceHate';
|
||||
WHEN '322' THEN SET `token` = 'SE_GateToHomeCity';
|
||||
WHEN '323' THEN SET `token` = 'SE_DefensiveProc';
|
||||
WHEN '324' THEN SET `token` = 'SE_HPToMana';
|
||||
WHEN '325' THEN SET `token` = 'SE_NoBreakAESneak';
|
||||
WHEN '326' THEN SET `token` = 'SE_SpellSlotIncrease';
|
||||
WHEN '327' THEN SET `token` = 'SE_MysticalAttune';
|
||||
WHEN '328' THEN SET `token` = 'SE_DelayDeath';
|
||||
WHEN '329' THEN SET `token` = 'SE_ManaAbsorbPercentDamage';
|
||||
WHEN '330' THEN SET `token` = 'SE_CriticalDamageMob';
|
||||
WHEN '331' THEN SET `token` = 'SE_Salvage';
|
||||
WHEN '332' THEN SET `token` = 'SE_SummonToCorpse';
|
||||
WHEN '333' THEN SET `token` = 'SE_CastOnRuneFadeEffect';
|
||||
WHEN '334' THEN SET `token` = 'SE_BardAEDot';
|
||||
WHEN '335' THEN SET `token` = 'SE_BlockNextSpellFocus';
|
||||
WHEN '336' THEN SET `token` = 'NI_IllusionaryTarget';
|
||||
WHEN '337' THEN SET `token` = 'SE_PercentXPIncrease';
|
||||
WHEN '338' THEN SET `token` = 'SE_SummonAndResAllCorpses';
|
||||
WHEN '339' THEN SET `token` = 'SE_TriggerOnCast';
|
||||
WHEN '340' THEN SET `token` = 'SE_SpellTrigger';
|
||||
WHEN '341' THEN SET `token` = 'SE_ItemAttackCapIncrease';
|
||||
WHEN '342' THEN SET `token` = 'SE_ImmuneFleeing';
|
||||
WHEN '343' THEN SET `token` = 'SE_InterruptCasting';
|
||||
WHEN '344' THEN SET `token` = 'SE_ChannelChanceItems';
|
||||
WHEN '345' THEN SET `token` = 'SE_AssassinateLevel';
|
||||
WHEN '346' THEN SET `token` = 'SE_HeadShotLevel';
|
||||
WHEN '347' THEN SET `token` = 'SE_DoubleRangedAttack';
|
||||
WHEN '348' THEN SET `token` = 'SE_LimitManaMin';
|
||||
WHEN '349' THEN SET `token` = 'SE_ShieldEquipDmgMod';
|
||||
WHEN '350' THEN SET `token` = 'SE_ManaBurn';
|
||||
WHEN '351' THEN SET `token` = 'NI_PersistentEffect';
|
||||
WHEN '352' THEN SET `token` = 'NI_IncreaseTrapCount';
|
||||
WHEN '353' THEN SET `token` = 'NI_AdditionalAura';
|
||||
WHEN '354' THEN SET `token` = 'NI_DeactivateAllTraps';
|
||||
WHEN '355' THEN SET `token` = 'NI_LearnTrap';
|
||||
WHEN '356' THEN SET `token` = 'NI_ChangeTriggerType';
|
||||
WHEN '357' THEN SET `token` = 'SE_FcMute';
|
||||
WHEN '358' THEN SET `token` = 'SE_CurrentManaOnce';
|
||||
WHEN '359' THEN SET `token` = 'NI_PassiveSenseTrap';
|
||||
WHEN '360' THEN SET `token` = 'SE_ProcOnKillShot';
|
||||
WHEN '361' THEN SET `token` = 'SE_SpellOnDeath';
|
||||
WHEN '362' THEN SET `token` = 'SE_PotionBeltSlots';
|
||||
WHEN '363' THEN SET `token` = 'SE_BandolierSlots';
|
||||
WHEN '364' THEN SET `token` = 'SE_TripleAttackChance';
|
||||
WHEN '365' THEN SET `token` = 'SE_ProcOnSpellKillShot';
|
||||
WHEN '366' THEN SET `token` = 'SE_GroupShielding';
|
||||
WHEN '367' THEN SET `token` = 'SE_SetBodyType';
|
||||
WHEN '368' THEN SET `token` = 'NI_FactionMod';
|
||||
WHEN '369' THEN SET `token` = 'SE_CorruptionCounter';
|
||||
WHEN '370' THEN SET `token` = 'SE_ResistCorruption';
|
||||
WHEN '371' THEN SET `token` = 'SE_AttackSpeed4';
|
||||
WHEN '372' THEN SET `token` = 'SE_ForageSkill';
|
||||
WHEN '373' THEN SET `token` = 'SE_CastOnFadeEffectAlways';
|
||||
WHEN '374' THEN SET `token` = 'SE_ApplyEffect';
|
||||
WHEN '375' THEN SET `token` = 'SE_DotCritDmgIncrease';
|
||||
WHEN '376' THEN SET `token` = 'NI_Fling';
|
||||
WHEN '377' THEN SET `token` = 'SE_CastOnFadeEffectNPC';
|
||||
WHEN '378' THEN SET `token` = 'SE_SpellEffectResistChance';
|
||||
WHEN '379' THEN SET `token` = 'SE_ShadowStepDirectional';
|
||||
WHEN '380' THEN SET `token` = 'SE_Knockdown';
|
||||
WHEN '381' THEN SET `token` = 'NI_KnockTowardCaster';
|
||||
WHEN '382' THEN SET `token` = 'SE_NegateSpellEffect';
|
||||
WHEN '383' THEN SET `token` = 'SE_SympatheticProc';
|
||||
WHEN '384' THEN SET `token` = 'SE_Leap';
|
||||
WHEN '385' THEN SET `token` = 'SE_LimitSpellGroup';
|
||||
WHEN '386' THEN SET `token` = 'SE_CastOnCurer';
|
||||
WHEN '387' THEN SET `token` = 'SE_CastOnCure';
|
||||
WHEN '388' THEN SET `token` = 'NI_SummonCorpseZone';
|
||||
WHEN '389' THEN SET `token` = 'SE_FcTimerRefresh';
|
||||
WHEN '390' THEN SET `token` = 'NI_FcTimerLockout';
|
||||
WHEN '391' THEN SET `token` = 'SE_LimitManaMax';
|
||||
WHEN '392' THEN SET `token` = 'SE_FcHealAmt';
|
||||
WHEN '393' THEN SET `token` = 'SE_FcHealPctIncoming';
|
||||
WHEN '394' THEN SET `token` = 'SE_FcHealAmtIncoming';
|
||||
WHEN '395' THEN SET `token` = 'SE_FcHealPctCritIncoming';
|
||||
WHEN '396' THEN SET `token` = 'SE_FcHealAmtCrit';
|
||||
WHEN '397' THEN SET `token` = 'SE_PetMeleeMitigation';
|
||||
WHEN '398' THEN SET `token` = 'SE_SwarmPetDuration';
|
||||
WHEN '399' THEN SET `token` = 'SE_FcTwincast';
|
||||
WHEN '400' THEN SET `token` = 'SE_HealGroupFromMana';
|
||||
WHEN '401' THEN SET `token` = 'SE_ManaDrainWithDmg';
|
||||
WHEN '402' THEN SET `token` = 'SE_EndDrainWithDmg';
|
||||
WHEN '403' THEN SET `token` = 'SE_LimitSpellClass';
|
||||
WHEN '404' THEN SET `token` = 'SE_LimitSpellSubclass';
|
||||
WHEN '405' THEN SET `token` = 'SE_TwoHandBluntBlock';
|
||||
WHEN '406' THEN SET `token` = 'SE_CastonNumHitFade';
|
||||
WHEN '407' THEN SET `token` = 'SE_CastonFocusEffect';
|
||||
WHEN '408' THEN SET `token` = 'SE_LimitHPPercent';
|
||||
WHEN '409' THEN SET `token` = 'SE_LimitManaPercent';
|
||||
WHEN '410' THEN SET `token` = 'SE_LimitEndPercent';
|
||||
WHEN '411' THEN SET `token` = 'SE_LimitClass';
|
||||
WHEN '412' THEN SET `token` = 'SE_LimitRace';
|
||||
WHEN '413' THEN SET `token` = 'SE_FcBaseEffects';
|
||||
WHEN '414' THEN SET `token` = 'SE_LimitCastingSkill';
|
||||
WHEN '415' THEN SET `token` = 'NI_FFItemClass';
|
||||
WHEN '416' THEN SET `token` = 'SE_ACv2';
|
||||
WHEN '417' THEN SET `token` = 'SE_ManaRegen_v2';
|
||||
WHEN '418' THEN SET `token` = 'SE_SkillDamageAmount2';
|
||||
WHEN '419' THEN SET `token` = 'SE_AddMeleeProc';
|
||||
WHEN '420' THEN SET `token` = 'SE_FcLimitUse';
|
||||
WHEN '421' THEN SET `token` = 'SE_FcIncreaseNumHits';
|
||||
WHEN '422' THEN SET `token` = 'SE_LimitUseMin';
|
||||
WHEN '423' THEN SET `token` = 'SE_LimitUseType';
|
||||
WHEN '424' THEN SET `token` = 'SE_GravityEffect';
|
||||
WHEN '425' THEN SET `token` = 'NI_Display';
|
||||
WHEN '426' THEN SET `token` = 'SE_IncreaseExtTargetWindow';
|
||||
WHEN '427' THEN SET `token` = 'SE_SkillProc';
|
||||
WHEN '428' THEN SET `token` = 'SE_LimitToSkill';
|
||||
WHEN '429' THEN SET `token` = 'SE_SkillProcSuccess';
|
||||
WHEN '430' THEN SET `token` = 'NI_PostEffect';
|
||||
WHEN '431' THEN SET `token` = 'NI_PostEffectData';
|
||||
WHEN '432' THEN SET `token` = 'NI_ExpandMaxActiveTrophyBen';
|
||||
WHEN '433' THEN SET `token` = 'SE_CriticalDotDecay';
|
||||
WHEN '434' THEN SET `token` = 'SE_CriticalHealDecay';
|
||||
WHEN '435' THEN SET `token` = 'SE_CriticalRegenDecay';
|
||||
WHEN '436' THEN SET `token` = 'NI_BeneficialCountDownHold';
|
||||
WHEN '437' THEN SET `token` = 'NI_TeleporttoAnchor';
|
||||
WHEN '438' THEN SET `token` = 'NI_TranslocatetoAnchor';
|
||||
WHEN '439' THEN SET `token` = 'SE_Assassinate';
|
||||
WHEN '440' THEN SET `token` = 'SE_FinishingBlowLvl';
|
||||
WHEN '441' THEN SET `token` = 'SE_DistanceRemoval';
|
||||
WHEN '442' THEN SET `token` = 'SE_TriggerOnReqTarget';
|
||||
WHEN '443' THEN SET `token` = 'SE_TriggerOnReqCaster';
|
||||
WHEN '444' THEN SET `token` = 'SE_ImprovedTaunt';
|
||||
WHEN '445' THEN SET `token` = 'NI_AddMercSlot';
|
||||
WHEN '446' THEN SET `token` = 'SE_AStacker';
|
||||
WHEN '447' THEN SET `token` = 'SE_BStacker';
|
||||
WHEN '448' THEN SET `token` = 'SE_CStacker';
|
||||
WHEN '449' THEN SET `token` = 'SE_DStacker';
|
||||
WHEN '450' THEN SET `token` = 'SE_MitigateDotDamage';
|
||||
WHEN '451' THEN SET `token` = 'SE_MeleeThresholdGuard';
|
||||
WHEN '452' THEN SET `token` = 'SE_SpellThresholdGuard';
|
||||
WHEN '453' THEN SET `token` = 'SE_TriggerMeleeThreshold';
|
||||
WHEN '454' THEN SET `token` = 'SE_TriggerSpellThreshold';
|
||||
WHEN '455' THEN SET `token` = 'SE_AddHatePct';
|
||||
WHEN '456' THEN SET `token` = 'SE_AddHateOverTimePct';
|
||||
WHEN '457' THEN SET `token` = 'SE_ResourceTap';
|
||||
WHEN '458' THEN SET `token` = 'SE_FactionModPct';
|
||||
WHEN '459' THEN SET `token` = 'SE_DamageModifier2';
|
||||
WHEN '460' THEN SET `token` = 'NI_Ff_Override_NotFocusable';
|
||||
WHEN '461' THEN SET `token` = 'SE_ImprovedDamage2';
|
||||
WHEN '462' THEN SET `token` = 'SE_FcDamageAmt2';
|
||||
WHEN '463' THEN SET `token` = 'NI_Shield_Target';
|
||||
WHEN '464' THEN SET `token` = 'SE_PC_Pet_Rampage';
|
||||
WHEN '465' THEN SET `token` = 'NI_PC_Pet_AE_Rampage';
|
||||
WHEN '466' THEN SET `token` = 'SE_PC_Pet_Flurry_Chance';
|
||||
WHEN '467' THEN SET `token` = 'NI_DS_Mitigation_Amount';
|
||||
WHEN '468' THEN SET `token` = 'NI_DS_Mitigation_Percentage';
|
||||
WHEN '469' THEN SET `token` = 'NI_Chance_Best_in_Spell_Grp';
|
||||
WHEN '470' THEN SET `token` = 'NI_Trigger_Best_in_Spell_Grp';
|
||||
WHEN '471' THEN SET `token` = 'NI_Double_Melee_Round';
|
||||
-- these are not defined
|
||||
WHEN '472' THEN SET `token` = 'NI_Buy_AA_Rank';
|
||||
WHEN '473' THEN SET `token` = 'NI_Double_Backstab_From_Front';
|
||||
WHEN '474' THEN SET `token` = 'NI_Pet_Crit_Melee_Damage_Pct';
|
||||
WHEN '475' THEN SET `token` = 'NI_Trigger_Spell_Non_Item';
|
||||
WHEN '476' THEN SET `token` = 'NI_Weapon_Stance';
|
||||
WHEN '477' THEN SET `token` = 'NI_Hatelist_To_Top_Index';
|
||||
WHEN '478' THEN SET `token` = 'NI_Hatelist_To_Tail_Index';
|
||||
WHEN '479' THEN SET `token` = 'NI_Ff_Value_Min';
|
||||
WHEN '480' THEN SET `token` = 'NI_Ff_Value_Max';
|
||||
WHEN '481' THEN SET `token` = 'NI_Fc_Cast_Spell_On_Land';
|
||||
WHEN '482' THEN SET `token` = 'NI_Skill_Base_Damage_Mod';
|
||||
WHEN '483' THEN SET `token` = 'NI_Fc_Spell_Damage_Pct_IncomingPC';
|
||||
WHEN '484' THEN SET `token` = 'NI_Fc_Spell_Damage_Amt_IncomingPC';
|
||||
WHEN '485' THEN SET `token` = 'NI_Ff_CasterClass';
|
||||
WHEN '486' THEN SET `token` = 'NI_Ff_Same_Caster';
|
||||
WHEN '487' THEN SET `token` = 'NI_Extend_Tradeskill_Cap';
|
||||
WHEN '488' THEN SET `token` = 'NI_Defender_Melee_Force_Pct';
|
||||
WHEN '489' THEN SET `token` = 'NI_Worn_Endurance_Regen_Cap';
|
||||
WHEN '490' THEN SET `token` = 'NI_Ff_ReuseTimeMin';
|
||||
WHEN '491' THEN SET `token` = 'NI_Ff_ReuseTimeMax';
|
||||
WHEN '492' THEN SET `token` = 'NI_Ff_Endurance_Min';
|
||||
WHEN '493' THEN SET `token` = 'NI_Ff_Endurance_Max';
|
||||
WHEN '494' THEN SET `token` = 'NI_Pet_Add_Atk';
|
||||
WHEN '495' THEN SET `token` = 'NI_Ff_DurationMax';
|
||||
ELSE SET `token` = 'unk';
|
||||
END CASE;
|
||||
|
||||
SET `token` = CONCAT(`token`, '(', `effect_id`, ')');
|
||||
|
||||
RETURN `token`;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -0,0 +1,171 @@
|
||||
DELIMITER $$
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetSpellTargetTypeToken`;
|
||||
|
||||
-- This function converts a numeric spell target type to a string label based on server code designations
|
||||
-- Note: `cast_restriction` data taken from MacroQuest2 definitions
|
||||
--
|
||||
-- example:
|
||||
-- SELECT `id`, `name`, GetSpellTargetTypeToken(`targettype`, `CastRestriction`) FROM `spells_new` WHERE `id` IN ('6836', '10763', '25039');
|
||||
CREATE FUNCTION `GetSpellTargetTypeToken` (`target_type` INT(11), `cast_restriction` INT(11)) RETURNS VARCHAR(128)
|
||||
BEGIN
|
||||
DECLARE `token` VARCHAR(128) DEFAULT '';
|
||||
DECLARE `token2` VARCHAR(64) DEFAULT '';
|
||||
|
||||
CASE `target_type`
|
||||
WHEN '1' THEN SET `token` = 'ST_TargetOptional';
|
||||
WHEN '2' THEN SET `token` = 'ST_AEClientV1';
|
||||
WHEN '3' THEN SET `token` = 'ST_GroupTeleport';
|
||||
WHEN '4' THEN SET `token` = 'ST_AECaster';
|
||||
WHEN '5' THEN SET `token` = 'ST_Target';
|
||||
WHEN '6' THEN SET `token` = 'ST_Self';
|
||||
WHEN '8' THEN SET `token` = 'ST_AETarget';
|
||||
WHEN '9' THEN SET `token` = 'ST_Animal';
|
||||
WHEN '10' THEN SET `token` = 'ST_Undead';
|
||||
WHEN '11' THEN SET `token` = 'ST_Summoned';
|
||||
WHEN '13' THEN SET `token` = 'ST_Tap';
|
||||
WHEN '14' THEN SET `token` = 'ST_Pet';
|
||||
WHEN '15' THEN SET `token` = 'ST_Corpse';
|
||||
WHEN '16' THEN SET `token` = 'ST_Plant';
|
||||
WHEN '17' THEN SET `token` = 'ST_Giant';
|
||||
WHEN '18' THEN SET `token` = 'ST_Dragon';
|
||||
WHEN '20' THEN SET `token` = 'ST_TargetAETap';
|
||||
WHEN '24' THEN SET `token` = 'ST_UndeadAE';
|
||||
WHEN '25' THEN SET `token` = 'ST_SummonedAE';
|
||||
WHEN '32' THEN SET `token` = 'ST_AETargetHateList';
|
||||
WHEN '33' THEN SET `token` = 'ST_HateList';
|
||||
WHEN '34' THEN SET `token` = 'ST_LDoNChest_Cursed';
|
||||
WHEN '35' THEN SET `token` = 'ST_Muramite';
|
||||
WHEN '36' THEN SET `token` = 'ST_AreaClientOnly';
|
||||
WHEN '37' THEN SET `token` = 'ST_AreaNPCOnly';
|
||||
WHEN '38' THEN SET `token` = 'ST_SummonedPet';
|
||||
WHEN '39' THEN SET `token` = 'ST_GroupNoPets';
|
||||
WHEN '40' THEN SET `token` = 'ST_AEBard';
|
||||
WHEN '41' THEN SET `token` = 'ST_Group';
|
||||
WHEN '42' THEN SET `token` = 'ST_Directional';
|
||||
WHEN '43' THEN SET `token` = 'ST_GroupClientAndPet';
|
||||
WHEN '44' THEN SET `token` = 'ST_Beam';
|
||||
WHEN '45' THEN SET `token` = 'ST_Ring';
|
||||
WHEN '46' THEN SET `token` = 'ST_TargetsTarget';
|
||||
WHEN '47' THEN SET `token` = 'ST_PetMaster';
|
||||
WHEN '50' THEN SET `token` = 'ST_TargetAENoPlayersPets';
|
||||
ELSE SET `token` = 'unk';
|
||||
END CASE;
|
||||
|
||||
SET `token` = CONCAT(`token`, '(', `target_type`, ')');
|
||||
|
||||
CASE `cast_restriction`
|
||||
WHEN '0' THEN SET `token2` = 'None';
|
||||
WHEN '100' THEN SET `token2` = 'Only works on Animal or Humanoid';
|
||||
WHEN '101' THEN SET `token2` = 'Only works on Dragon';
|
||||
WHEN '102' THEN SET `token2` = 'Only works on Animal or Insect';
|
||||
WHEN '104' THEN SET `token2` = 'Only works on Animal';
|
||||
WHEN '105' THEN SET `token2` = 'Only works on Plant';
|
||||
WHEN '106' THEN SET `token2` = 'Only works on Giant';
|
||||
WHEN '108' THEN SET `token2` = 'Doesn\'t work on Animals or Humanoids';
|
||||
WHEN '109' THEN SET `token2` = 'Only works on Bixie';
|
||||
WHEN '110' THEN SET `token2` = 'Only works on Harpy';
|
||||
WHEN '111' THEN SET `token2` = 'Only works on Gnoll';
|
||||
WHEN '112' THEN SET `token2` = 'Only works on Sporali';
|
||||
WHEN '113' THEN SET `token2` = 'Only works on Kobold';
|
||||
WHEN '114' THEN SET `token2` = 'Only works on Shade';
|
||||
WHEN '115' THEN SET `token2` = 'Only works on Drakkin';
|
||||
WHEN '117' THEN SET `token2` = 'Only works on Animals or Plants';
|
||||
WHEN '118' THEN SET `token2` = 'Only works on Summoned';
|
||||
WHEN '119' THEN SET `token2` = 'Only works on Fire_Pet';
|
||||
WHEN '120' THEN SET `token2` = 'Only works on Undead';
|
||||
WHEN '121' THEN SET `token2` = 'Only works on Living';
|
||||
WHEN '122' THEN SET `token2` = 'Only works on Fairy';
|
||||
WHEN '123' THEN SET `token2` = 'Only works on Humanoid';
|
||||
WHEN '124' THEN SET `token2` = 'Undead HP Less Than 10%';
|
||||
WHEN '125' THEN SET `token2` = 'Clockwork HP Less Than 45%';
|
||||
WHEN '126' THEN SET `token2` = 'Wisp HP Less Than 10%';
|
||||
WHEN '190' THEN SET `token2` = 'Doesn\'t work on Raid Bosses';
|
||||
WHEN '191' THEN SET `token2` = 'Only works on Raid Bosses';
|
||||
WHEN '201' THEN SET `token2` = 'HP Above 75%';
|
||||
WHEN '203' THEN SET `token2` = 'HP Less Than 20%';
|
||||
WHEN '204' THEN SET `token2` = 'HP Less Than 50%';
|
||||
WHEN '216' THEN SET `token2` = 'Not In Combat';
|
||||
WHEN '221' THEN SET `token2` = 'At Least 1 Pet On Hatelist';
|
||||
WHEN '222' THEN SET `token2` = 'At Least 2 Pets On Hatelist';
|
||||
WHEN '223' THEN SET `token2` = 'At Least 3 Pets On Hatelist';
|
||||
WHEN '224' THEN SET `token2` = 'At Least 4 Pets On Hatelist';
|
||||
WHEN '225' THEN SET `token2` = 'At Least 5 Pets On Hatelist';
|
||||
WHEN '226' THEN SET `token2` = 'At Least 6 Pets On Hatelist';
|
||||
WHEN '227' THEN SET `token2` = 'At Least 7 Pets On Hatelist';
|
||||
WHEN '228' THEN SET `token2` = 'At Least 8 Pets On Hatelist';
|
||||
WHEN '229' THEN SET `token2` = 'At Least 9 Pets On Hatelist';
|
||||
WHEN '230' THEN SET `token2` = 'At Least 10 Pets On Hatelist';
|
||||
WHEN '231' THEN SET `token2` = 'At Least 11 Pets On Hatelist';
|
||||
WHEN '232' THEN SET `token2` = 'At Least 12 Pets On Hatelist';
|
||||
WHEN '233' THEN SET `token2` = 'At Least 13 Pets On Hatelist';
|
||||
WHEN '234' THEN SET `token2` = 'At Least 14 Pets On Hatelist';
|
||||
WHEN '235' THEN SET `token2` = 'At Least 15 Pets On Hatelist';
|
||||
WHEN '236' THEN SET `token2` = 'At Least 16 Pets On Hatelist';
|
||||
WHEN '237' THEN SET `token2` = 'At Least 17 Pets On Hatelist';
|
||||
WHEN '238' THEN SET `token2` = 'At Least 18 Pets On Hatelist';
|
||||
WHEN '239' THEN SET `token2` = 'At Least 19 Pets On Hatelist';
|
||||
WHEN '240' THEN SET `token2` = 'At Least 20 Pets On Hatelist';
|
||||
WHEN '250' THEN SET `token2` = 'HP Less Than 35%';
|
||||
WHEN '304' THEN SET `token2` = 'Chain Plate Classes';
|
||||
WHEN '399' THEN SET `token2` = 'HP Between 15 and 25%';
|
||||
WHEN '400' THEN SET `token2` = 'HP Between 1 and 25%';
|
||||
WHEN '401' THEN SET `token2` = 'HP Between 25 and 35%';
|
||||
WHEN '402' THEN SET `token2` = 'HP Between 35 and 45%';
|
||||
WHEN '403' THEN SET `token2` = 'HP Between 45 and 55%';
|
||||
WHEN '404' THEN SET `token2` = 'HP Between 55 and 65%';
|
||||
WHEN '412' THEN SET `token2` = 'HP Above 99%';
|
||||
WHEN '501' THEN SET `token2` = 'HP Below 5%';
|
||||
WHEN '502' THEN SET `token2` = 'HP Below 10%';
|
||||
WHEN '503' THEN SET `token2` = 'HP Below 15%';
|
||||
WHEN '504' THEN SET `token2` = 'HP Below 20%';
|
||||
WHEN '505' THEN SET `token2` = 'HP Below 25%';
|
||||
WHEN '506' THEN SET `token2` = 'HP Below 30%';
|
||||
WHEN '507' THEN SET `token2` = 'HP Below 35%';
|
||||
WHEN '508' THEN SET `token2` = 'HP Below 40%';
|
||||
WHEN '509' THEN SET `token2` = 'HP Below 45%';
|
||||
WHEN '510' THEN SET `token2` = 'HP Below 50%';
|
||||
WHEN '511' THEN SET `token2` = 'HP Below 55%';
|
||||
WHEN '512' THEN SET `token2` = 'HP Below 60%';
|
||||
WHEN '513' THEN SET `token2` = 'HP Below 65%';
|
||||
WHEN '514' THEN SET `token2` = 'HP Below 70%';
|
||||
WHEN '515' THEN SET `token2` = 'HP Below 75%';
|
||||
WHEN '516' THEN SET `token2` = 'HP Below 80%';
|
||||
WHEN '517' THEN SET `token2` = 'HP Below 85%';
|
||||
WHEN '518' THEN SET `token2` = 'HP Below 90%';
|
||||
WHEN '519' THEN SET `token2` = 'HP Below 95%';
|
||||
WHEN '521' THEN SET `token2` = 'Mana Below X%';
|
||||
WHEN '522' THEN SET `token2` = 'End Below 40%';
|
||||
WHEN '523' THEN SET `token2` = 'Mana Below 40%';
|
||||
WHEN '603' THEN SET `token2` = 'Only works on Undead2';
|
||||
WHEN '608' THEN SET `token2` = 'Only works on Undead3';
|
||||
WHEN '624' THEN SET `token2` = 'Only works on Summoned2';
|
||||
WHEN '701' THEN SET `token2` = 'Doesn\'t work on Pets';
|
||||
WHEN '818' THEN SET `token2` = 'Only works on Undead4';
|
||||
WHEN '819' THEN SET `token2` = 'Doesn\'t work on Undead4';
|
||||
WHEN '825' THEN SET `token2` = 'End Below 21%';
|
||||
WHEN '826' THEN SET `token2` = 'End Below 25%';
|
||||
WHEN '827' THEN SET `token2` = 'End Below 29%';
|
||||
WHEN '836' THEN SET `token2` = 'Only works on Regular Servers';
|
||||
WHEN '837' THEN SET `token2` = 'Doesn\'t work on Progression Servers';
|
||||
WHEN '842' THEN SET `token2` = 'Only works on Humanoid Level 84 Max';
|
||||
WHEN '843' THEN SET `token2` = 'Only works on Humanoid Level 86 Max';
|
||||
WHEN '844' THEN SET `token2` = 'Only works on Humanoid Level 88 Max';
|
||||
WHEN '1000' THEN SET `token2` = 'Between Level 1 and 75';
|
||||
WHEN '1001' THEN SET `token2` = 'Between Level 76 and 85';
|
||||
WHEN '1002' THEN SET `token2` = 'Between Level 86 and 95';
|
||||
WHEN '1003' THEN SET `token2` = 'Between Level 96 and 100';
|
||||
WHEN '1004' THEN SET `token2` = 'HP Less Than 80%';
|
||||
WHEN '38311' THEN SET `token2` = 'Mana Below 20%';
|
||||
WHEN '38312' THEN SET `token2` = 'Mana Below 10%';
|
||||
ELSE SET `token2` = 'unk';
|
||||
END CASE;
|
||||
|
||||
SET `token2` = CONCAT(`token2`, '(', `cast_restriction`, ')');
|
||||
|
||||
SET `token` = CONCAT(`token`, ':', `token2`);
|
||||
|
||||
RETURN `token`;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -0,0 +1,185 @@
|
||||
DELIMITER $$
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetSpellTypeDescriptionToken`;
|
||||
|
||||
-- This function converts numeric spell type description ids to a string label based on server code designations
|
||||
--
|
||||
-- example:
|
||||
-- SELECT `id`, `name`, GetSpellTypeDescriptionToken(`typedescnum`) FROM `spells_new` WHERE `id` IN ('16', '42', '23214');
|
||||
CREATE FUNCTION `GetSpellTypeDescriptionToken` (`type_description_id` INT(11)) RETURNS VARCHAR(256)
|
||||
BEGIN
|
||||
DECLARE `token` VARCHAR(256) DEFAULT '';
|
||||
|
||||
CASE `type_description_id`
|
||||
WHEN '1' THEN SET `token` = 'Aegolism';
|
||||
WHEN '2' THEN SET `token` = 'Agility';
|
||||
WHEN '3' THEN SET `token` = 'Alliance';
|
||||
WHEN '4' THEN SET `token` = 'Animal';
|
||||
WHEN '5' THEN SET `token` = 'Antonica';
|
||||
WHEN '6' THEN SET `token` = 'Armor_Class';
|
||||
WHEN '7' THEN SET `token` = 'Attack';
|
||||
WHEN '8' THEN SET `token` = 'Bane';
|
||||
WHEN '9' THEN SET `token` = 'Blind';
|
||||
WHEN '10' THEN SET `token` = 'Block';
|
||||
WHEN '11' THEN SET `token` = 'Calm';
|
||||
WHEN '12' THEN SET `token` = 'Charisma';
|
||||
WHEN '13' THEN SET `token` = 'Charm';
|
||||
WHEN '14' THEN SET `token` = 'Cold';
|
||||
WHEN '15' THEN SET `token` = 'Combat_Abilities';
|
||||
WHEN '16' THEN SET `token` = 'Combat_Innates';
|
||||
WHEN '17' THEN SET `token` = 'Conversions';
|
||||
WHEN '18' THEN SET `token` = 'Create_Item';
|
||||
WHEN '19' THEN SET `token` = 'Cure';
|
||||
WHEN '20' THEN SET `token` = 'Damage_Over_Time';
|
||||
WHEN '21' THEN SET `token` = 'Damage_Shield';
|
||||
WHEN '22' THEN SET `token` = 'Defensive';
|
||||
WHEN '23' THEN SET `token` = 'Destroy';
|
||||
WHEN '24' THEN SET `token` = 'Dexterity';
|
||||
WHEN '25' THEN SET `token` = 'Direct_Damage';
|
||||
WHEN '26' THEN SET `token` = 'Disarm_Traps';
|
||||
WHEN '27' THEN SET `token` = 'Disciplines';
|
||||
WHEN '28' THEN SET `token` = 'Discord';
|
||||
WHEN '29' THEN SET `token` = 'Disease';
|
||||
WHEN '30' THEN SET `token` = 'Disempowering';
|
||||
WHEN '31' THEN SET `token` = 'Dispel';
|
||||
WHEN '32' THEN SET `token` = 'Duration_Heals';
|
||||
WHEN '33' THEN SET `token` = 'Duration_Tap';
|
||||
WHEN '34' THEN SET `token` = 'Enchant_Metal';
|
||||
WHEN '35' THEN SET `token` = 'Enthrall';
|
||||
WHEN '36' THEN SET `token` = 'Faydwer';
|
||||
WHEN '37' THEN SET `token` = 'Fear';
|
||||
WHEN '38' THEN SET `token` = 'Fire';
|
||||
WHEN '39' THEN SET `token` = 'Fizzle_Rate';
|
||||
WHEN '40' THEN SET `token` = 'Fumble';
|
||||
WHEN '41' THEN SET `token` = 'Haste';
|
||||
WHEN '42' THEN SET `token` = 'Heals';
|
||||
WHEN '43' THEN SET `token` = 'Health';
|
||||
WHEN '44' THEN SET `token` = 'Health_Mana';
|
||||
WHEN '45' THEN SET `token` = 'HP_Buffs';
|
||||
WHEN '46' THEN SET `token` = 'HP_type_one';
|
||||
WHEN '47' THEN SET `token` = 'HP_type_two';
|
||||
WHEN '48' THEN SET `token` = 'Illusion_Other';
|
||||
WHEN '49' THEN SET `token` = 'Illusion_Player';
|
||||
WHEN '50' THEN SET `token` = 'Imbue_Gem';
|
||||
WHEN '51' THEN SET `token` = 'Invisibility';
|
||||
WHEN '52' THEN SET `token` = 'Invulnerability';
|
||||
WHEN '53' THEN SET `token` = 'Jolt';
|
||||
WHEN '54' THEN SET `token` = 'Kunark';
|
||||
WHEN '55' THEN SET `token` = 'Levitate';
|
||||
WHEN '56' THEN SET `token` = 'Life_Flow';
|
||||
WHEN '57' THEN SET `token` = 'Luclin';
|
||||
WHEN '58' THEN SET `token` = 'Magic';
|
||||
WHEN '59' THEN SET `token` = 'Mana';
|
||||
WHEN '60' THEN SET `token` = 'Mana_Drain';
|
||||
WHEN '61' THEN SET `token` = 'Mana_Flow';
|
||||
WHEN '62' THEN SET `token` = 'Melee_Guard';
|
||||
WHEN '63' THEN SET `token` = 'Memory_Blur';
|
||||
WHEN '64' THEN SET `token` = 'Misc';
|
||||
WHEN '65' THEN SET `token` = 'Movement';
|
||||
WHEN '66' THEN SET `token` = 'Objects';
|
||||
WHEN '67' THEN SET `token` = 'Odus';
|
||||
WHEN '68' THEN SET `token` = 'Offensive';
|
||||
WHEN '69' THEN SET `token` = 'Pet';
|
||||
WHEN '70' THEN SET `token` = 'Pet_Haste';
|
||||
WHEN '71' THEN SET `token` = 'Pet_Misc_Buffs';
|
||||
WHEN '72' THEN SET `token` = 'Physical';
|
||||
WHEN '73' THEN SET `token` = 'Picklock';
|
||||
WHEN '74' THEN SET `token` = 'Plant';
|
||||
WHEN '75' THEN SET `token` = 'Poison';
|
||||
WHEN '76' THEN SET `token` = 'Power_Tap';
|
||||
WHEN '77' THEN SET `token` = 'Quick_Heal';
|
||||
WHEN '78' THEN SET `token` = 'Reflection';
|
||||
WHEN '79' THEN SET `token` = 'Regen';
|
||||
WHEN '80' THEN SET `token` = 'Resist_Buff';
|
||||
WHEN '81' THEN SET `token` = 'Resist_Debuffs';
|
||||
WHEN '82' THEN SET `token` = 'Resurrection';
|
||||
WHEN '83' THEN SET `token` = 'Root';
|
||||
WHEN '84' THEN SET `token` = 'Rune';
|
||||
WHEN '85' THEN SET `token` = 'Sense_Trap';
|
||||
WHEN '86' THEN SET `token` = 'Shadowstep';
|
||||
WHEN '87' THEN SET `token` = 'Shielding';
|
||||
WHEN '88' THEN SET `token` = 'Slow';
|
||||
WHEN '89' THEN SET `token` = 'Snare';
|
||||
WHEN '90' THEN SET `token` = 'Special';
|
||||
WHEN '91' THEN SET `token` = 'Spell_Focus';
|
||||
WHEN '92' THEN SET `token` = 'Spell_Guard';
|
||||
WHEN '93' THEN SET `token` = 'Spellshield';
|
||||
WHEN '94' THEN SET `token` = 'Stamina';
|
||||
WHEN '95' THEN SET `token` = 'Statistic_Buffs';
|
||||
WHEN '96' THEN SET `token` = 'Strength';
|
||||
WHEN '97' THEN SET `token` = 'Stun';
|
||||
WHEN '98' THEN SET `token` = 'Sum_Air';
|
||||
WHEN '99' THEN SET `token` = 'Sum_Animation';
|
||||
WHEN '100' THEN SET `token` = 'Sum_Earth';
|
||||
WHEN '101' THEN SET `token` = 'Sum_Familiar';
|
||||
WHEN '102' THEN SET `token` = 'Sum_Fire';
|
||||
WHEN '103' THEN SET `token` = 'Sum_Undead';
|
||||
WHEN '104' THEN SET `token` = 'Sum_Warder';
|
||||
WHEN '105' THEN SET `token` = 'Sum_Water';
|
||||
WHEN '106' THEN SET `token` = 'Summon_Armor';
|
||||
WHEN '107' THEN SET `token` = 'Summon_Focus';
|
||||
WHEN '108' THEN SET `token` = 'Summon_Food_Water';
|
||||
WHEN '109' THEN SET `token` = 'Summon_Utility';
|
||||
WHEN '110' THEN SET `token` = 'Summon_Weapon';
|
||||
WHEN '111' THEN SET `token` = 'Summoned';
|
||||
WHEN '112' THEN SET `token` = 'Symbol';
|
||||
WHEN '113' THEN SET `token` = 'Taelosia';
|
||||
WHEN '114' THEN SET `token` = 'Taps';
|
||||
WHEN '115' THEN SET `token` = 'Techniques';
|
||||
WHEN '116' THEN SET `token` = 'The_Planes';
|
||||
WHEN '117' THEN SET `token` = 'Timer_1';
|
||||
WHEN '118' THEN SET `token` = 'Timer_2';
|
||||
WHEN '119' THEN SET `token` = 'Timer_3';
|
||||
WHEN '120' THEN SET `token` = 'Timer_4';
|
||||
WHEN '121' THEN SET `token` = 'Timer_5';
|
||||
WHEN '122' THEN SET `token` = 'Timer_6';
|
||||
WHEN '123' THEN SET `token` = 'Transport';
|
||||
WHEN '124' THEN SET `token` = 'Undead';
|
||||
WHEN '125' THEN SET `token` = 'Utility_Beneficial';
|
||||
WHEN '126' THEN SET `token` = 'Utility_Detrimental';
|
||||
WHEN '127' THEN SET `token` = 'Velious';
|
||||
WHEN '128' THEN SET `token` = 'Visages';
|
||||
WHEN '129' THEN SET `token` = 'Vision';
|
||||
WHEN '130' THEN SET `token` = 'Wisdom_Intelligence';
|
||||
WHEN '131' THEN SET `token` = 'Traps';
|
||||
WHEN '132' THEN SET `token` = 'Auras';
|
||||
WHEN '133' THEN SET `token` = 'Endurance';
|
||||
WHEN '134' THEN SET `token` = 'Serpent\'s_Spine';
|
||||
WHEN '135' THEN SET `token` = 'Corruption';
|
||||
WHEN '136' THEN SET `token` = 'Learning';
|
||||
WHEN '137' THEN SET `token` = 'Chromatic';
|
||||
WHEN '138' THEN SET `token` = 'Prismatic';
|
||||
WHEN '139' THEN SET `token` = 'Sum_Swarm';
|
||||
WHEN '140' THEN SET `token` = 'Delayed';
|
||||
WHEN '141' THEN SET `token` = 'Temporary';
|
||||
WHEN '142' THEN SET `token` = 'Twincast';
|
||||
WHEN '143' THEN SET `token` = 'Sum_Bodyguard';
|
||||
WHEN '144' THEN SET `token` = 'Humanoid';
|
||||
WHEN '145' THEN SET `token` = 'Haste_Spell_Focus';
|
||||
WHEN '146' THEN SET `token` = 'Timer_7';
|
||||
WHEN '147' THEN SET `token` = 'Timer_8';
|
||||
WHEN '148' THEN SET `token` = 'Timer_9';
|
||||
WHEN '149' THEN SET `token` = 'Timer_10';
|
||||
WHEN '150' THEN SET `token` = 'Timer_11';
|
||||
WHEN '151' THEN SET `token` = 'Timer_12';
|
||||
WHEN '152' THEN SET `token` = 'Hatred';
|
||||
WHEN '153' THEN SET `token` = 'Fast';
|
||||
WHEN '154' THEN SET `token` = 'Illusion_Special';
|
||||
WHEN '155' THEN SET `token` = 'Timer_13';
|
||||
WHEN '156' THEN SET `token` = 'Timer_14';
|
||||
WHEN '157' THEN SET `token` = 'Timer_15';
|
||||
WHEN '158' THEN SET `token` = 'Timer_16';
|
||||
WHEN '159' THEN SET `token` = 'Timer_17';
|
||||
WHEN '160' THEN SET `token` = 'Timer_18';
|
||||
WHEN '161' THEN SET `token` = 'Timer_19';
|
||||
WHEN '162' THEN SET `token` = 'Timer_20';
|
||||
WHEN '163' THEN SET `token` = 'Alaris';
|
||||
ELSE SET `token` = 'unk';
|
||||
END CASE;
|
||||
|
||||
SET `token` = CONCAT(`token`, '(', `type_description_id`, ')');
|
||||
|
||||
RETURN `token`;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
@@ -43,8 +43,12 @@ if($Config{osname}=~/Win|MS/i){
|
||||
$has_internet_connection = check_internet_connection();
|
||||
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime();
|
||||
|
||||
if(-e "eqemu_server_skip_update.txt"){
|
||||
$skip_self_update_check = 1;
|
||||
}
|
||||
|
||||
#::: Check for script self update
|
||||
do_self_update_check_routine();
|
||||
do_self_update_check_routine() if !$skip_self_update_check;
|
||||
get_perl_version();
|
||||
read_eqemu_config_xml();
|
||||
get_mysql_path();
|
||||
@@ -330,7 +334,7 @@ sub build_linux_source {
|
||||
}
|
||||
print "Building EQEmu Server code. This will take a while.";
|
||||
|
||||
#::: Build
|
||||
#::: Build
|
||||
print `make`;
|
||||
|
||||
chdir ($current_directory);
|
||||
@@ -488,11 +492,11 @@ sub check_internet_connection {
|
||||
$count = "n";
|
||||
}
|
||||
|
||||
if (`ping 8.8.8.8 -$count 1 -w 500`=~/Reply from|1 received/i) {
|
||||
if (`ping 8.8.8.8 -$count 1 -w 500`=~/TTL|1 received/i) {
|
||||
# print "[Update] We have a connection to the internet, continuing...\n";
|
||||
return 1;
|
||||
}
|
||||
elsif (`ping 4.2.2.2 -$count 1 -w 500`=~/Reply from|1 received/i) {
|
||||
elsif (`ping 4.2.2.2 -$count 1 -w 500`=~/TTL|1 received/i) {
|
||||
# print "[Update] We have a connection to the internet, continuing...\n";
|
||||
return 1;
|
||||
}
|
||||
@@ -558,6 +562,7 @@ sub do_self_update_check_routine {
|
||||
}
|
||||
|
||||
unlink("updates_staged/eqemu_server.pl");
|
||||
unlink("updates_staged");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,13 +725,14 @@ sub show_menu_prompt {
|
||||
print " [utility_scripts] Download utility scripts to run and operate the EQEmu Server\n";
|
||||
if($OS eq "Windows"){
|
||||
print ">>> Windows\n";
|
||||
print " [windows_server_download] Updates server code from latest stable\n";
|
||||
print " [windows_server_download_bots] Updates server code (bots enabled) from latest\n";
|
||||
print " [windows_server_download] Updates server via latest 'stable' code\n";
|
||||
print " [windows_server_latest] Updates server via latest commit 'unstable'\n";
|
||||
print " [windows_server_download_bots] Updates server (bots) from latest 'stable'\n";
|
||||
print " [fetch_dlls] Grabs dll's needed to run windows binaries\n";
|
||||
print " [setup_loginserver] Sets up loginserver for Windows\n";
|
||||
}
|
||||
print " \n> main - go back to main menu\n";
|
||||
print "Enter a command #> ";
|
||||
print "Enter a command #> ";
|
||||
$last_menu = trim($input);
|
||||
}
|
||||
elsif($input eq "backup_database"){ database_dump(); $dc = 1; }
|
||||
@@ -741,6 +747,7 @@ sub show_menu_prompt {
|
||||
elsif($input eq "quests"){ quest_files_fetch(); $dc = 1; }
|
||||
elsif($input eq "lua_modules"){ lua_modules_fetch(); $dc = 1; }
|
||||
elsif($input eq "windows_server_download"){ fetch_latest_windows_binaries(); $dc = 1; }
|
||||
elsif($input eq "windows_server_latest"){ fetch_latest_windows_appveyor(); $dc = 1; }
|
||||
elsif($input eq "windows_server_download_bots"){ fetch_latest_windows_binaries_bots(); $dc = 1; }
|
||||
elsif($input eq "fetch_dlls"){ fetch_server_dlls(); $dc = 1; }
|
||||
elsif($input eq "utility_scripts"){ fetch_utility_scripts(); $dc = 1; }
|
||||
@@ -1063,17 +1070,50 @@ sub trim {
|
||||
}
|
||||
|
||||
sub read_eqemu_config_xml {
|
||||
my $confile = "eqemu_config.xml"; #default
|
||||
open(F, "<$confile");
|
||||
my $indb = 0;
|
||||
while(<F>) {
|
||||
s/\r//g;
|
||||
if(/<host>(.*)<\/host>/i) { $host = $1; }
|
||||
elsif(/<username>(.*)<\/username>/i) { $user = $1; }
|
||||
elsif(/<password>(.*)<\/password>/i) { $pass = $1; }
|
||||
elsif(/<db>(.*)<\/db>/i) { $db = $1; }
|
||||
if(/<longname>(.*)<\/longname>/i) { $long_name = $1; }
|
||||
}
|
||||
open (CONFIG, "eqemu_config.xml");
|
||||
while (<CONFIG>){
|
||||
chomp;
|
||||
$o = $_;
|
||||
|
||||
if($o=~/\<\!--/i){
|
||||
next;
|
||||
}
|
||||
|
||||
if($o=~/database/i && $o=~/\<\//i){
|
||||
$in_database_tag = 0;
|
||||
}
|
||||
if($o=~/<database>/i){
|
||||
print "IN DATABASE TAG\n" if $debug;
|
||||
$in_database_tag = 1;
|
||||
}
|
||||
if($o=~/<longname>/i){
|
||||
($long_name) = $o =~ /<longname>(.*)<\/longname>/;
|
||||
print "Long Name: '" . $long_name . "'\n" if $debug;
|
||||
}
|
||||
if($in_database_tag == 1){
|
||||
@left = split (">", $o);
|
||||
@right = split("<", $left[1]);
|
||||
$tag_data = trim($right[0]);
|
||||
|
||||
if($o=~/<username>/i && $in_database_tag){
|
||||
$user = $tag_data;
|
||||
print "Database User: '" . $user . "'\n" if $debug;
|
||||
}
|
||||
if($o=~/<password>/i && $in_database_tag){
|
||||
$pass = $tag_data;
|
||||
print "Database Pass: '" . $pass . "'\n" if $debug;
|
||||
}
|
||||
if($o=~/<db>/i){
|
||||
$db = $tag_data;
|
||||
print "Database Name: '" . $db . "'\n" if $debug;
|
||||
}
|
||||
if($o=~/<host>/i){
|
||||
$host = $tag_data;
|
||||
print "Database Host: '" . $host . "'\n" if $debug;
|
||||
}
|
||||
}
|
||||
}
|
||||
close(CONFIG);
|
||||
}
|
||||
|
||||
#::: Fetch Latest PEQ AA's
|
||||
@@ -1172,6 +1212,31 @@ sub copy_file {
|
||||
copy $l_source_file, $l_destination_file;
|
||||
}
|
||||
|
||||
sub fetch_latest_windows_appveyor {
|
||||
print "[Update] Fetching Latest Windows Binaries (unstable) from Appveyor... \n";
|
||||
get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/build_x86_pdb.zip", "updates_staged/master_windows_build_pdb.zip", 1);
|
||||
get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/build_x86.zip", "updates_staged/master_windows_build.zip", 1);
|
||||
print "[Update] Fetched Latest Windows Binaries (unstable) from Appveyor... \n";
|
||||
print "[Update] Extracting... --- \n";
|
||||
unzip('updates_staged/master_windows_build.zip', 'updates_staged/binaries/');
|
||||
unzip('updates_staged/master_windows_build_pdb.zip', 'updates_staged/binaries/');
|
||||
my @files;
|
||||
my $start_dir = "updates_staged/binaries";
|
||||
find(
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
$destination_file = $file;
|
||||
$destination_file =~s/updates_staged\/binaries\///g;
|
||||
print "[Update] Installing :: " . $destination_file . "\n";
|
||||
copy_file($file, $destination_file);
|
||||
}
|
||||
print "[Update] Done\n";
|
||||
|
||||
rmtree('updates_staged');
|
||||
}
|
||||
|
||||
sub fetch_latest_windows_binaries {
|
||||
print "[Update] Fetching Latest Windows Binaries... \n";
|
||||
get_remote_file($install_repository_request_url . "master_windows_build.zip", "updates_staged/master_windows_build.zip", 1);
|
||||
@@ -1275,7 +1340,7 @@ sub do_linux_login_server_setup {
|
||||
|
||||
get_remote_file($install_repository_request_url . "linux/login.ini", "login_template.ini");
|
||||
get_remote_file($install_repository_request_url . "linux/login_opcodes.conf", "login_opcodes.conf");
|
||||
get_remote_file($install_repository_request_url . "linux/login_opcodes.conf", "login_opcodes_sod.conf");
|
||||
get_remote_file($install_repository_request_url . "linux/login_opcodes_sod.conf", "login_opcodes_sod.conf");
|
||||
|
||||
get_installation_variables();
|
||||
my $db_name = $installation_variables{"mysql_eqemu_db_name"};
|
||||
@@ -2154,4 +2219,4 @@ sub generate_random_password {
|
||||
map $alphanumeric[rand @alphanumeric], 0..$passwordsize;
|
||||
|
||||
return $randpassword;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ echo "mysql_eqemu_password:$eqemu_db_password" >> install_variables.txt
|
||||
|
||||
if [[ "$OS" == "Debian" ]]; then
|
||||
# Install pre-req packages
|
||||
apt-get -y update
|
||||
apt-get $apt_options install bash
|
||||
apt-get $apt_options install build-essential
|
||||
apt-get $apt_options install cmake
|
||||
@@ -105,6 +106,8 @@ if [[ "$OS" == "Debian" ]]; then
|
||||
apt-get $apt_options install libperl-dev
|
||||
apt-get $apt_options install libperl5i-perl
|
||||
apt-get $apt_options install libwtdbomysql-dev
|
||||
apt-get $apt_options install libmysqlclient-dev
|
||||
apt-get $apt_options install minizip
|
||||
apt-get $apt_options install lua5.1
|
||||
apt-get $apt_options install make
|
||||
apt-get $apt_options install mariadb-client
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
command_settings
|
||||
launcher
|
||||
rule_sets
|
||||
rule_values
|
||||
variables
|
||||
@@ -354,6 +354,13 @@
|
||||
9098|2016_08_26_object_size_tilt.sql|SHOW COLUMNS FROM `object` LIKE 'size'|empty|
|
||||
9099|2016_08_27_ip_exemptions.sql|SHOW TABLES LIKE 'ip_exemptions'|empty|
|
||||
9100|2016_08_27_object_display_name.sql|SHOW COLUMNS FROM `object` LIKE 'display_name'|empty|
|
||||
9101|2016_12_01_pcnpc_only.sql|SHOW COLUMNS FROM `spells_new` LIKE 'pcnpc_only_flag'|empty|
|
||||
9102|2017_01_10_book_languages.sql|SHOW COLUMNS FROM `books` LIKE 'language'|empty|
|
||||
9103|2017_01_30_book_languages_fix.sql|SELECT `language` from `books` WHERE `language` IS NULL|not_empty|
|
||||
9104|2017_02_09_npc_spells_entries_type_update.sql|SHOW COLUMNS IN `npc_spells_entries` LIKE `type`|contains|smallint(5) unsigned
|
||||
9105|2017_02_15_bot_spells_entries.sql|SELECT `id` FROM `npc_spells_entries` WHERE `npc_spells_id` >= 701 AND `npc_spells_id` <= 712|not_empty|
|
||||
9106|2017_02_26_npc_spells_update_for_bots.sql|SELECT * FROM `npc_spells` WHERE `id` = '701' AND `name` = 'Cleric Bot'|not_empty|
|
||||
9107|2017_03_09_inventory_version.sql|SHOW TABLES LIKE 'inventory_version'|empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
9006|2016_04_12_bots_inventory_window.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'inventorywindow'|empty|
|
||||
9007|2016_06_23_bots_camel_case_name_rule.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE 'Bots:AllowCamelCaseNames'|empty|
|
||||
9008|2016_06_28_bots_inventory_charges_update.sql|SELECT * FROM `information_schema`.`COLUMNS` isc WHERE isc.`TABLE_SCHEMA` = DATABASE() AND isc.`TABLE_NAME` = 'bot_inventories' AND isc.`COLUMN_NAME` = 'inst_charges' AND isc.`DATA_TYPE` = 'tinyint'|not_empty|
|
||||
9009|2017_02_15_bots_bot_spells_entries.sql|SELECT `id` FROM `npc_spells_entries` WHERE `npc_spells_id` >= 701 AND `npc_spells_id` <= 712|not_empty|
|
||||
9010|2017_02_20_bots_bard_spell_update.sql|SELECT * FROM `bot_spells_entries` WHERE `npc_spells_id` = 711 AND (`type` & 0xFFFF0000) = 0xFFFF0000|empty|
|
||||
9011|2017_02_23_bots_spell_casting_chances.sql|SHOW TABLES LIKE 'bot_spell_casting_chances'|empty|
|
||||
9012|2017_02_26_bots_npc_spells_update_for_bots.sql|SELECT * FROM `npc_spells` WHERE `id` = '701' AND `name` = 'Cleric Bot'|not_empty|
|
||||
9013|2017_02_26_bots_spells_id_update_for_saved_bots.sql|SELECT * FROM `bot_data` WHERE `spells_id` >= '701' AND `spells_id` <= '712'|not_empty|
|
||||
9014|2017_02_26_bots_spells_id_update_for_bot_spells_entries.sql|SELECT * FROM `bot_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712'|not_empty|
|
||||
9015|2017_02_26_bots_spell_casting_chances_update.sql|SHOW COLUMNS FROM `bot_spell_casting_chances` LIKE 'value'|not_empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.');
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (2, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.');
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (4, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.');
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (10, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.');
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.');
|
||||
@@ -0,0 +1,2 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:CasterStopMeleeLevel', '13', 'Level at which caster bots stop melee attacks');
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:UpdatePositionWithTimer', 'true', 'Sends a position update with every positive movement timer check');
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:UsePathing', 'false', 'Bots will use node pathing when moving');
|
||||
@@ -0,0 +1,29 @@
|
||||
-- Delete any existing `bots_spells_entries` table
|
||||
DROP TABLE IF EXISTS `bots_spells_entries`;
|
||||
|
||||
-- Create new bot spells entries table (new table does not have spells_id_spellid constraint)
|
||||
CREATE TABLE `bot_spells_entries` (
|
||||
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`npc_spells_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`spellid` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`type` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`minlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`maxlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255',
|
||||
`manacost` SMALLINT(5) NOT NULL DEFAULT '-1',
|
||||
`recast_delay` INT(11) NOT NULL DEFAULT '-1',
|
||||
`priority` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`resist_adjust` INT(11) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='latin1_swedish_ci'
|
||||
ENGINE=InnoDB
|
||||
AUTO_INCREMENT=1
|
||||
;
|
||||
|
||||
-- Copy bots spells into new table
|
||||
INSERT INTO `bot_spells_entries` (`npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`)
|
||||
SELECT `npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`
|
||||
FROM `npc_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712';
|
||||
|
||||
-- Delete bot spells from old table
|
||||
DELETE FROM `npc_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712';
|
||||
@@ -0,0 +1,153 @@
|
||||
DELETE FROM `bot_spells_entries` WHERE `npc_spells_id` = '711';
|
||||
|
||||
INSERT INTO `bot_spells_entries`(`npc_spells_id`,`spellid`,`type`,`minlevel`,`maxlevel`,`manacost`,`recast_delay`,`priority`,`resist_adjust`) VALUES
|
||||
|
||||
-- versioning entry
|
||||
('711', '0', '4294901760', '0', '0', '-1', '-1', '0', NULL), -- 0xFFFF0000
|
||||
|
||||
-- nuke
|
||||
('711', '704', '1', '12', '54', '-1', '-1', '1', NULL),
|
||||
('711', '1747', '1', '55', '127', '-1', '-1', '1', NULL),
|
||||
|
||||
-- escape
|
||||
('711', '1749', '16', '60', '127', '-1', '-1', '1', NULL),
|
||||
|
||||
-- dot
|
||||
('711', '743', '256', '38', '64', '-1', '-1', '1', NULL),
|
||||
('711', '3367', '256', '65', '69', '-1', '-1', '1', NULL),
|
||||
('711', '5385', '256', '70', '79', '-1', '-1', '1', NULL),
|
||||
('711', '14074', '256', '80', '84', '-1', '-1', '1', NULL),
|
||||
('711', '18059', '256', '85', '89', '-1', '-1', '1', NULL),
|
||||
('711', '26084', '256', '90', '94', '-1', '-1', '1', NULL),
|
||||
('711', '29182', '256', '95', '127', '-1', '-1', '1', NULL),
|
||||
('711', '3566', '256', '50', '62', '-1', '-1', '2', NULL),
|
||||
('711', '3370', '256', '63', '67', '-1', '-1', '2', NULL),
|
||||
('711', '5378', '256', '68', '77', '-1', '-1', '2', NULL),
|
||||
('711', '14071', '256', '78', '82', '-1', '-1', '2', NULL),
|
||||
('711', '18056', '256', '83', '87', '-1', '-1', '2', NULL),
|
||||
('711', '26033', '256', '88', '92', '-1', '-1', '2', NULL),
|
||||
('711', '29128', '256', '93', '127', '-1', '-1', '2', NULL),
|
||||
('711', '744', '256', '46', '62', '-1', '-1', '3', NULL),
|
||||
('711', '3373', '256', '63', '66', '-1', '-1', '3', NULL),
|
||||
('711', '5379', '256', '67', '76', '-1', '-1', '3', NULL),
|
||||
('711', '14068', '256', '77', '81', '-1', '-1', '3', NULL),
|
||||
('711', '18053', '256', '82', '86', '-1', '-1', '3', NULL),
|
||||
('711', '26003', '256', '87', '91', '-1', '-1', '3', NULL),
|
||||
('711', '29101', '256', '92', '127', '-1', '-1', '3', NULL),
|
||||
('711', '3567', '256', '42', '60', '-1', '-1', '4', NULL),
|
||||
('711', '3363', '256', '61', '65', '-1', '-1', '4', NULL),
|
||||
('711', '5371', '256', '66', '75', '-1', '-1', '4', NULL),
|
||||
('711', '14065', '256', '76', '80', '-1', '-1', '4', NULL),
|
||||
('711', '18050', '256', '81', '85', '-1', '-1', '4', NULL),
|
||||
('711', '25976', '256', '86', '90', '-1', '-1', '4', NULL),
|
||||
('711', '29077', '256', '91', '127', '-1', '-1', '4', NULL),
|
||||
('711', '707', '256', '30', '59', '-1', '-1', '5', NULL),
|
||||
('711', '4210', '256', '60', '127', '-1', '-1', '5', NULL),
|
||||
|
||||
-- slow
|
||||
('711', '738', '8192', '23', '50', '-1', '-1', '1', NULL),
|
||||
('711', '1751', '8192', '51', '59', '-1', '-1', '1', NULL),
|
||||
('711', '1748', '8192', '60', '63', '-1', '-1', '1', NULL),
|
||||
('711', '3066', '8192', '64', '127', '-1', '-1', '1', NULL),
|
||||
('711', '738', '8192', '51', '63', '-1', '-1', '2', NULL),
|
||||
('711', '1751', '8192', '64', '127', '-1', '-1', '2', NULL),
|
||||
('711', '738', '8192', '64', '127', '-1', '-1', '3', NULL),
|
||||
|
||||
-- cure
|
||||
('711', '3682', '32768', '45', '85', '-1', '-1', '1', NULL),
|
||||
('711', '25958', '32768', '86', '90', '-1', '-1', '1', NULL),
|
||||
('711', '29059', '32768', '91', '127', '-1', '-1', '1', NULL),
|
||||
('711', '3681', '32768', '52', '127', '-1', '-1', '2', NULL),
|
||||
('711', '10448', '32768', '74', '78', '-1', '-1', '3', NULL),
|
||||
('711', '14029', '32768', '79', '83', '-1', '-1', '3', NULL),
|
||||
('711', '18023', '32768', '84', '127', '-1', '-1', '3', NULL),
|
||||
|
||||
-- hate redux
|
||||
('711', '1754', '131072', '53', '127', '-1', '-1', '1', NULL),
|
||||
('711', '10436', '131072', '73', '127', '-1', '-1', '2', NULL),
|
||||
|
||||
-- in-combat buff songs
|
||||
('711', '2606', '262144', '52', '59', '-1', '-1', '1', NULL),
|
||||
('711', '2610', '262144', '60', '127', '-1', '-1', '1', NULL),
|
||||
('711', '700', '262144', '1', '9', '-1', '-1', '2', NULL),
|
||||
('711', '701', '262144', '10', '35', '-1', '-1', '2', NULL),
|
||||
('711', '740', '262144', '36', '41', '-1', '-1', '2', NULL),
|
||||
('711', '702', '262144', '42', '49', '-1', '-1', '2', NULL),
|
||||
('711', '747', '262144', '50', '61', '-1', '-1', '2', NULL),
|
||||
('711', '3374', '262144', '62', '64', '-1', '-1', '2', NULL),
|
||||
('711', '4871', '262144', '65', '67', '-1', '-1', '2', NULL),
|
||||
('711', '5376', '262144', '68', '78', '-1', '-1', '2', NULL),
|
||||
('711', '14080', '262144', '79', '83', '-1', '-1', '2', NULL),
|
||||
('711', '18065', '262144', '84', '88', '-1', '-1', '2', NULL),
|
||||
('711', '26042', '262144', '89', '93', '-1', '-1', '2', NULL),
|
||||
('711', '29143', '262144', '94', '127', '-1', '-1', '2', NULL),
|
||||
('711', '7', '262144', '6', '19', '-1', '-1', '2', NULL),
|
||||
('711', '1287', '262144', '20', '31', '-1', '-1', '3', NULL),
|
||||
('711', '723', '262144', '32', '33', '-1', '-1', '3', NULL),
|
||||
('711', '1448', '262144', '34', '54', '-1', '-1', '3', NULL),
|
||||
('711', '1759', '262144', '55', '61', '-1', '-1', '3', NULL),
|
||||
('711', '3651', '262144', '62', '66', '-1', '-1', '3', NULL),
|
||||
('711', '5377', '262144', '67', '70', '-1', '-1', '3', NULL),
|
||||
('711', '10421', '262144', '71', '75', '-1', '-1', '3', NULL),
|
||||
('711', '14008', '262144', '76', '80', '-1', '-1', '3', NULL),
|
||||
('711', '18008', '262144', '81', '87', '-1', '-1', '3', NULL),
|
||||
('711', '26015', '262144', '88', '92', '-1', '-1', '3', NULL),
|
||||
('711', '29107', '262144', '93', '127', '-1', '-1', '3', NULL),
|
||||
('711', '734', '262144', '7', '8', '-1', '-1', '4', NULL),
|
||||
('711', '710', '262144', '9', '12', '-1', '-1', '4', NULL),
|
||||
('711', '711', '262144', '13', '16', '-1', '-1', '4', NULL),
|
||||
('711', '709', '262144', '17', '40', '-1', '-1', '4', NULL),
|
||||
('711', '714', '262144', '41', '46', '-1', '-1', '4', NULL),
|
||||
('711', '748', '262144', '47', '57', '-1', '-1', '4', NULL),
|
||||
('711', '1763', '262144', '58', '72', '-1', '-1', '4', NULL),
|
||||
('711', '11881', '262144', '73', '77', '-1', '-1', '4', NULL),
|
||||
('711', '14056', '262144', '78', '82', '-1', '-1', '4', NULL),
|
||||
('711', '18041', '262144', '83', '87', '-1', '-1', '4', NULL),
|
||||
('711', '26027', '262144', '88', '92', '-1', '-1', '4', NULL),
|
||||
('711', '29122', '262144', '93', '127', '-1', '-1', '4', NULL),
|
||||
('711', '734', '262144', '9', '24', '-1', '-1', '5', NULL),
|
||||
('711', '712', '262144', '25', '28', '-1', '-1', '5', NULL),
|
||||
('711', '715', '262144', '29', '32', '-1', '-1', '5', NULL),
|
||||
('711', '713', '262144', '33', '36', '-1', '-1', '5', NULL),
|
||||
('711', '716', '262144', '37', '44', '-1', '-1', '5', NULL),
|
||||
('711', '4083', '262144', '45', '52', '-1', '-1', '5', NULL),
|
||||
('711', '4084', '262144', '53', '63', '-1', '-1', '5', NULL),
|
||||
('711', '3362', '262144', '64', '64', '-1', '-1', '5', NULL),
|
||||
('711', '4872', '262144', '65', '68', '-1', '-1', '5', NULL),
|
||||
('711', '5382', '262144', '69', '75', '-1', '-1', '5', NULL),
|
||||
('711', '14062', '262144', '76', '80', '-1', '-1', '5', NULL),
|
||||
('711', '18047', '262144', '81', '85', '-1', '-1', '5', NULL),
|
||||
('711', '25961', '262144', '86', '90', '-1', '-1', '5', NULL),
|
||||
('711', '29062', '262144', '91', '127', '-1', '-1', '5', NULL),
|
||||
('711', '734', '262144', '25', '43', '-1', '-1', '6', NULL),
|
||||
('711', '4085', '262144', '44', '51', '-1', '-1', '6', NULL),
|
||||
('711', '4086', '262144', '52', '62', '-1', '-1', '6', NULL),
|
||||
('711', '4087', '262144', '63', '68', '-1', '-1', '6', NULL),
|
||||
('711', '5374', '262144', '69', '71', '-1', '-1', '6', NULL),
|
||||
('711', '10439', '262144', '72', '76', '-1', '-1', '6', NULL),
|
||||
('711', '14020', '262144', '77', '81', '-1', '-1', '6', NULL),
|
||||
('711', '18014', '262144', '82', '86', '-1', '-1', '6', NULL),
|
||||
('711', '25991', '262144', '87', '127', '-1', '-1', '6', NULL),
|
||||
('711', '734', '262144', '30', '82', '-1', '-1', '7', NULL),
|
||||
('711', '18020', '262144', '83', '127', '-1', '-1', '7', NULL),
|
||||
('711', '734', '262144', '83', '127', '-1', '-1', '8', NULL),
|
||||
('711', '2603', '262144', '30', '127', '-1', '-1', '9', NULL),
|
||||
|
||||
-- out-of-combat buff songs
|
||||
('711', '7', '524288', '6', '19', '-1', '-1', '1', NULL),
|
||||
('711', '1287', '524288', '20', '31', '-1', '-1', '1', NULL),
|
||||
('711', '723', '524288', '32', '33', '-1', '-1', '1', NULL),
|
||||
('711', '1448', '524288', '34', '54', '-1', '-1', '1', NULL),
|
||||
('711', '1759', '524288', '55', '61', '-1', '-1', '1', NULL),
|
||||
('711', '3651', '524288', '62', '66', '-1', '-1', '1', NULL),
|
||||
('711', '5377', '524288', '67', '70', '-1', '-1', '1', NULL),
|
||||
('711', '10421', '524288', '71', '75', '-1', '-1', '1', NULL),
|
||||
('711', '14008', '524288', '76', '80', '-1', '-1', '1', NULL),
|
||||
('711', '18008', '524288', '81', '87', '-1', '-1', '1', NULL),
|
||||
('711', '26015', '524288', '88', '92', '-1', '-1', '1', NULL),
|
||||
('711', '29107', '524288', '93', '127', '-1', '-1', '1', NULL),
|
||||
('711', '717', '524288', '5', '29', '-1', '-1','2', NULL),
|
||||
('711', '2603', '524288', '30', '127', '-1', '-1','2', NULL),
|
||||
('711', '717', '524288', '30', '48', '-1', '-1','3', NULL),
|
||||
('711', '2605', '524288', '49', '127', '-1', '-1','3', NULL),
|
||||
('711', '2602', '524288', '15', '127', '-1', '-1','4', NULL);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
-- Re-ordered entries according to actual class values and added melee types (for future expansion)
|
||||
DELETE FROM `npc_spells` WHERE `id` >= '701' AND `id` <= '712';
|
||||
|
||||
INSERT INTO `npc_spells` VALUES (3001, 'Warrior Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3002, 'Cleric Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3003, 'Paladin Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3004, 'Ranger Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3005, 'Shadowknight Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3006, 'Druid Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3007, 'Monk Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3008, 'Bard Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3009, 'Rogue Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3010, 'Shaman Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3011, 'Necromancer Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3012, 'Wizard Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3013, 'Magician Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3014, 'Enchanter Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3015, 'Beastlord Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3016, 'Berserker Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
File diff suppressed because it is too large
Load Diff
+13
@@ -0,0 +1,13 @@
|
||||
-- Update npc_spells_id to new values
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3002' WHERE `npc_spells_id` = '701';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3012' WHERE `npc_spells_id` = '702';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3011' WHERE `npc_spells_id` = '703';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3013' WHERE `npc_spells_id` = '704';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3014' WHERE `npc_spells_id` = '705';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3010' WHERE `npc_spells_id` = '706';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3006' WHERE `npc_spells_id` = '707';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3003' WHERE `npc_spells_id` = '708';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3005' WHERE `npc_spells_id` = '709';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3004' WHERE `npc_spells_id` = '710';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3008' WHERE `npc_spells_id` = '711';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3015' WHERE `npc_spells_id` = '712';
|
||||
@@ -0,0 +1,17 @@
|
||||
-- Update spells_id to new values
|
||||
UPDATE `bot_data` SET `spells_id` = '3001' WHERE `class` = '1';
|
||||
UPDATE `bot_data` SET `spells_id` = '3002' WHERE `class` = '2';
|
||||
UPDATE `bot_data` SET `spells_id` = '3003' WHERE `class` = '3';
|
||||
UPDATE `bot_data` SET `spells_id` = '3004' WHERE `class` = '4';
|
||||
UPDATE `bot_data` SET `spells_id` = '3005' WHERE `class` = '5';
|
||||
UPDATE `bot_data` SET `spells_id` = '3006' WHERE `class` = '6';
|
||||
UPDATE `bot_data` SET `spells_id` = '3007' WHERE `class` = '7';
|
||||
UPDATE `bot_data` SET `spells_id` = '3008' WHERE `class` = '8';
|
||||
UPDATE `bot_data` SET `spells_id` = '3009' WHERE `class` = '9';
|
||||
UPDATE `bot_data` SET `spells_id` = '3010' WHERE `class` = '10';
|
||||
UPDATE `bot_data` SET `spells_id` = '3011' WHERE `class` = '11';
|
||||
UPDATE `bot_data` SET `spells_id` = '3012' WHERE `class` = '12';
|
||||
UPDATE `bot_data` SET `spells_id` = '3013' WHERE `class` = '13';
|
||||
UPDATE `bot_data` SET `spells_id` = '3014' WHERE `class` = '14';
|
||||
UPDATE `bot_data` SET `spells_id` = '3015' WHERE `class` = '15';
|
||||
UPDATE `bot_data` SET `spells_id` = '3016' WHERE `class` = '16';
|
||||
@@ -0,0 +1 @@
|
||||
UPDATE ground_spawns SET max_z = -99999 WHERE max_x != min_x OR max_y != min_y
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Character:GrantHoTTOnCreate', 'false', 'Grant Health of Target\'s Target leadership AA on character creation');
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user