mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Pre-purposed clean-up
This commit is contained in:
parent
b48a712887
commit
f1a25da065
@ -1,3 +1,24 @@
|
|||||||
|
/*
|
||||||
|
EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2015 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 CLIENTVERSIONS_H
|
#ifndef CLIENTVERSIONS_H
|
||||||
#define CLIENTVERSIONS_H
|
#define CLIENTVERSIONS_H
|
||||||
|
|
||||||
@ -46,29 +67,29 @@ static const char* ClientVersionName(ClientVersion version)
|
|||||||
switch (version)
|
switch (version)
|
||||||
{
|
{
|
||||||
case ClientVersion::Unknown:
|
case ClientVersion::Unknown:
|
||||||
return "ClientVersion::Unknown";
|
return "Unknown";
|
||||||
case ClientVersion::Client62:
|
case ClientVersion::Client62:
|
||||||
return "ClientVersion::Client62";
|
return "Client62";
|
||||||
case ClientVersion::Titanium:
|
case ClientVersion::Titanium:
|
||||||
return "ClientVersion::Titanium";
|
return "Titanium";
|
||||||
case ClientVersion::SoF:
|
case ClientVersion::SoF:
|
||||||
return "ClientVersion::SoF";
|
return "SoF";
|
||||||
case ClientVersion::SoD:
|
case ClientVersion::SoD:
|
||||||
return "ClientVersion::SoD";
|
return "SoD";
|
||||||
case ClientVersion::UF:
|
case ClientVersion::UF:
|
||||||
return "ClientVersion::UF";
|
return "UF";
|
||||||
case ClientVersion::RoF:
|
case ClientVersion::RoF:
|
||||||
return "ClientVersion::RoF";
|
return "RoF";
|
||||||
case ClientVersion::RoF2:
|
case ClientVersion::RoF2:
|
||||||
return "ClientVersion::RoF2";
|
return "RoF2";
|
||||||
case ClientVersion::MobNPC:
|
case ClientVersion::MobNPC:
|
||||||
return "ClientVersion::MobNPC";
|
return "MobNPC";
|
||||||
case ClientVersion::MobMerc:
|
case ClientVersion::MobMerc:
|
||||||
return "ClientVersion::MobMerc";
|
return "MobMerc";
|
||||||
case ClientVersion::MobBot:
|
case ClientVersion::MobBot:
|
||||||
return "ClientVersion::MobBot";
|
return "MobBot";
|
||||||
case ClientVersion::MobPet:
|
case ClientVersion::MobPet:
|
||||||
return "ClientVersion::MobPet";
|
return "MobPet";
|
||||||
default:
|
default:
|
||||||
return "<ERROR> Invalid ClientVersion";
|
return "<ERROR> Invalid ClientVersion";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -157,18 +157,26 @@ namespace Convert {
|
|||||||
/*84*/ uint32 Points;
|
/*84*/ uint32 Points;
|
||||||
/*88*/
|
/*88*/
|
||||||
} PVPStatsEntry_Struct;
|
} PVPStatsEntry_Struct;
|
||||||
|
|
||||||
struct BandolierItem_Struct {
|
struct BandolierItem_Struct {
|
||||||
uint32 item_id;
|
uint32 ID;
|
||||||
uint32 icon;
|
uint32 Icon;
|
||||||
char item_name[64];
|
char Name[64];
|
||||||
};
|
};
|
||||||
struct Bandolier_Struct {
|
struct Bandolier_Struct {
|
||||||
char name[32];
|
char Name[32];
|
||||||
Convert::BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
|
Convert::BandolierItem_Struct Items[EmuConstants::BANDOLIER_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PotionBeltItem_Struct {
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
};
|
};
|
||||||
struct PotionBelt_Struct {
|
struct PotionBelt_Struct {
|
||||||
Convert::BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
|
Convert::PotionBeltItem_Struct Items[EmuConstants::POTION_BELT_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SuspendedMinion_Struct
|
struct SuspendedMinion_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint16 SpellID;
|
/*000*/ uint16 SpellID;
|
||||||
@ -1431,14 +1439,14 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
|||||||
/* Run Bandolier Convert */
|
/* Run Bandolier Convert */
|
||||||
first_entry = 0; rquery = "";
|
first_entry = 0; rquery = "";
|
||||||
for (i = 0; i < EmuConstants::BANDOLIERS_COUNT; i++){
|
for (i = 0; i < EmuConstants::BANDOLIERS_COUNT; i++){
|
||||||
if (strlen(pp->bandoliers[i].name) < 32) {
|
if (strlen(pp->bandoliers[i].Name) < 32) {
|
||||||
for (int si = 0; si < EmuConstants::BANDOLIER_SIZE; si++){
|
for (int si = 0; si < EmuConstants::BANDOLIER_SIZE; si++){
|
||||||
if (pp->bandoliers[i].items[si].item_id > 0){
|
if (pp->bandoliers[i].Items[si].ID > 0){
|
||||||
if (first_entry != 1) {
|
if (first_entry != 1) {
|
||||||
rquery = StringFormat("REPLACE INTO `character_bandolier` (id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name) VALUES (%i, %u, %i, %u, %u, '%s')", character_id, i, si, pp->bandoliers[i].items[si].item_id, pp->bandoliers[i].items[si].icon, pp->bandoliers[i].name);
|
rquery = StringFormat("REPLACE INTO `character_bandolier` (id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name) VALUES (%i, %u, %i, %u, %u, '%s')", character_id, i, si, pp->bandoliers[i].Items[si].ID, pp->bandoliers[i].Items[si].Icon, pp->bandoliers[i].Name);
|
||||||
first_entry = 1;
|
first_entry = 1;
|
||||||
}
|
}
|
||||||
rquery = rquery + StringFormat(", (%i, %u, %i, %u, %u, '%s')", character_id, i, si, pp->bandoliers[i].items[si].item_id, pp->bandoliers[i].items[si].icon, pp->bandoliers[i].name);
|
rquery = rquery + StringFormat(", (%i, %u, %i, %u, %u, '%s')", character_id, i, si, pp->bandoliers[i].Items[si].ID, pp->bandoliers[i].Items[si].Icon, pp->bandoliers[i].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1447,12 +1455,12 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
|||||||
/* Run Potion Belt Convert */
|
/* Run Potion Belt Convert */
|
||||||
first_entry = 0; rquery = "";
|
first_entry = 0; rquery = "";
|
||||||
for (i = 0; i < EmuConstants::POTION_BELT_SIZE; i++){
|
for (i = 0; i < EmuConstants::POTION_BELT_SIZE; i++){
|
||||||
if (pp->potionbelt.items[i].item_id > 0){
|
if (pp->potionbelt.Items[i].ID > 0){
|
||||||
if (first_entry != 1){
|
if (first_entry != 1){
|
||||||
rquery = StringFormat("REPLACE INTO `character_potionbelt` (id, potion_id, item_id, icon) VALUES (%i, %u, %u, %u)", character_id, i, pp->potionbelt.items[i].item_id, pp->potionbelt.items[i].icon);
|
rquery = StringFormat("REPLACE INTO `character_potionbelt` (id, potion_id, item_id, icon) VALUES (%i, %u, %u, %u)", character_id, i, pp->potionbelt.Items[i].ID, pp->potionbelt.Items[i].Icon);
|
||||||
first_entry = 1;
|
first_entry = 1;
|
||||||
}
|
}
|
||||||
rquery = rquery + StringFormat(", (%i, %u, %u, %u)", character_id, i, pp->potionbelt.items[i].item_id, pp->potionbelt.items[i].icon);
|
rquery = rquery + StringFormat(", (%i, %u, %u, %u)", character_id, i, pp->potionbelt.Items[i].ID, pp->potionbelt.Items[i].Icon);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
EQEMu: Everquest Server Emulator
|
EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -25,8 +25,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
//
|
//
|
||||||
// class EmuConstants
|
// class EmuConstants
|
||||||
//
|
//
|
||||||
uint16 EmuConstants::InventoryMapSize(int16 indexMap) {
|
uint16 EmuConstants::InventoryMapSize(int16 indexMap)
|
||||||
switch (indexMap) {
|
{
|
||||||
|
switch (indexMap)
|
||||||
|
{
|
||||||
case MapPossessions:
|
case MapPossessions:
|
||||||
return MAP_POSSESSIONS_SIZE;
|
return MAP_POSSESSIONS_SIZE;
|
||||||
case MapBank:
|
case MapBank:
|
||||||
@ -83,7 +85,8 @@ uint16 EmuConstants::InventoryMapSize(int16 indexMap) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
std::string EmuConstants::InventoryLocationName(Location_Struct location) {
|
std::string EmuConstants::InventoryLocationName(Location_Struct location)
|
||||||
|
{
|
||||||
// not ready for implementation...
|
// not ready for implementation...
|
||||||
std::string ret_str;
|
std::string ret_str;
|
||||||
StringFormat(ret_str, "%s, %s, %s, %s", InventoryMapName(location.map), InventoryMainName(location.main), InventorySubName(location.sub), InventoryAugName(location.aug));
|
StringFormat(ret_str, "%s, %s, %s, %s", InventoryMapName(location.map), InventoryMainName(location.main), InventorySubName(location.sub), InventoryAugName(location.aug));
|
||||||
@ -91,8 +94,10 @@ std::string EmuConstants::InventoryLocationName(Location_Struct location) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
std::string EmuConstants::InventoryMapName(int16 indexMap) {
|
std::string EmuConstants::InventoryMapName(int16 indexMap)
|
||||||
switch (indexMap) {
|
{
|
||||||
|
switch (indexMap)
|
||||||
|
{
|
||||||
case INVALID_INDEX:
|
case INVALID_INDEX:
|
||||||
return "Invalid Map";
|
return "Invalid Map";
|
||||||
case MapPossessions:
|
case MapPossessions:
|
||||||
@ -100,7 +105,7 @@ std::string EmuConstants::InventoryMapName(int16 indexMap) {
|
|||||||
case MapBank:
|
case MapBank:
|
||||||
return "Bank";
|
return "Bank";
|
||||||
case MapSharedBank:
|
case MapSharedBank:
|
||||||
return "Shared Bank";
|
return "SharedBank";
|
||||||
case MapTrade:
|
case MapTrade:
|
||||||
return "Trade";
|
return "Trade";
|
||||||
case MapWorld:
|
case MapWorld:
|
||||||
@ -110,9 +115,9 @@ std::string EmuConstants::InventoryMapName(int16 indexMap) {
|
|||||||
case MapTribute:
|
case MapTribute:
|
||||||
return "Tribute";
|
return "Tribute";
|
||||||
case MapTrophyTribute:
|
case MapTrophyTribute:
|
||||||
return "Trophy Tribute";
|
return "TrophyTribute";
|
||||||
case MapGuildTribute:
|
case MapGuildTribute:
|
||||||
return "Guild Tribute";
|
return "GuildTribute";
|
||||||
case MapMerchant:
|
case MapMerchant:
|
||||||
return "Merchant";
|
return "Merchant";
|
||||||
case MapDeleted:
|
case MapDeleted:
|
||||||
@ -124,23 +129,23 @@ std::string EmuConstants::InventoryMapName(int16 indexMap) {
|
|||||||
case MapInspect:
|
case MapInspect:
|
||||||
return "Inspect";
|
return "Inspect";
|
||||||
case MapRealEstate:
|
case MapRealEstate:
|
||||||
return "Real Estate";
|
return "RealEstate";
|
||||||
case MapViewMODPC:
|
case MapViewMODPC:
|
||||||
return "View MOD PC";
|
return "ViewMODPC";
|
||||||
case MapViewMODBank:
|
case MapViewMODBank:
|
||||||
return "View MOD Bank";
|
return "ViewMODBank";
|
||||||
case MapViewMODSharedBank:
|
case MapViewMODSharedBank:
|
||||||
return "View MOD Shared Bank";
|
return "ViewMODSharedBank";
|
||||||
case MapViewMODLimbo:
|
case MapViewMODLimbo:
|
||||||
return "View MOD Limbo";
|
return "ViewMODLimbo";
|
||||||
case MapAltStorage:
|
case MapAltStorage:
|
||||||
return "Alt Storage";
|
return "AltStorage";
|
||||||
case MapArchived:
|
case MapArchived:
|
||||||
return "Archived";
|
return "Archived";
|
||||||
case MapMail:
|
case MapMail:
|
||||||
return "Mail";
|
return "Mail";
|
||||||
case MapGuildTrophyTribute:
|
case MapGuildTrophyTribute:
|
||||||
return "Guild Trophy Tribute";
|
return "GuildTrophyTribute";
|
||||||
case MapKrono:
|
case MapKrono:
|
||||||
return "Krono";
|
return "Krono";
|
||||||
case MapOther:
|
case MapOther:
|
||||||
@ -150,20 +155,22 @@ std::string EmuConstants::InventoryMapName(int16 indexMap) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EmuConstants::InventoryMainName(int16 indexMain) {
|
std::string EmuConstants::InventoryMainName(int16 indexMain)
|
||||||
switch (indexMain) {
|
{
|
||||||
|
switch (indexMain)
|
||||||
|
{
|
||||||
case INVALID_INDEX:
|
case INVALID_INDEX:
|
||||||
return "Invalid Main";
|
return "Invalid Main";
|
||||||
case MainCharm:
|
case MainCharm:
|
||||||
return "Charm";
|
return "Charm";
|
||||||
case MainEar1:
|
case MainEar1:
|
||||||
return "Ear 1";
|
return "Ear1";
|
||||||
case MainHead:
|
case MainHead:
|
||||||
return "Head";
|
return "Head";
|
||||||
case MainFace:
|
case MainFace:
|
||||||
return "Face";
|
return "Face";
|
||||||
case MainEar2:
|
case MainEar2:
|
||||||
return "Ear 2";
|
return "Ear2";
|
||||||
case MainNeck:
|
case MainNeck:
|
||||||
return "Neck";
|
return "Neck";
|
||||||
case MainShoulders:
|
case MainShoulders:
|
||||||
@ -173,9 +180,9 @@ std::string EmuConstants::InventoryMainName(int16 indexMain) {
|
|||||||
case MainBack:
|
case MainBack:
|
||||||
return "Back";
|
return "Back";
|
||||||
case MainWrist1:
|
case MainWrist1:
|
||||||
return "Wrist 1";
|
return "Wrist1";
|
||||||
case MainWrist2:
|
case MainWrist2:
|
||||||
return "Wrist 2";
|
return "Wrist2";
|
||||||
case MainRange:
|
case MainRange:
|
||||||
return "Range";
|
return "Range";
|
||||||
case MainHands:
|
case MainHands:
|
||||||
@ -185,9 +192,9 @@ std::string EmuConstants::InventoryMainName(int16 indexMain) {
|
|||||||
case MainSecondary:
|
case MainSecondary:
|
||||||
return "Secondary";
|
return "Secondary";
|
||||||
case MainFinger1:
|
case MainFinger1:
|
||||||
return "Finger 1";
|
return "Finger1";
|
||||||
case MainFinger2:
|
case MainFinger2:
|
||||||
return "Finger 2";
|
return "Finger2";
|
||||||
case MainChest:
|
case MainChest:
|
||||||
return "Chest";
|
return "Chest";
|
||||||
case MainLegs:
|
case MainLegs:
|
||||||
@ -197,30 +204,30 @@ std::string EmuConstants::InventoryMainName(int16 indexMain) {
|
|||||||
case MainWaist:
|
case MainWaist:
|
||||||
return "Waist";
|
return "Waist";
|
||||||
case MainPowerSource:
|
case MainPowerSource:
|
||||||
return "Power Source";
|
return "PowerSource";
|
||||||
case MainAmmo:
|
case MainAmmo:
|
||||||
return "Ammo";
|
return "Ammo";
|
||||||
case MainGeneral1:
|
case MainGeneral1:
|
||||||
return "General 1";
|
return "General1";
|
||||||
case MainGeneral2:
|
case MainGeneral2:
|
||||||
return "General 2";
|
return "General2";
|
||||||
case MainGeneral3:
|
case MainGeneral3:
|
||||||
return "General 3";
|
return "General3";
|
||||||
case MainGeneral4:
|
case MainGeneral4:
|
||||||
return "General 4";
|
return "General4";
|
||||||
case MainGeneral5:
|
case MainGeneral5:
|
||||||
return "General 5";
|
return "General5";
|
||||||
case MainGeneral6:
|
case MainGeneral6:
|
||||||
return "General 6";
|
return "General6";
|
||||||
case MainGeneral7:
|
case MainGeneral7:
|
||||||
return "General 7";
|
return "General7";
|
||||||
case MainGeneral8:
|
case MainGeneral8:
|
||||||
return "General 8";
|
return "General8";
|
||||||
/*
|
/*
|
||||||
case MainGeneral9:
|
case MainGeneral9:
|
||||||
return "General 9";
|
return "General9";
|
||||||
case MainGeneral10:
|
case MainGeneral10:
|
||||||
return "General 10";
|
return "General10";
|
||||||
*/
|
*/
|
||||||
case MainCursor:
|
case MainCursor:
|
||||||
return "Cursor";
|
return "Cursor";
|
||||||
@ -229,7 +236,8 @@ std::string EmuConstants::InventoryMainName(int16 indexMain) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EmuConstants::InventorySubName(int16 indexSub) {
|
std::string EmuConstants::InventorySubName(int16 indexSub)
|
||||||
|
{
|
||||||
if (indexSub == INVALID_INDEX)
|
if (indexSub == INVALID_INDEX)
|
||||||
return "Invalid Sub";
|
return "Invalid Sub";
|
||||||
|
|
||||||
@ -237,12 +245,13 @@ std::string EmuConstants::InventorySubName(int16 indexSub) {
|
|||||||
return "Unknown Sub";
|
return "Unknown Sub";
|
||||||
|
|
||||||
std::string ret_str;
|
std::string ret_str;
|
||||||
ret_str = StringFormat("Container %i", (indexSub + 1)); // zero-based index..but, count starts at one
|
ret_str = StringFormat("Container%i", (indexSub + 1)); // zero-based index..but, count starts at one
|
||||||
|
|
||||||
return ret_str;
|
return ret_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EmuConstants::InventoryAugName(int16 indexAug) {
|
std::string EmuConstants::InventoryAugName(int16 indexAug)
|
||||||
|
{
|
||||||
if (indexAug == INVALID_INDEX)
|
if (indexAug == INVALID_INDEX)
|
||||||
return "Invalid Aug";
|
return "Invalid Aug";
|
||||||
|
|
||||||
@ -250,7 +259,7 @@ std::string EmuConstants::InventoryAugName(int16 indexAug) {
|
|||||||
return "Unknown Aug";
|
return "Unknown Aug";
|
||||||
|
|
||||||
std::string ret_str;
|
std::string ret_str;
|
||||||
ret_str = StringFormat("Augment %i", (indexAug + 1)); // zero-based index..but, count starts at one
|
ret_str = StringFormat("Augment%i", (indexAug + 1)); // zero-based index..but, count starts at one
|
||||||
|
|
||||||
return ret_str;
|
return ret_str;
|
||||||
}
|
}
|
||||||
@ -260,14 +269,16 @@ std::string EmuConstants::InventoryAugName(int16 indexAug) {
|
|||||||
// class EQLimits
|
// class EQLimits
|
||||||
//
|
//
|
||||||
// client validation
|
// client validation
|
||||||
bool EQLimits::IsValidPCClientVersion(ClientVersion clientVersion) {
|
bool EQLimits::IsValidPCClientVersion(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
|
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion) {
|
ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
|
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
|
||||||
return clientVersion;
|
return clientVersion;
|
||||||
|
|
||||||
@ -275,14 +286,16 @@ ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// npc validation
|
// npc validation
|
||||||
bool EQLimits::IsValidNPCClientVersion(ClientVersion clientVersion) {
|
bool EQLimits::IsValidNPCClientVersion(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
|
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion) {
|
ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
|
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
|
||||||
return clientVersion;
|
return clientVersion;
|
||||||
|
|
||||||
@ -290,14 +303,16 @@ ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// mob validation
|
// mob validation
|
||||||
bool EQLimits::IsValidMobClientVersion(ClientVersion clientVersion) {
|
bool EQLimits::IsValidMobClientVersion(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
|
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion) {
|
ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
|
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
|
||||||
return clientVersion;
|
return clientVersion;
|
||||||
|
|
||||||
@ -305,7 +320,8 @@ ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// inventory
|
// inventory
|
||||||
uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion) {
|
uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion)
|
||||||
|
{
|
||||||
// not all maps will have an instantiated container..some are references for queue generators (i.e., bazaar, mail, etc...)
|
// not all maps will have an instantiated container..some are references for queue generators (i.e., bazaar, mail, etc...)
|
||||||
// a zero '0' indicates a needed value..otherwise, change to '_NOTUSED' for a null value so indices requiring research can be identified
|
// a zero '0' indicates a needed value..otherwise, change to '_NOTUSED' for a null value so indices requiring research can be identified
|
||||||
// ALL of these values need to be verified before pushing to live
|
// ALL of these values need to be verified before pushing to live
|
||||||
@ -704,7 +720,8 @@ uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion) {
|
|||||||
return NOT_USED;
|
return NOT_USED;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EQLimits::PossessionsBitmask(ClientVersion clientVersion) {
|
uint64 EQLimits::PossessionsBitmask(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
// these are for the new inventory system (RoF)..not the current (Ti) one...
|
// these are for the new inventory system (RoF)..not the current (Ti) one...
|
||||||
// 0x0000000000200000 is SlotPowerSource (SoF+)
|
// 0x0000000000200000 is SlotPowerSource (SoF+)
|
||||||
// 0x0000000080000000 is SlotGeneral9 (RoF+)
|
// 0x0000000080000000 is SlotGeneral9 (RoF+)
|
||||||
@ -730,7 +747,8 @@ uint64 EQLimits::PossessionsBitmask(ClientVersion clientVersion) {
|
|||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EQLimits::EquipmentBitmask(ClientVersion clientVersion) {
|
uint64 EQLimits::EquipmentBitmask(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ 0x00000000005FFFFF,
|
/*62*/ 0x00000000005FFFFF,
|
||||||
@ -751,7 +769,8 @@ uint64 EQLimits::EquipmentBitmask(ClientVersion clientVersion) {
|
|||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EQLimits::GeneralBitmask(ClientVersion clientVersion) {
|
uint64 EQLimits::GeneralBitmask(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ 0x000000007F800000,
|
/*62*/ 0x000000007F800000,
|
||||||
@ -772,7 +791,8 @@ uint64 EQLimits::GeneralBitmask(ClientVersion clientVersion) {
|
|||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EQLimits::CursorBitmask(ClientVersion clientVersion) {
|
uint64 EQLimits::CursorBitmask(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ 0x0000000200000000,
|
/*62*/ 0x0000000200000000,
|
||||||
@ -793,7 +813,8 @@ uint64 EQLimits::CursorBitmask(ClientVersion clientVersion) {
|
|||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQLimits::AllowsEmptyBagInBag(ClientVersion clientVersion) {
|
bool EQLimits::AllowsEmptyBagInBag(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const bool local[CLIENT_VERSION_COUNT] = {
|
static const bool local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ false,
|
/*Unknown*/ false,
|
||||||
/*62*/ false,
|
/*62*/ false,
|
||||||
@ -814,7 +835,8 @@ bool EQLimits::AllowsEmptyBagInBag(ClientVersion clientVersion) {
|
|||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQLimits::AllowsClickCastFromBag(ClientVersion clientVersion) {
|
bool EQLimits::AllowsClickCastFromBag(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const bool local[CLIENT_VERSION_COUNT] = {
|
static const bool local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ false,
|
/*Unknown*/ false,
|
||||||
/*62*/ false,
|
/*62*/ false,
|
||||||
@ -835,7 +857,8 @@ bool EQLimits::AllowsClickCastFromBag(ClientVersion clientVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// items
|
// items
|
||||||
uint16 EQLimits::ItemCommonSize(ClientVersion clientVersion) {
|
uint16 EQLimits::ItemCommonSize(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const uint16 local[CLIENT_VERSION_COUNT] = {
|
static const uint16 local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ EmuConstants::ITEM_COMMON_SIZE,
|
/*62*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||||
@ -855,7 +878,8 @@ uint16 EQLimits::ItemCommonSize(ClientVersion clientVersion) {
|
|||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 EQLimits::ItemContainerSize(ClientVersion clientVersion) {
|
uint16 EQLimits::ItemContainerSize(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const uint16 local[CLIENT_VERSION_COUNT] = {
|
static const uint16 local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
/*62*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||||
@ -875,7 +899,8 @@ uint16 EQLimits::ItemContainerSize(ClientVersion clientVersion) {
|
|||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQLimits::CoinHasWeight(ClientVersion clientVersion) {
|
bool EQLimits::CoinHasWeight(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const bool local[CLIENT_VERSION_COUNT] = {
|
static const bool local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ true,
|
/*Unknown*/ true,
|
||||||
/*62*/ true,
|
/*62*/ true,
|
||||||
@ -895,7 +920,8 @@ bool EQLimits::CoinHasWeight(ClientVersion clientVersion) {
|
|||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 EQLimits::BandoliersCount(ClientVersion clientVersion) {
|
uint32 EQLimits::BandoliersCount(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const uint32 local[CLIENT_VERSION_COUNT] = {
|
static const uint32 local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ EmuConstants::BANDOLIERS_COUNT,
|
/*62*/ EmuConstants::BANDOLIERS_COUNT,
|
||||||
@ -915,7 +941,8 @@ uint32 EQLimits::BandoliersCount(ClientVersion clientVersion) {
|
|||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 EQLimits::BandolierSize(ClientVersion clientVersion) {
|
uint32 EQLimits::BandolierSize(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const uint32 local[CLIENT_VERSION_COUNT] = {
|
static const uint32 local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ EmuConstants::BANDOLIER_SIZE,
|
/*62*/ EmuConstants::BANDOLIER_SIZE,
|
||||||
@ -935,7 +962,8 @@ uint32 EQLimits::BandolierSize(ClientVersion clientVersion) {
|
|||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 EQLimits::PotionBeltSize(ClientVersion clientVersion) {
|
uint32 EQLimits::PotionBeltSize(ClientVersion clientVersion)
|
||||||
|
{
|
||||||
static const uint32 local[CLIENT_VERSION_COUNT] = {
|
static const uint32 local[CLIENT_VERSION_COUNT] = {
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ EmuConstants::POTION_BELT_SIZE,
|
/*62*/ EmuConstants::POTION_BELT_SIZE,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
EQEMu: Everquest Server Emulator
|
EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -42,7 +42,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
//using namespace RoF2::maps; // server inventory maps enumeration (code and database sync'd to reference)
|
//using namespace RoF2::maps; // server inventory maps enumeration (code and database sync'd to reference)
|
||||||
//using namespace RoF::slots; // server possessions slots enumeration (code and database sync'd to reference)
|
//using namespace RoF::slots; // server possessions slots enumeration (code and database sync'd to reference)
|
||||||
|
|
||||||
class EmuConstants {
|
class EmuConstants
|
||||||
|
{
|
||||||
// an immutable value is required to initialize arrays, etc... use this class as a repository for those
|
// an immutable value is required to initialize arrays, etc... use this class as a repository for those
|
||||||
public:
|
public:
|
||||||
// database
|
// database
|
||||||
@ -140,23 +141,16 @@ public:
|
|||||||
static const uint16 ITEM_COMMON_SIZE = RoF::consts::ITEM_COMMON_SIZE;
|
static const uint16 ITEM_COMMON_SIZE = RoF::consts::ITEM_COMMON_SIZE;
|
||||||
static const uint16 ITEM_CONTAINER_SIZE = Titanium::consts::ITEM_CONTAINER_SIZE;
|
static const uint16 ITEM_CONTAINER_SIZE = Titanium::consts::ITEM_CONTAINER_SIZE;
|
||||||
|
|
||||||
// player profile
|
|
||||||
//static const uint32 CLASS_BITMASK = 0; // needs value
|
|
||||||
//static const uint32 RACE_BITMASK = 0; // needs value
|
|
||||||
|
|
||||||
// BANDOLIERS_COUNT sets maximum limit..active limit will need to be handled by the appropriate AA
|
// BANDOLIERS_COUNT sets maximum limit..active limit will need to be handled by the appropriate AA
|
||||||
static const uint32 BANDOLIERS_COUNT = Titanium::consts::BANDOLIERS_COUNT; // count = number of bandolier instances
|
static const uint32 BANDOLIERS_COUNT = Titanium::consts::BANDOLIERS_COUNT; // count = number of bandolier instances
|
||||||
static const uint32 BANDOLIER_SIZE = Titanium::consts::BANDOLIER_SIZE; // size = number of equipment slots in bandolier instance
|
static const uint32 BANDOLIER_SIZE = Titanium::consts::BANDOLIER_SIZE; // size = number of equipment slots in bandolier instance
|
||||||
static const uint32 POTION_BELT_SIZE = Titanium::consts::POTION_BELT_SIZE;
|
static const uint32 POTION_BELT_SIZE = Titanium::consts::POTION_BELT_SIZE;
|
||||||
|
|
||||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;
|
static const size_t TEXT_LINK_BODY_LENGTH = 56;
|
||||||
|
|
||||||
// legacy-related functions
|
|
||||||
//static int ServerToPerlSlot(int slot); // encode
|
|
||||||
//static int PerlToServerSlot(int slot); // decode
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class EQLimits {
|
class EQLimits
|
||||||
|
{
|
||||||
// values should default to a non-beneficial value..unless value conflicts with intended operation
|
// values should default to a non-beneficial value..unless value conflicts with intended operation
|
||||||
//
|
//
|
||||||
// EmuConstants may be used as references..but, not every reference needs to be in EmuConstants (i.e., AllowsEmptyBagInBag(), CoinHasWeight(), etc...)
|
// EmuConstants may be used as references..but, not every reference needs to be in EmuConstants (i.e., AllowsEmptyBagInBag(), CoinHasWeight(), etc...)
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef EQ_PACKET_STRUCTS_H
|
#ifndef EQ_PACKET_STRUCTS_H
|
||||||
#define EQ_PACKET_STRUCTS_H
|
#define EQ_PACKET_STRUCTS_H
|
||||||
|
|
||||||
@ -756,29 +757,46 @@ struct Tribute_Struct {
|
|||||||
uint32 tier;
|
uint32 tier;
|
||||||
};
|
};
|
||||||
|
|
||||||
//len = 72
|
// Bandolier item positions
|
||||||
struct BandolierItem_Struct {
|
enum
|
||||||
uint32 item_id;
|
{
|
||||||
uint32 icon;
|
bandolierPrimary = 0,
|
||||||
char item_name[64];
|
bandolierSecondary,
|
||||||
};
|
|
||||||
|
|
||||||
//len = 320
|
|
||||||
enum { //bandolier item positions
|
|
||||||
bandolierMainHand = 0,
|
|
||||||
bandolierOffHand,
|
|
||||||
bandolierRange,
|
bandolierRange,
|
||||||
bandolierAmmo
|
bandolierAmmo
|
||||||
};
|
};
|
||||||
struct Bandolier_Struct {
|
|
||||||
char name[32];
|
//len = 72
|
||||||
BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
|
struct BandolierItem_Struct
|
||||||
};
|
{
|
||||||
struct PotionBelt_Struct {
|
uint32 ID;
|
||||||
BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MovePotionToBelt_Struct {
|
//len = 320
|
||||||
|
struct Bandolier_Struct
|
||||||
|
{
|
||||||
|
char Name[32];
|
||||||
|
BandolierItem_Struct Items[EmuConstants::BANDOLIER_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 72
|
||||||
|
struct PotionBeltItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 288
|
||||||
|
struct PotionBelt_Struct
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct Items[EmuConstants::POTION_BELT_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct MovePotionToBelt_Struct
|
||||||
|
{
|
||||||
uint32 Action;
|
uint32 Action;
|
||||||
uint32 SlotNumber;
|
uint32 SlotNumber;
|
||||||
uint32 ItemID;
|
uint32 ItemID;
|
||||||
@ -4106,30 +4124,35 @@ struct DynamicWall_Struct {
|
|||||||
/*80*/
|
/*80*/
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { //bandolier actions
|
// Bandolier actions
|
||||||
BandolierCreate = 0,
|
enum
|
||||||
BandolierRemove = 1,
|
{
|
||||||
BandolierSet = 2
|
bandolierCreate = 0,
|
||||||
|
bandolierRemove,
|
||||||
|
bandolierSet
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierCreate_Struct {
|
struct BandolierCreate_Struct
|
||||||
/*00*/ uint32 action; //0 for create
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action; //0 for create
|
||||||
/*05*/ char name[32];
|
/*04*/ uint8 Number;
|
||||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
/*05*/ char Name[32];
|
||||||
/*39*/ uint8 unknown39; //0
|
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||||
|
/*39*/ uint8 Unknown39; //0
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierDelete_Struct {
|
struct BandolierDelete_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierSet_Struct {
|
struct BandolierSet_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Arrow_Struct {
|
struct Arrow_Struct {
|
||||||
|
|||||||
@ -2290,15 +2290,15 @@ namespace RoF
|
|||||||
|
|
||||||
for (uint32 r = 0; r < EmuConstants::BANDOLIERS_COUNT; r++)
|
for (uint32 r = 0; r < EmuConstants::BANDOLIERS_COUNT; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteString(emu->bandoliers[r].name);
|
outapp->WriteString(emu->bandoliers[r].Name);
|
||||||
|
|
||||||
for (uint32 j = 0; j < EmuConstants::BANDOLIER_SIZE; ++j)
|
for (uint32 j = 0; j < EmuConstants::BANDOLIER_SIZE; ++j)
|
||||||
{
|
{
|
||||||
outapp->WriteString(emu->bandoliers[r].items[j].item_name);
|
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||||
outapp->WriteUInt32(emu->bandoliers[r].items[j].item_id);
|
outapp->WriteUInt32(emu->bandoliers[r].Items[j].ID);
|
||||||
if (emu->bandoliers[r].items[j].icon)
|
if (emu->bandoliers[r].Items[j].Icon)
|
||||||
{
|
{
|
||||||
outapp->WriteSInt32(emu->bandoliers[r].items[j].icon);
|
outapp->WriteSInt32(emu->bandoliers[r].Items[j].Icon);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2324,11 +2324,11 @@ namespace RoF
|
|||||||
|
|
||||||
for (uint32 r = 0; r < EmuConstants::POTION_BELT_SIZE; r++)
|
for (uint32 r = 0; r < EmuConstants::POTION_BELT_SIZE; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteString(emu->potionbelt.items[r].item_name);
|
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||||
outapp->WriteUInt32(emu->potionbelt.items[r].item_id);
|
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||||
if (emu->potionbelt.items[r].icon)
|
if (emu->potionbelt.Items[r].Icon)
|
||||||
{
|
{
|
||||||
outapp->WriteSInt32(emu->potionbelt.items[r].icon);
|
outapp->WriteSInt32(emu->potionbelt.Items[r].Icon);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2364,15 +2364,15 @@ namespace RoF2
|
|||||||
|
|
||||||
for (uint32 r = 0; r < EmuConstants::BANDOLIERS_COUNT; r++)
|
for (uint32 r = 0; r < EmuConstants::BANDOLIERS_COUNT; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteString(emu->bandoliers[r].name);
|
outapp->WriteString(emu->bandoliers[r].Name);
|
||||||
|
|
||||||
for (uint32 j = 0; j < EmuConstants::BANDOLIER_SIZE; ++j)
|
for (uint32 j = 0; j < EmuConstants::BANDOLIER_SIZE; ++j)
|
||||||
{
|
{
|
||||||
outapp->WriteString(emu->bandoliers[r].items[j].item_name);
|
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||||
outapp->WriteUInt32(emu->bandoliers[r].items[j].item_id);
|
outapp->WriteUInt32(emu->bandoliers[r].Items[j].ID);
|
||||||
if (emu->bandoliers[r].items[j].icon)
|
if (emu->bandoliers[r].Items[j].Icon)
|
||||||
{
|
{
|
||||||
outapp->WriteSInt32(emu->bandoliers[r].items[j].icon);
|
outapp->WriteSInt32(emu->bandoliers[r].Items[j].Icon);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2398,11 +2398,11 @@ namespace RoF2
|
|||||||
|
|
||||||
for (uint32 r = 0; r < EmuConstants::POTION_BELT_SIZE; r++)
|
for (uint32 r = 0; r < EmuConstants::POTION_BELT_SIZE; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteString(emu->potionbelt.items[r].item_name);
|
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||||
outapp->WriteUInt32(emu->potionbelt.items[r].item_id);
|
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||||
if (emu->potionbelt.items[r].icon)
|
if (emu->potionbelt.Items[r].Icon)
|
||||||
{
|
{
|
||||||
outapp->WriteSInt32(emu->potionbelt.items[r].icon);
|
outapp->WriteSInt32(emu->potionbelt.Items[r].Icon);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -896,38 +896,66 @@ struct Tribute_Struct {
|
|||||||
uint32 tier;
|
uint32 tier;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierItem_Struct {
|
// Bandolier item positions
|
||||||
char item_name[1]; // Variable Length
|
enum
|
||||||
uint32 item_id;
|
{
|
||||||
uint32 icon;
|
bandolierPrimary = 0,
|
||||||
};
|
bandolierSecondary,
|
||||||
|
|
||||||
//len = 72
|
|
||||||
struct BandolierItem_Struct_Old {
|
|
||||||
uint32 item_id;
|
|
||||||
uint32 icon;
|
|
||||||
char item_name[64];
|
|
||||||
};
|
|
||||||
|
|
||||||
//len = 320
|
|
||||||
enum { //bandolier item positions
|
|
||||||
bandolierMainHand = 0,
|
|
||||||
bandolierOffHand,
|
|
||||||
bandolierRange,
|
bandolierRange,
|
||||||
bandolierAmmo
|
bandolierAmmo
|
||||||
};
|
};
|
||||||
struct Bandolier_Struct {
|
|
||||||
char name[1]; // Variable Length
|
struct BandolierItem_Struct
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
{
|
||||||
|
char Name[1]; // Variable Length
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bandolier_Struct_Old {
|
//len = 72
|
||||||
char name[32];
|
struct BandolierItem_Struct_Old
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PotionBelt_Struct {
|
//len = 320
|
||||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
struct Bandolier_Struct
|
||||||
|
{
|
||||||
|
char Name[1]; // Variable Length
|
||||||
|
BandolierItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Bandolier_Struct_Old
|
||||||
|
{
|
||||||
|
char Name[32];
|
||||||
|
BandolierItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PotionBeltItem_Struct
|
||||||
|
{
|
||||||
|
char Name[1]; // Variable Length
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 72
|
||||||
|
struct PotionBeltItem_Struct_Old
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PotionBelt_Struct
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct Items[MAX_POTIONS_IN_BELT];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PotionBelt_Struct_Old
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct_Old Items[MAX_POTIONS_IN_BELT];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GroupLeadershipAA_Struct {
|
struct GroupLeadershipAA_Struct {
|
||||||
@ -4109,30 +4137,35 @@ struct DynamicWall_Struct {
|
|||||||
/*80*/
|
/*80*/
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { //bandolier actions
|
// Bandolier actions
|
||||||
BandolierCreate = 0,
|
enum
|
||||||
BandolierRemove = 1,
|
{
|
||||||
BandolierSet = 2
|
bandolierCreate = 0,
|
||||||
|
bandolierRemove,
|
||||||
|
bandolierSet
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierCreate_Struct {
|
struct BandolierCreate_Struct
|
||||||
/*00*/ uint32 action; //0 for create
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action; //0 for create
|
||||||
/*05*/ char name[32];
|
/*04*/ uint8 Number;
|
||||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
/*05*/ char Name[32];
|
||||||
/*39*/ uint8 unknown39; //0
|
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||||
|
/*39*/ uint8 Unknown39; //0
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierDelete_Struct {
|
struct BandolierDelete_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierSet_Struct {
|
struct BandolierSet_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Arrow_Struct {
|
struct Arrow_Struct {
|
||||||
|
|||||||
@ -880,38 +880,66 @@ struct Tribute_Struct {
|
|||||||
uint32 tier;
|
uint32 tier;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierItem_Struct {
|
// Bandolier item positions
|
||||||
char item_name[1]; // Variable Length
|
enum
|
||||||
uint32 item_id;
|
{
|
||||||
uint32 icon;
|
bandolierPrimary = 0,
|
||||||
};
|
bandolierSecondary,
|
||||||
|
|
||||||
//len = 72
|
|
||||||
struct BandolierItem_Struct_Old {
|
|
||||||
uint32 item_id;
|
|
||||||
uint32 icon;
|
|
||||||
char item_name[64];
|
|
||||||
};
|
|
||||||
|
|
||||||
//len = 320
|
|
||||||
enum { //bandolier item positions
|
|
||||||
bandolierMainHand = 0,
|
|
||||||
bandolierOffHand,
|
|
||||||
bandolierRange,
|
bandolierRange,
|
||||||
bandolierAmmo
|
bandolierAmmo
|
||||||
};
|
};
|
||||||
struct Bandolier_Struct {
|
|
||||||
char name[1]; // Variable Length
|
struct BandolierItem_Struct
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
{
|
||||||
|
char Name[1]; // Variable Length
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bandolier_Struct_Old {
|
//len = 72
|
||||||
char name[32];
|
struct BandolierItem_Struct_Old
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PotionBelt_Struct {
|
//len = 320
|
||||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
struct Bandolier_Struct
|
||||||
|
{
|
||||||
|
char Name[1]; // Variable Length
|
||||||
|
BandolierItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Bandolier_Struct_Old
|
||||||
|
{
|
||||||
|
char Name[32];
|
||||||
|
BandolierItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PotionBeltItem_Struct
|
||||||
|
{
|
||||||
|
char Name[1]; // Variable Length
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 72
|
||||||
|
struct PotionBeltItem_Struct_Old
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PotionBelt_Struct
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct Items[MAX_POTIONS_IN_BELT];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PotionBelt_Struct_Old
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct_Old Items[MAX_POTIONS_IN_BELT];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GroupLeadershipAA_Struct {
|
struct GroupLeadershipAA_Struct {
|
||||||
@ -4113,30 +4141,35 @@ struct DynamicWall_Struct {
|
|||||||
/*80*/
|
/*80*/
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { //bandolier actions
|
// Bandolier actions
|
||||||
BandolierCreate = 0,
|
enum
|
||||||
BandolierRemove = 1,
|
{
|
||||||
BandolierSet = 2
|
bandolierCreate = 0,
|
||||||
|
bandolierRemove,
|
||||||
|
bandolierSet
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierCreate_Struct {
|
struct BandolierCreate_Struct
|
||||||
/*00*/ uint32 action; //0 for create
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action; //0 for create
|
||||||
/*05*/ char name[32];
|
/*04*/ uint8 Number;
|
||||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
/*05*/ char Name[32];
|
||||||
/*39*/ uint8 unknown39; //0
|
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||||
|
/*39*/ uint8 Unknown39; //0
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierDelete_Struct {
|
struct BandolierDelete_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierSet_Struct {
|
struct BandolierSet_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Arrow_Struct {
|
struct Arrow_Struct {
|
||||||
|
|||||||
@ -1610,19 +1610,19 @@ namespace SoD
|
|||||||
//NOTE: new client supports 20 bandoliers, our internal rep
|
//NOTE: new client supports 20 bandoliers, our internal rep
|
||||||
//only supports 4..
|
//only supports 4..
|
||||||
for (r = 0; r < 4; r++) {
|
for (r = 0; r < 4; r++) {
|
||||||
OUT_str(bandoliers[r].name);
|
OUT_str(bandoliers[r].Name);
|
||||||
uint32 k;
|
uint32 k;
|
||||||
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
||||||
OUT(bandoliers[r].items[k].item_id);
|
OUT(bandoliers[r].Items[k].ID);
|
||||||
OUT(bandoliers[r].items[k].icon);
|
OUT(bandoliers[r].Items[k].Icon);
|
||||||
OUT_str(bandoliers[r].items[k].item_name);
|
OUT_str(bandoliers[r].Items[k].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// OUT(unknown07444[5120]);
|
// OUT(unknown07444[5120]);
|
||||||
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
||||||
OUT(potionbelt.items[r].item_id);
|
OUT(potionbelt.Items[r].ID);
|
||||||
OUT(potionbelt.items[r].icon);
|
OUT(potionbelt.Items[r].Icon);
|
||||||
OUT_str(potionbelt.items[r].item_name);
|
OUT_str(potionbelt.Items[r].Name);
|
||||||
}
|
}
|
||||||
// OUT(unknown12852[8]);
|
// OUT(unknown12852[8]);
|
||||||
// OUT(unknown12864[76]);
|
// OUT(unknown12864[76]);
|
||||||
|
|||||||
@ -686,26 +686,42 @@ struct Tribute_Struct {
|
|||||||
uint32 tier;
|
uint32 tier;
|
||||||
};
|
};
|
||||||
|
|
||||||
//len = 72
|
// Bandolier item positions
|
||||||
struct BandolierItem_Struct {
|
enum
|
||||||
uint32 item_id;
|
{
|
||||||
uint32 icon;
|
bandolierPrimary = 0,
|
||||||
char item_name[64];
|
bandolierSecondary,
|
||||||
};
|
|
||||||
|
|
||||||
//len = 320
|
|
||||||
enum { //bandolier item positions
|
|
||||||
bandolierMainHand = 0,
|
|
||||||
bandolierOffHand,
|
|
||||||
bandolierRange,
|
bandolierRange,
|
||||||
bandolierAmmo
|
bandolierAmmo
|
||||||
};
|
};
|
||||||
struct Bandolier_Struct {
|
|
||||||
char name[32];
|
//len = 72
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
struct BandolierItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
};
|
};
|
||||||
struct PotionBelt_Struct {
|
|
||||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
//len = 320
|
||||||
|
struct Bandolier_Struct
|
||||||
|
{
|
||||||
|
char Name[32];
|
||||||
|
BandolierItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 72
|
||||||
|
struct PotionBeltItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 288
|
||||||
|
struct PotionBelt_Struct
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct Items[MAX_POTIONS_IN_BELT];
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||||
@ -3686,30 +3702,35 @@ struct DynamicWall_Struct {
|
|||||||
/*80*/
|
/*80*/
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { //bandolier actions
|
// Bandolier actions
|
||||||
BandolierCreate = 0,
|
enum
|
||||||
BandolierRemove = 1,
|
{
|
||||||
BandolierSet = 2
|
bandolierCreate = 0,
|
||||||
|
bandolierRemove,
|
||||||
|
bandolierSet
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierCreate_Struct {
|
struct BandolierCreate_Struct
|
||||||
/*00*/ uint32 action; //0 for create
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action; //0 for create
|
||||||
/*05*/ char name[32];
|
/*04*/ uint8 Number;
|
||||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
/*05*/ char Name[32];
|
||||||
/*39*/ uint8 unknown39; //0
|
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||||
|
/*39*/ uint8 Unknown39; //0
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierDelete_Struct {
|
struct BandolierDelete_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierSet_Struct {
|
struct BandolierSet_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Arrow_Struct {
|
struct Arrow_Struct {
|
||||||
|
|||||||
@ -1268,19 +1268,19 @@ namespace SoF
|
|||||||
//NOTE: new client supports 20 bandoliers, our internal rep
|
//NOTE: new client supports 20 bandoliers, our internal rep
|
||||||
//only supports 4..
|
//only supports 4..
|
||||||
for (r = 0; r < 4; r++) {
|
for (r = 0; r < 4; r++) {
|
||||||
OUT_str(bandoliers[r].name);
|
OUT_str(bandoliers[r].Name);
|
||||||
uint32 k;
|
uint32 k;
|
||||||
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
||||||
OUT(bandoliers[r].items[k].item_id);
|
OUT(bandoliers[r].Items[k].ID);
|
||||||
OUT(bandoliers[r].items[k].icon);
|
OUT(bandoliers[r].Items[k].Icon);
|
||||||
OUT_str(bandoliers[r].items[k].item_name);
|
OUT_str(bandoliers[r].Items[k].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// OUT(unknown07444[5120]);
|
// OUT(unknown07444[5120]);
|
||||||
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
||||||
OUT(potionbelt.items[r].item_id);
|
OUT(potionbelt.Items[r].ID);
|
||||||
OUT(potionbelt.items[r].icon);
|
OUT(potionbelt.Items[r].Icon);
|
||||||
OUT_str(potionbelt.items[r].item_name);
|
OUT_str(potionbelt.Items[r].Name);
|
||||||
}
|
}
|
||||||
// OUT(unknown12852[8]);
|
// OUT(unknown12852[8]);
|
||||||
// OUT(unknown12864[76]);
|
// OUT(unknown12864[76]);
|
||||||
|
|||||||
@ -663,26 +663,42 @@ struct Tribute_Struct {
|
|||||||
uint32 tier;
|
uint32 tier;
|
||||||
};
|
};
|
||||||
|
|
||||||
//len = 72
|
// Bandolier item positions
|
||||||
struct BandolierItem_Struct {
|
enum
|
||||||
uint32 item_id;
|
{
|
||||||
uint32 icon;
|
bandolierPrimary = 0,
|
||||||
char item_name[64];
|
bandolierSecondary,
|
||||||
};
|
|
||||||
|
|
||||||
//len = 320
|
|
||||||
enum { //bandolier item positions
|
|
||||||
bandolierMainHand = 0,
|
|
||||||
bandolierOffHand,
|
|
||||||
bandolierRange,
|
bandolierRange,
|
||||||
bandolierAmmo
|
bandolierAmmo
|
||||||
};
|
};
|
||||||
struct Bandolier_Struct {
|
|
||||||
char name[32];
|
//len = 72
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
struct BandolierItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
};
|
};
|
||||||
struct PotionBelt_Struct {
|
|
||||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
//len = 320
|
||||||
|
struct Bandolier_Struct
|
||||||
|
{
|
||||||
|
char Name[32];
|
||||||
|
BandolierItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 72
|
||||||
|
struct PotionBeltItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 288
|
||||||
|
struct PotionBelt_Struct
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct Items[MAX_POTIONS_IN_BELT];
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||||
@ -3548,30 +3564,35 @@ struct DynamicWall_Struct {
|
|||||||
/*80*/
|
/*80*/
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { //bandolier actions
|
// Bandolier actions
|
||||||
BandolierCreate = 0,
|
enum
|
||||||
BandolierRemove = 1,
|
{
|
||||||
BandolierSet = 2
|
bandolierCreate = 0,
|
||||||
|
bandolierRemove,
|
||||||
|
bandolierSet
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierCreate_Struct {
|
struct BandolierCreate_Struct
|
||||||
/*00*/ uint32 action; //0 for create
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action; //0 for create
|
||||||
/*05*/ char name[32];
|
/*04*/ uint8 Number;
|
||||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
/*05*/ char Name[32];
|
||||||
/*39*/ uint8 unknown39; //0
|
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||||
|
/*39*/ uint8 Unknown39; //0
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierDelete_Struct {
|
struct BandolierDelete_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierSet_Struct {
|
struct BandolierSet_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Arrow_Struct {
|
struct Arrow_Struct {
|
||||||
|
|||||||
@ -924,19 +924,19 @@ namespace Titanium
|
|||||||
OUT(aapoints);
|
OUT(aapoints);
|
||||||
// OUT(unknown06160[4]);
|
// OUT(unknown06160[4]);
|
||||||
for (r = 0; r < structs::MAX_PLAYER_BANDOLIER; r++) {
|
for (r = 0; r < structs::MAX_PLAYER_BANDOLIER; r++) {
|
||||||
OUT_str(bandoliers[r].name);
|
OUT_str(bandoliers[r].Name);
|
||||||
uint32 k;
|
uint32 k;
|
||||||
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
||||||
OUT(bandoliers[r].items[k].item_id);
|
OUT(bandoliers[r].Items[k].ID);
|
||||||
OUT(bandoliers[r].items[k].icon);
|
OUT(bandoliers[r].Items[k].Icon);
|
||||||
OUT_str(bandoliers[r].items[k].item_name);
|
OUT_str(bandoliers[r].Items[k].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// OUT(unknown07444[5120]);
|
// OUT(unknown07444[5120]);
|
||||||
for (r = 0; r < structs::MAX_PLAYER_BANDOLIER_ITEMS; r++) {
|
for (r = 0; r < structs::MAX_PLAYER_BANDOLIER_ITEMS; r++) {
|
||||||
OUT(potionbelt.items[r].item_id);
|
OUT(potionbelt.Items[r].ID);
|
||||||
OUT(potionbelt.items[r].icon);
|
OUT(potionbelt.Items[r].Icon);
|
||||||
OUT_str(potionbelt.items[r].item_name);
|
OUT_str(potionbelt.Items[r].Name);
|
||||||
}
|
}
|
||||||
// OUT(unknown12852[8]);
|
// OUT(unknown12852[8]);
|
||||||
// OUT(unknown12864[76]);
|
// OUT(unknown12864[76]);
|
||||||
|
|||||||
@ -594,26 +594,42 @@ struct Tribute_Struct {
|
|||||||
uint32 tier;
|
uint32 tier;
|
||||||
};
|
};
|
||||||
|
|
||||||
//len = 72
|
// Bandolier item positions
|
||||||
struct BandolierItem_Struct {
|
enum
|
||||||
uint32 item_id;
|
{
|
||||||
uint32 icon;
|
bandolierPrimary = 0,
|
||||||
char item_name[64];
|
bandolierSecondary,
|
||||||
};
|
|
||||||
|
|
||||||
//len = 320
|
|
||||||
enum { //bandolier item positions
|
|
||||||
bandolierMainHand = 0,
|
|
||||||
bandolierOffHand,
|
|
||||||
bandolierRange,
|
bandolierRange,
|
||||||
bandolierAmmo
|
bandolierAmmo
|
||||||
};
|
};
|
||||||
struct Bandolier_Struct {
|
|
||||||
char name[32];
|
//len = 72
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
struct BandolierItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
};
|
};
|
||||||
struct PotionBelt_Struct {
|
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
//len = 320
|
||||||
|
struct Bandolier_Struct
|
||||||
|
{
|
||||||
|
char Name[32];
|
||||||
|
BandolierItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 72
|
||||||
|
struct PotionBeltItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 288
|
||||||
|
struct PotionBelt_Struct
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||||
@ -3030,30 +3046,35 @@ struct DynamicWall_Struct {
|
|||||||
/*80*/
|
/*80*/
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { //bandolier actions
|
// Bandolier actions
|
||||||
BandolierCreate = 0,
|
enum
|
||||||
BandolierRemove = 1,
|
{
|
||||||
BandolierSet = 2
|
bandolierCreate = 0,
|
||||||
|
bandolierRemove,
|
||||||
|
bandolierSet
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierCreate_Struct {
|
struct BandolierCreate_Struct
|
||||||
/*00*/ uint32 action; //0 for create
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action; //0 for create
|
||||||
/*05*/ char name[32];
|
/*04*/ uint8 Number;
|
||||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
/*05*/ char Name[32];
|
||||||
/*39*/ uint8 unknown39; //0
|
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||||
|
/*39*/ uint8 Unknown39; //0
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierDelete_Struct {
|
struct BandolierDelete_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierSet_Struct {
|
struct BandolierSet_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Arrow_Struct {
|
struct Arrow_Struct {
|
||||||
|
|||||||
@ -1872,19 +1872,19 @@ namespace UF
|
|||||||
//NOTE: new client supports 20 bandoliers, our internal rep
|
//NOTE: new client supports 20 bandoliers, our internal rep
|
||||||
//only supports 4..
|
//only supports 4..
|
||||||
for (r = 0; r < 4; r++) {
|
for (r = 0; r < 4; r++) {
|
||||||
OUT_str(bandoliers[r].name);
|
OUT_str(bandoliers[r].Name);
|
||||||
uint32 k;
|
uint32 k;
|
||||||
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
||||||
OUT(bandoliers[r].items[k].item_id);
|
OUT(bandoliers[r].Items[k].ID);
|
||||||
OUT(bandoliers[r].items[k].icon);
|
OUT(bandoliers[r].Items[k].Icon);
|
||||||
OUT_str(bandoliers[r].items[k].item_name);
|
OUT_str(bandoliers[r].Items[k].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// OUT(unknown07444[5120]);
|
// OUT(unknown07444[5120]);
|
||||||
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
||||||
OUT(potionbelt.items[r].item_id);
|
OUT(potionbelt.Items[r].ID);
|
||||||
OUT(potionbelt.items[r].icon);
|
OUT(potionbelt.Items[r].Icon);
|
||||||
OUT_str(potionbelt.items[r].item_name);
|
OUT_str(potionbelt.Items[r].Name);
|
||||||
}
|
}
|
||||||
// OUT(unknown12852[8]);
|
// OUT(unknown12852[8]);
|
||||||
// OUT(unknown12864[76]);
|
// OUT(unknown12864[76]);
|
||||||
|
|||||||
@ -732,26 +732,42 @@ struct Tribute_Struct {
|
|||||||
uint32 tier;
|
uint32 tier;
|
||||||
};
|
};
|
||||||
|
|
||||||
//len = 72
|
// Bandolier item positions
|
||||||
struct BandolierItem_Struct {
|
enum
|
||||||
uint32 item_id;
|
{
|
||||||
uint32 icon;
|
bandolierPrimary = 0,
|
||||||
char item_name[64];
|
bandolierSecondary,
|
||||||
};
|
|
||||||
|
|
||||||
//len = 320
|
|
||||||
enum { //bandolier item positions
|
|
||||||
bandolierMainHand = 0,
|
|
||||||
bandolierOffHand,
|
|
||||||
bandolierRange,
|
bandolierRange,
|
||||||
bandolierAmmo
|
bandolierAmmo
|
||||||
};
|
};
|
||||||
struct Bandolier_Struct {
|
|
||||||
char name[32];
|
//len = 72
|
||||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
struct BandolierItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
};
|
};
|
||||||
struct PotionBelt_Struct {
|
|
||||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
//len = 320
|
||||||
|
struct Bandolier_Struct
|
||||||
|
{
|
||||||
|
char Name[32];
|
||||||
|
BandolierItem_Struct Items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 72
|
||||||
|
struct PotionBeltItem_Struct
|
||||||
|
{
|
||||||
|
uint32 ID;
|
||||||
|
uint32 Icon;
|
||||||
|
char Name[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
//len = 288
|
||||||
|
struct PotionBelt_Struct
|
||||||
|
{
|
||||||
|
PotionBeltItem_Struct Items[MAX_POTIONS_IN_BELT];
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||||
@ -3758,30 +3774,35 @@ struct DynamicWall_Struct {
|
|||||||
/*80*/
|
/*80*/
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { //bandolier actions
|
// Bandolier actions
|
||||||
BandolierCreate = 0,
|
enum
|
||||||
BandolierRemove = 1,
|
{
|
||||||
BandolierSet = 2
|
bandolierCreate = 0,
|
||||||
|
bandolierRemove,
|
||||||
|
bandolierSet
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierCreate_Struct {
|
struct BandolierCreate_Struct
|
||||||
/*00*/ uint32 action; //0 for create
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action; //0 for create
|
||||||
/*05*/ char name[32];
|
/*04*/ uint8 Number;
|
||||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
/*05*/ char Name[32];
|
||||||
/*39*/ uint8 unknown39; //0
|
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||||
|
/*39*/ uint8 Unknown39; //0
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierDelete_Struct {
|
struct BandolierDelete_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BandolierSet_Struct {
|
struct BandolierSet_Struct
|
||||||
/*00*/ uint32 action;
|
{
|
||||||
/*04*/ uint8 number;
|
/*00*/ uint32 Action;
|
||||||
/*05*/ uint8 unknown05[35];
|
/*04*/ uint8 Number;
|
||||||
|
/*05*/ uint8 Unknown05[35];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Not 100% sure on this struct. Live as of 1/1/11 is different than UF. Seems to work 'OK'
|
// Not 100% sure on this struct. Live as of 1/1/11 is different than UF. Seems to work 'OK'
|
||||||
|
|||||||
@ -3183,19 +3183,20 @@ void Client::Handle_OP_Bandolier(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
BandolierCreate_Struct *bs = (BandolierCreate_Struct*)app->pBuffer;
|
BandolierCreate_Struct *bs = (BandolierCreate_Struct*)app->pBuffer;
|
||||||
|
|
||||||
switch (bs->action) {
|
switch (bs->Action)
|
||||||
case BandolierCreate:
|
{
|
||||||
|
case bandolierCreate:
|
||||||
CreateBandolier(app);
|
CreateBandolier(app);
|
||||||
break;
|
break;
|
||||||
case BandolierRemove:
|
case bandolierRemove:
|
||||||
RemoveBandolier(app);
|
RemoveBandolier(app);
|
||||||
break;
|
break;
|
||||||
case BandolierSet:
|
case bandolierSet:
|
||||||
SetBandolier(app);
|
SetBandolier(app);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log.Out(Logs::General, Logs::None, "Uknown Bandolier action %i", bs->action);
|
Log.Out(Logs::General, Logs::None, "Uknown Bandolier action %i", bs->Action);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10442,16 +10443,16 @@ void Client::Handle_OP_PotionBelt(const EQApplicationPacket *app)
|
|||||||
if (mptbs->Action == 0) {
|
if (mptbs->Action == 0) {
|
||||||
const Item_Struct *BaseItem = database.GetItem(mptbs->ItemID);
|
const Item_Struct *BaseItem = database.GetItem(mptbs->ItemID);
|
||||||
if (BaseItem) {
|
if (BaseItem) {
|
||||||
m_pp.potionbelt.items[mptbs->SlotNumber].item_id = BaseItem->ID;
|
m_pp.potionbelt.Items[mptbs->SlotNumber].ID = BaseItem->ID;
|
||||||
m_pp.potionbelt.items[mptbs->SlotNumber].icon = BaseItem->Icon;
|
m_pp.potionbelt.Items[mptbs->SlotNumber].Icon = BaseItem->Icon;
|
||||||
strn0cpy(m_pp.potionbelt.items[mptbs->SlotNumber].item_name, BaseItem->Name, sizeof(BaseItem->Name));
|
strn0cpy(m_pp.potionbelt.Items[mptbs->SlotNumber].Name, BaseItem->Name, sizeof(BaseItem->Name));
|
||||||
database.SaveCharacterPotionBelt(this->CharacterID(), mptbs->SlotNumber, m_pp.potionbelt.items[mptbs->SlotNumber].item_id, m_pp.potionbelt.items[mptbs->SlotNumber].icon);
|
database.SaveCharacterPotionBelt(this->CharacterID(), mptbs->SlotNumber, m_pp.potionbelt.Items[mptbs->SlotNumber].ID, m_pp.potionbelt.Items[mptbs->SlotNumber].Icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_pp.potionbelt.items[mptbs->SlotNumber].item_id = 0;
|
m_pp.potionbelt.Items[mptbs->SlotNumber].ID = 0;
|
||||||
m_pp.potionbelt.items[mptbs->SlotNumber].icon = 0;
|
m_pp.potionbelt.Items[mptbs->SlotNumber].Icon = 0;
|
||||||
strncpy(m_pp.potionbelt.items[mptbs->SlotNumber].item_name, "\0", 1);
|
strncpy(m_pp.potionbelt.Items[mptbs->SlotNumber].Name, "\0", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2476,97 +2476,99 @@ EQApplicationPacket* Client::ReturnItemPacket(int16 slot_id, const ItemInst* ins
|
|||||||
return outapp;
|
return outapp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int16 BandolierSlotToWeaponSlot(int BandolierSlot) {
|
static int16 BandolierSlotToWeaponSlot(int BandolierSlot)
|
||||||
|
{
|
||||||
switch(BandolierSlot) {
|
switch (BandolierSlot)
|
||||||
case bandolierMainHand:
|
{
|
||||||
return MainPrimary;
|
case bandolierPrimary:
|
||||||
case bandolierOffHand:
|
return MainPrimary;
|
||||||
return MainSecondary;
|
case bandolierSecondary:
|
||||||
case bandolierRange:
|
return MainSecondary;
|
||||||
return MainRange;
|
case bandolierRange:
|
||||||
default:
|
return MainRange;
|
||||||
return MainAmmo;
|
default:
|
||||||
|
return MainAmmo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::CreateBandolier(const EQApplicationPacket *app) {
|
void Client::CreateBandolier(const EQApplicationPacket *app)
|
||||||
|
{
|
||||||
// Store bandolier set with the number and name passed by the client, along with the items that are currently
|
// Store bandolier set with the number and name passed by the client, along with the items that are currently
|
||||||
// in the players weapon slots.
|
// in the players weapon slots.
|
||||||
|
|
||||||
BandolierCreate_Struct *bs = (BandolierCreate_Struct*)app->pBuffer;
|
BandolierCreate_Struct *bs = (BandolierCreate_Struct*)app->pBuffer;
|
||||||
|
|
||||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s Creating Bandolier Set %i, Set Name: %s", GetName(), bs->number, bs->name);
|
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s Creating Bandolier Set %i, Set Name: %s", GetName(), bs->Number, bs->Name);
|
||||||
strcpy(m_pp.bandoliers[bs->number].name, bs->name);
|
strcpy(m_pp.bandoliers[bs->Number].Name, bs->Name);
|
||||||
|
|
||||||
const ItemInst* InvItem = nullptr;
|
const ItemInst* InvItem = nullptr;
|
||||||
const Item_Struct *BaseItem = nullptr;
|
const Item_Struct *BaseItem = nullptr;
|
||||||
int16 WeaponSlot;
|
int16 WeaponSlot = 0;
|
||||||
|
|
||||||
for(int BandolierSlot = bandolierMainHand; BandolierSlot <= bandolierAmmo; BandolierSlot++) {
|
for(int BandolierSlot = bandolierPrimary; BandolierSlot <= bandolierAmmo; BandolierSlot++) {
|
||||||
WeaponSlot = BandolierSlotToWeaponSlot(BandolierSlot);
|
WeaponSlot = BandolierSlotToWeaponSlot(BandolierSlot);
|
||||||
InvItem = GetInv()[WeaponSlot];
|
InvItem = GetInv()[WeaponSlot];
|
||||||
if(InvItem) {
|
if(InvItem) {
|
||||||
BaseItem = InvItem->GetItem();
|
BaseItem = InvItem->GetItem();
|
||||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s adding item %s to slot %i", GetName(),BaseItem->Name, WeaponSlot);
|
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s adding item %s to slot %i", GetName(),BaseItem->Name, WeaponSlot);
|
||||||
m_pp.bandoliers[bs->number].items[BandolierSlot].item_id = BaseItem->ID;
|
m_pp.bandoliers[bs->Number].Items[BandolierSlot].ID = BaseItem->ID;
|
||||||
m_pp.bandoliers[bs->number].items[BandolierSlot].icon = BaseItem->Icon;
|
m_pp.bandoliers[bs->Number].Items[BandolierSlot].Icon = BaseItem->Icon;
|
||||||
database.SaveCharacterBandolier(this->CharacterID(), bs->number, BandolierSlot, m_pp.bandoliers[bs->number].items[BandolierSlot].item_id, m_pp.bandoliers[bs->number].items[BandolierSlot].icon, bs->name);
|
database.SaveCharacterBandolier(this->CharacterID(), bs->Number, BandolierSlot, m_pp.bandoliers[bs->Number].Items[BandolierSlot].ID, m_pp.bandoliers[bs->Number].Items[BandolierSlot].Icon, bs->Name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s no item in slot %i", GetName(), WeaponSlot);
|
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s no item in slot %i", GetName(), WeaponSlot);
|
||||||
m_pp.bandoliers[bs->number].items[BandolierSlot].item_id = 0;
|
m_pp.bandoliers[bs->Number].Items[BandolierSlot].ID = 0;
|
||||||
m_pp.bandoliers[bs->number].items[BandolierSlot].icon = 0;
|
m_pp.bandoliers[bs->Number].Items[BandolierSlot].Icon = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::RemoveBandolier(const EQApplicationPacket *app) {
|
void Client::RemoveBandolier(const EQApplicationPacket *app)
|
||||||
|
{
|
||||||
BandolierDelete_Struct *bds = (BandolierDelete_Struct*)app->pBuffer;
|
BandolierDelete_Struct *bds = (BandolierDelete_Struct*)app->pBuffer;
|
||||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s removing set", GetName(), bds->number);
|
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s removing set", GetName(), bds->Number);
|
||||||
memset(m_pp.bandoliers[bds->number].name, 0, 32);
|
memset(m_pp.bandoliers[bds->Number].Name, 0, 32);
|
||||||
for(int i = bandolierMainHand; i <= bandolierAmmo; i++) {
|
for(int i = bandolierPrimary; i <= bandolierAmmo; i++) {
|
||||||
m_pp.bandoliers[bds->number].items[i].item_id = 0;
|
m_pp.bandoliers[bds->Number].Items[i].ID = 0;
|
||||||
m_pp.bandoliers[bds->number].items[i].icon = 0;
|
m_pp.bandoliers[bds->Number].Items[i].Icon = 0;
|
||||||
}
|
}
|
||||||
database.DeleteCharacterBandolier(this->CharacterID(), bds->number);
|
database.DeleteCharacterBandolier(this->CharacterID(), bds->Number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::SetBandolier(const EQApplicationPacket *app) {
|
void Client::SetBandolier(const EQApplicationPacket *app)
|
||||||
|
{
|
||||||
// Swap the weapons in the given bandolier set into the character's weapon slots and return
|
// Swap the weapons in the given bandolier set into the character's weapon slots and return
|
||||||
// any items currently in the weapon slots to inventory.
|
// any items currently in the weapon slots to inventory.
|
||||||
|
|
||||||
BandolierSet_Struct *bss = (BandolierSet_Struct*)app->pBuffer;
|
BandolierSet_Struct *bss = (BandolierSet_Struct*)app->pBuffer;
|
||||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s activating set %i", GetName(), bss->number);
|
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s activating set %i", GetName(), bss->Number);
|
||||||
int16 slot;
|
int16 slot = 0;
|
||||||
int16 WeaponSlot;
|
int16 WeaponSlot = 0;
|
||||||
ItemInst *BandolierItems[4]; // Temporary holding area for the weapons we pull out of their inventory
|
ItemInst *BandolierItems[4]; // Temporary holding area for the weapons we pull out of their inventory
|
||||||
|
|
||||||
// First we pull the items for this bandolier set out of their inventory, this makes space to put the
|
// First we pull the items for this bandolier set out of their inventory, this makes space to put the
|
||||||
// currently equipped items back.
|
// currently equipped items back.
|
||||||
for(int BandolierSlot = bandolierMainHand; BandolierSlot <= bandolierAmmo; BandolierSlot++) {
|
for(int BandolierSlot = bandolierPrimary; BandolierSlot <= bandolierAmmo; BandolierSlot++) {
|
||||||
// If this bandolier set has an item in this position
|
// If this bandolier set has an item in this position
|
||||||
if(m_pp.bandoliers[bss->number].items[BandolierSlot].item_id) {
|
if(m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID) {
|
||||||
WeaponSlot = BandolierSlotToWeaponSlot(BandolierSlot);
|
WeaponSlot = BandolierSlotToWeaponSlot(BandolierSlot);
|
||||||
|
|
||||||
// Check if the player has the item specified in the bandolier set on them.
|
// Check if the player has the item specified in the bandolier set on them.
|
||||||
//
|
//
|
||||||
slot = m_inv.HasItem(m_pp.bandoliers[bss->number].items[BandolierSlot].item_id, 1,
|
slot = m_inv.HasItem(m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID, 1,
|
||||||
invWhereWorn|invWherePersonal);
|
invWhereWorn|invWherePersonal);
|
||||||
|
|
||||||
// removed 'invWhereCursor' argument from above and implemented slots 30, 331-340 checks here
|
// removed 'invWhereCursor' argument from above and implemented slots 30, 331-340 checks here
|
||||||
if (slot == INVALID_INDEX) {
|
if (slot == INVALID_INDEX) {
|
||||||
if (m_inv.GetItem(MainCursor)) {
|
if (m_inv.GetItem(MainCursor)) {
|
||||||
if (m_inv.GetItem(MainCursor)->GetItem()->ID == m_pp.bandoliers[bss->number].items[BandolierSlot].item_id &&
|
if (m_inv.GetItem(MainCursor)->GetItem()->ID == m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID &&
|
||||||
m_inv.GetItem(MainCursor)->GetCharges() >= 1) { // '> 0' the same, but this matches Inventory::_HasItem conditional check
|
m_inv.GetItem(MainCursor)->GetCharges() >= 1) { // '> 0' the same, but this matches Inventory::_HasItem conditional check
|
||||||
slot = MainCursor;
|
slot = MainCursor;
|
||||||
}
|
}
|
||||||
else if (m_inv.GetItem(MainCursor)->GetItem()->ItemClass == 1) {
|
else if (m_inv.GetItem(MainCursor)->GetItem()->ItemClass == 1) {
|
||||||
for(int16 CursorBagSlot = EmuConstants::CURSOR_BAG_BEGIN; CursorBagSlot <= EmuConstants::CURSOR_BAG_END; CursorBagSlot++) {
|
for(int16 CursorBagSlot = EmuConstants::CURSOR_BAG_BEGIN; CursorBagSlot <= EmuConstants::CURSOR_BAG_END; CursorBagSlot++) {
|
||||||
if (m_inv.GetItem(CursorBagSlot)) {
|
if (m_inv.GetItem(CursorBagSlot)) {
|
||||||
if (m_inv.GetItem(CursorBagSlot)->GetItem()->ID == m_pp.bandoliers[bss->number].items[BandolierSlot].item_id &&
|
if (m_inv.GetItem(CursorBagSlot)->GetItem()->ID == m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID &&
|
||||||
m_inv.GetItem(CursorBagSlot)->GetCharges() >= 1) { // ditto
|
m_inv.GetItem(CursorBagSlot)->GetCharges() >= 1) { // ditto
|
||||||
slot = CursorBagSlot;
|
slot = CursorBagSlot;
|
||||||
break;
|
break;
|
||||||
@ -2630,14 +2632,14 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
|
|||||||
// Now we move the required weapons into the character weapon slots, and return any items we are replacing
|
// Now we move the required weapons into the character weapon slots, and return any items we are replacing
|
||||||
// back to inventory.
|
// back to inventory.
|
||||||
//
|
//
|
||||||
for(int BandolierSlot = bandolierMainHand; BandolierSlot <= bandolierAmmo; BandolierSlot++) {
|
for(int BandolierSlot = bandolierPrimary; BandolierSlot <= bandolierAmmo; BandolierSlot++) {
|
||||||
|
|
||||||
// Find the inventory slot corresponding to this bandolier slot
|
// Find the inventory slot corresponding to this bandolier slot
|
||||||
|
|
||||||
WeaponSlot = BandolierSlotToWeaponSlot(BandolierSlot);
|
WeaponSlot = BandolierSlotToWeaponSlot(BandolierSlot);
|
||||||
|
|
||||||
// if there is an item in this Bandolier slot ?
|
// if there is an item in this Bandolier slot ?
|
||||||
if(m_pp.bandoliers[bss->number].items[BandolierSlot].item_id) {
|
if(m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID) {
|
||||||
// if the player has this item in their inventory, and it is not already where it needs to be
|
// if the player has this item in their inventory, and it is not already where it needs to be
|
||||||
if(BandolierItems[BandolierSlot]) {
|
if(BandolierItems[BandolierSlot]) {
|
||||||
// Pull the item that we are going to replace
|
// Pull the item that we are going to replace
|
||||||
|
|||||||
@ -1175,20 +1175,21 @@ bool ZoneDatabase::LoadCharacterMaterialColor(uint32 character_id, PlayerProfile
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ZoneDatabase::LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp){
|
bool ZoneDatabase::LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp)
|
||||||
|
{
|
||||||
std::string query = StringFormat("SELECT `bandolier_id`, `bandolier_slot`, `item_id`, `icon`, `bandolier_name` FROM `character_bandolier` WHERE `id` = %u LIMIT 16", character_id);
|
std::string query = StringFormat("SELECT `bandolier_id`, `bandolier_slot`, `item_id`, `icon`, `bandolier_name` FROM `character_bandolier` WHERE `id` = %u LIMIT 16", character_id);
|
||||||
auto results = database.QueryDatabase(query); int i = 0; int r = 0; int si = 0;
|
auto results = database.QueryDatabase(query); int i = 0; int r = 0; int si = 0;
|
||||||
for (i = 0; i < EmuConstants::BANDOLIERS_COUNT; i++)
|
for (i = 0; i < EmuConstants::BANDOLIERS_COUNT; i++)
|
||||||
for (int si = 0; si < EmuConstants::BANDOLIER_SIZE; si++)
|
for (int si = 0; si < EmuConstants::BANDOLIER_SIZE; si++)
|
||||||
pp->bandoliers[i].items[si].icon = 0;
|
pp->bandoliers[i].Items[si].Icon = 0;
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
r = 0;
|
r = 0;
|
||||||
i = atoi(row[r]); /* Bandolier ID */ r++;
|
i = atoi(row[r]); /* Bandolier ID */ r++;
|
||||||
si = atoi(row[r]); /* Bandolier Slot */ r++;
|
si = atoi(row[r]); /* Bandolier Slot */ r++;
|
||||||
pp->bandoliers[i].items[si].item_id = atoi(row[r]); r++;
|
pp->bandoliers[i].Items[si].ID = atoi(row[r]); r++;
|
||||||
pp->bandoliers[i].items[si].icon = atoi(row[r]); r++;
|
pp->bandoliers[i].Items[si].Icon = atoi(row[r]); r++;
|
||||||
strcpy(pp->bandoliers[i].name, row[r]); r++;
|
strcpy(pp->bandoliers[i].Name, row[r]); r++;
|
||||||
si++;
|
si++;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -1213,13 +1214,14 @@ bool ZoneDatabase::LoadCharacterTribute(uint32 character_id, PlayerProfile_Struc
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ZoneDatabase::LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp){
|
bool ZoneDatabase::LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp)
|
||||||
|
{
|
||||||
std::string query = StringFormat("SELECT `potion_id`, `item_id`, `icon` FROM `character_potionbelt` WHERE `id` = %u LIMIT 4", character_id);
|
std::string query = StringFormat("SELECT `potion_id`, `item_id`, `icon` FROM `character_potionbelt` WHERE `id` = %u LIMIT 4", character_id);
|
||||||
auto results = database.QueryDatabase(query); int i = 0;
|
auto results = database.QueryDatabase(query); int i = 0;
|
||||||
for (i = 0; i < EmuConstants::POTION_BELT_SIZE; i++){
|
for (i = 0; i < EmuConstants::POTION_BELT_SIZE; i++){
|
||||||
pp->potionbelt.items[i].icon = 0;
|
pp->potionbelt.Items[i].Icon = 0;
|
||||||
pp->potionbelt.items[i].item_id = 0;
|
pp->potionbelt.Items[i].ID = 0;
|
||||||
strncpy(pp->potionbelt.items[i].item_name, "\0", 1);
|
strncpy(pp->potionbelt.Items[i].Name, "\0", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
@ -1230,9 +1232,9 @@ bool ZoneDatabase::LoadCharacterPotions(uint32 character_id, PlayerProfile_Struc
|
|||||||
if(!item)
|
if(!item)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pp->potionbelt.items[i].item_id = item_id;
|
pp->potionbelt.Items[i].ID = item_id;
|
||||||
pp->potionbelt.items[i].icon = atoi(row[2]);
|
pp->potionbelt.Items[i].Icon = atoi(row[2]);
|
||||||
strncpy(pp->potionbelt.items[i].item_name, item->Name, 64);
|
strncpy(pp->potionbelt.Items[i].Name, item->Name, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1326,7 +1328,8 @@ bool ZoneDatabase::SaveCharacterTribute(uint32 character_id, PlayerProfile_Struc
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ZoneDatabase::SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name){
|
bool ZoneDatabase::SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name)
|
||||||
|
{
|
||||||
char bandolier_name_esc[64];
|
char bandolier_name_esc[64];
|
||||||
DoEscapeString(bandolier_name_esc, bandolier_name, strlen(bandolier_name));
|
DoEscapeString(bandolier_name_esc, bandolier_name, strlen(bandolier_name));
|
||||||
std::string query = StringFormat("REPLACE INTO `character_bandolier` (id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name) VALUES (%u, %u, %u, %u, %u,'%s')", character_id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name_esc);
|
std::string query = StringFormat("REPLACE INTO `character_bandolier` (id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name) VALUES (%u, %u, %u, %u, %u,'%s')", character_id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name_esc);
|
||||||
@ -1335,7 +1338,8 @@ bool ZoneDatabase::SaveCharacterBandolier(uint32 character_id, uint8 bandolier_i
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ZoneDatabase::SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon) {
|
bool ZoneDatabase::SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon)
|
||||||
|
{
|
||||||
std::string query = StringFormat("REPLACE INTO `character_potionbelt` (id, potion_id, item_id, icon) VALUES (%u, %u, %u, %u)", character_id, potion_id, item_id, icon);
|
std::string query = StringFormat("REPLACE INTO `character_potionbelt` (id, potion_id, item_id, icon) VALUES (%u, %u, %u, %u)", character_id, potion_id, item_id, icon);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user