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
|
||||
#define CLIENTVERSIONS_H
|
||||
|
||||
@ -46,29 +67,29 @@ static const char* ClientVersionName(ClientVersion version)
|
||||
switch (version)
|
||||
{
|
||||
case ClientVersion::Unknown:
|
||||
return "ClientVersion::Unknown";
|
||||
return "Unknown";
|
||||
case ClientVersion::Client62:
|
||||
return "ClientVersion::Client62";
|
||||
return "Client62";
|
||||
case ClientVersion::Titanium:
|
||||
return "ClientVersion::Titanium";
|
||||
return "Titanium";
|
||||
case ClientVersion::SoF:
|
||||
return "ClientVersion::SoF";
|
||||
return "SoF";
|
||||
case ClientVersion::SoD:
|
||||
return "ClientVersion::SoD";
|
||||
return "SoD";
|
||||
case ClientVersion::UF:
|
||||
return "ClientVersion::UF";
|
||||
return "UF";
|
||||
case ClientVersion::RoF:
|
||||
return "ClientVersion::RoF";
|
||||
return "RoF";
|
||||
case ClientVersion::RoF2:
|
||||
return "ClientVersion::RoF2";
|
||||
return "RoF2";
|
||||
case ClientVersion::MobNPC:
|
||||
return "ClientVersion::MobNPC";
|
||||
return "MobNPC";
|
||||
case ClientVersion::MobMerc:
|
||||
return "ClientVersion::MobMerc";
|
||||
return "MobMerc";
|
||||
case ClientVersion::MobBot:
|
||||
return "ClientVersion::MobBot";
|
||||
return "MobBot";
|
||||
case ClientVersion::MobPet:
|
||||
return "ClientVersion::MobPet";
|
||||
return "MobPet";
|
||||
default:
|
||||
return "<ERROR> Invalid ClientVersion";
|
||||
};
|
||||
|
||||
@ -157,18 +157,26 @@ namespace Convert {
|
||||
/*84*/ uint32 Points;
|
||||
/*88*/
|
||||
} PVPStatsEntry_Struct;
|
||||
|
||||
struct BandolierItem_Struct {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
uint32 ID;
|
||||
uint32 Icon;
|
||||
char Name[64];
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[32];
|
||||
Convert::BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
|
||||
char Name[32];
|
||||
Convert::BandolierItem_Struct Items[EmuConstants::BANDOLIER_SIZE];
|
||||
};
|
||||
|
||||
struct PotionBeltItem_Struct {
|
||||
uint32 ID;
|
||||
uint32 Icon;
|
||||
char Name[64];
|
||||
};
|
||||
struct PotionBelt_Struct {
|
||||
Convert::BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
|
||||
Convert::PotionBeltItem_Struct Items[EmuConstants::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
struct SuspendedMinion_Struct
|
||||
{
|
||||
/*000*/ uint16 SpellID;
|
||||
@ -1431,14 +1439,14 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
/* Run Bandolier Convert */
|
||||
first_entry = 0; rquery = "";
|
||||
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++){
|
||||
if (pp->bandoliers[i].items[si].item_id > 0){
|
||||
if (pp->bandoliers[i].Items[si].ID > 0){
|
||||
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;
|
||||
}
|
||||
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 */
|
||||
first_entry = 0; rquery = "";
|
||||
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){
|
||||
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;
|
||||
}
|
||||
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
|
||||
|
||||
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
|
||||
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
|
||||
//
|
||||
uint16 EmuConstants::InventoryMapSize(int16 indexMap) {
|
||||
switch (indexMap) {
|
||||
uint16 EmuConstants::InventoryMapSize(int16 indexMap)
|
||||
{
|
||||
switch (indexMap)
|
||||
{
|
||||
case MapPossessions:
|
||||
return MAP_POSSESSIONS_SIZE;
|
||||
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...
|
||||
std::string ret_str;
|
||||
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) {
|
||||
switch (indexMap) {
|
||||
std::string EmuConstants::InventoryMapName(int16 indexMap)
|
||||
{
|
||||
switch (indexMap)
|
||||
{
|
||||
case INVALID_INDEX:
|
||||
return "Invalid Map";
|
||||
case MapPossessions:
|
||||
@ -150,8 +155,10 @@ std::string EmuConstants::InventoryMapName(int16 indexMap) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string EmuConstants::InventoryMainName(int16 indexMain) {
|
||||
switch (indexMain) {
|
||||
std::string EmuConstants::InventoryMainName(int16 indexMain)
|
||||
{
|
||||
switch (indexMain)
|
||||
{
|
||||
case INVALID_INDEX:
|
||||
return "Invalid Main";
|
||||
case MainCharm:
|
||||
@ -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)
|
||||
return "Invalid Sub";
|
||||
|
||||
@ -242,7 +250,8 @@ std::string EmuConstants::InventorySubName(int16 indexSub) {
|
||||
return ret_str;
|
||||
}
|
||||
|
||||
std::string EmuConstants::InventoryAugName(int16 indexAug) {
|
||||
std::string EmuConstants::InventoryAugName(int16 indexAug)
|
||||
{
|
||||
if (indexAug == INVALID_INDEX)
|
||||
return "Invalid Aug";
|
||||
|
||||
@ -260,14 +269,16 @@ std::string EmuConstants::InventoryAugName(int16 indexAug) {
|
||||
// class EQLimits
|
||||
//
|
||||
// client validation
|
||||
bool EQLimits::IsValidPCClientVersion(ClientVersion clientVersion) {
|
||||
bool EQLimits::IsValidPCClientVersion(ClientVersion clientVersion)
|
||||
{
|
||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion) {
|
||||
ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion)
|
||||
{
|
||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
|
||||
return clientVersion;
|
||||
|
||||
@ -275,14 +286,16 @@ ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion) {
|
||||
}
|
||||
|
||||
// npc validation
|
||||
bool EQLimits::IsValidNPCClientVersion(ClientVersion clientVersion) {
|
||||
bool EQLimits::IsValidNPCClientVersion(ClientVersion clientVersion)
|
||||
{
|
||||
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion) {
|
||||
ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion)
|
||||
{
|
||||
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
|
||||
return clientVersion;
|
||||
|
||||
@ -290,14 +303,16 @@ ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion) {
|
||||
}
|
||||
|
||||
// mob validation
|
||||
bool EQLimits::IsValidMobClientVersion(ClientVersion clientVersion) {
|
||||
bool EQLimits::IsValidMobClientVersion(ClientVersion clientVersion)
|
||||
{
|
||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion) {
|
||||
ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion)
|
||||
{
|
||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
|
||||
return clientVersion;
|
||||
|
||||
@ -305,7 +320,8 @@ ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion) {
|
||||
}
|
||||
|
||||
// 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...)
|
||||
// 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
|
||||
@ -704,7 +720,8 @@ uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion) {
|
||||
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...
|
||||
// 0x0000000000200000 is SlotPowerSource (SoF+)
|
||||
// 0x0000000080000000 is SlotGeneral9 (RoF+)
|
||||
@ -730,7 +747,8 @@ uint64 EQLimits::PossessionsBitmask(ClientVersion 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] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0x00000000005FFFFF,
|
||||
@ -751,7 +769,8 @@ uint64 EQLimits::EquipmentBitmask(ClientVersion 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] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0x000000007F800000,
|
||||
@ -772,7 +791,8 @@ uint64 EQLimits::GeneralBitmask(ClientVersion 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] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ 0x0000000200000000,
|
||||
@ -793,7 +813,8 @@ uint64 EQLimits::CursorBitmask(ClientVersion 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] = {
|
||||
/*Unknown*/ false,
|
||||
/*62*/ false,
|
||||
@ -814,7 +835,8 @@ bool EQLimits::AllowsEmptyBagInBag(ClientVersion 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] = {
|
||||
/*Unknown*/ false,
|
||||
/*62*/ false,
|
||||
@ -835,7 +857,8 @@ bool EQLimits::AllowsClickCastFromBag(ClientVersion clientVersion) {
|
||||
}
|
||||
|
||||
// items
|
||||
uint16 EQLimits::ItemCommonSize(ClientVersion clientVersion) {
|
||||
uint16 EQLimits::ItemCommonSize(ClientVersion clientVersion)
|
||||
{
|
||||
static const uint16 local[CLIENT_VERSION_COUNT] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
@ -855,7 +878,8 @@ uint16 EQLimits::ItemCommonSize(ClientVersion 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] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
@ -875,7 +899,8 @@ uint16 EQLimits::ItemContainerSize(ClientVersion 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] = {
|
||||
/*Unknown*/ true,
|
||||
/*62*/ true,
|
||||
@ -895,7 +920,8 @@ bool EQLimits::CoinHasWeight(ClientVersion 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] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
@ -915,7 +941,8 @@ uint32 EQLimits::BandoliersCount(ClientVersion 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] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::BANDOLIER_SIZE,
|
||||
@ -935,7 +962,8 @@ uint32 EQLimits::BandolierSize(ClientVersion 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] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ EmuConstants::POTION_BELT_SIZE,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
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
|
||||
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 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
|
||||
public:
|
||||
// database
|
||||
@ -140,23 +141,16 @@ public:
|
||||
static const uint16 ITEM_COMMON_SIZE = RoF::consts::ITEM_COMMON_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
|
||||
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 POTION_BELT_SIZE = Titanium::consts::POTION_BELT_SIZE;
|
||||
|
||||
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
|
||||
//
|
||||
// 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
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef EQ_PACKET_STRUCTS_H
|
||||
#define EQ_PACKET_STRUCTS_H
|
||||
|
||||
@ -756,29 +757,46 @@ struct Tribute_Struct {
|
||||
uint32 tier;
|
||||
};
|
||||
|
||||
//len = 72
|
||||
struct BandolierItem_Struct {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
};
|
||||
|
||||
//len = 320
|
||||
enum { //bandolier item positions
|
||||
bandolierMainHand = 0,
|
||||
bandolierOffHand,
|
||||
// Bandolier item positions
|
||||
enum
|
||||
{
|
||||
bandolierPrimary = 0,
|
||||
bandolierSecondary,
|
||||
bandolierRange,
|
||||
bandolierAmmo
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[32];
|
||||
BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
|
||||
};
|
||||
struct PotionBelt_Struct {
|
||||
BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
|
||||
|
||||
//len = 72
|
||||
struct BandolierItem_Struct
|
||||
{
|
||||
uint32 ID;
|
||||
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 SlotNumber;
|
||||
uint32 ItemID;
|
||||
@ -4106,30 +4124,35 @@ struct DynamicWall_Struct {
|
||||
/*80*/
|
||||
};
|
||||
|
||||
enum { //bandolier actions
|
||||
BandolierCreate = 0,
|
||||
BandolierRemove = 1,
|
||||
BandolierSet = 2
|
||||
// Bandolier actions
|
||||
enum
|
||||
{
|
||||
bandolierCreate = 0,
|
||||
bandolierRemove,
|
||||
bandolierSet
|
||||
};
|
||||
|
||||
struct BandolierCreate_Struct {
|
||||
/*00*/ uint32 action; //0 for create
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ char name[32];
|
||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 unknown39; //0
|
||||
struct BandolierCreate_Struct
|
||||
{
|
||||
/*00*/ uint32 Action; //0 for create
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ char Name[32];
|
||||
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 Unknown39; //0
|
||||
};
|
||||
|
||||
struct BandolierDelete_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierDelete_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct BandolierSet_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierSet_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct Arrow_Struct {
|
||||
|
||||
@ -2290,15 +2290,15 @@ namespace RoF
|
||||
|
||||
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)
|
||||
{
|
||||
outapp->WriteString(emu->bandoliers[r].items[j].item_name);
|
||||
outapp->WriteUInt32(emu->bandoliers[r].items[j].item_id);
|
||||
if (emu->bandoliers[r].items[j].icon)
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
outapp->WriteUInt32(emu->bandoliers[r].Items[j].ID);
|
||||
if (emu->bandoliers[r].Items[j].Icon)
|
||||
{
|
||||
outapp->WriteSInt32(emu->bandoliers[r].items[j].icon);
|
||||
outapp->WriteSInt32(emu->bandoliers[r].Items[j].Icon);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2324,11 +2324,11 @@ namespace RoF
|
||||
|
||||
for (uint32 r = 0; r < EmuConstants::POTION_BELT_SIZE; r++)
|
||||
{
|
||||
outapp->WriteString(emu->potionbelt.items[r].item_name);
|
||||
outapp->WriteUInt32(emu->potionbelt.items[r].item_id);
|
||||
if (emu->potionbelt.items[r].icon)
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon)
|
||||
{
|
||||
outapp->WriteSInt32(emu->potionbelt.items[r].icon);
|
||||
outapp->WriteSInt32(emu->potionbelt.Items[r].Icon);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -2364,15 +2364,15 @@ namespace RoF2
|
||||
|
||||
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)
|
||||
{
|
||||
outapp->WriteString(emu->bandoliers[r].items[j].item_name);
|
||||
outapp->WriteUInt32(emu->bandoliers[r].items[j].item_id);
|
||||
if (emu->bandoliers[r].items[j].icon)
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
outapp->WriteUInt32(emu->bandoliers[r].Items[j].ID);
|
||||
if (emu->bandoliers[r].Items[j].Icon)
|
||||
{
|
||||
outapp->WriteSInt32(emu->bandoliers[r].items[j].icon);
|
||||
outapp->WriteSInt32(emu->bandoliers[r].Items[j].Icon);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2398,11 +2398,11 @@ namespace RoF2
|
||||
|
||||
for (uint32 r = 0; r < EmuConstants::POTION_BELT_SIZE; r++)
|
||||
{
|
||||
outapp->WriteString(emu->potionbelt.items[r].item_name);
|
||||
outapp->WriteUInt32(emu->potionbelt.items[r].item_id);
|
||||
if (emu->potionbelt.items[r].icon)
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon)
|
||||
{
|
||||
outapp->WriteSInt32(emu->potionbelt.items[r].icon);
|
||||
outapp->WriteSInt32(emu->potionbelt.Items[r].Icon);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -896,38 +896,66 @@ struct Tribute_Struct {
|
||||
uint32 tier;
|
||||
};
|
||||
|
||||
struct BandolierItem_Struct {
|
||||
char item_name[1]; // Variable Length
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
};
|
||||
|
||||
//len = 72
|
||||
struct BandolierItem_Struct_Old {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
};
|
||||
|
||||
//len = 320
|
||||
enum { //bandolier item positions
|
||||
bandolierMainHand = 0,
|
||||
bandolierOffHand,
|
||||
// Bandolier item positions
|
||||
enum
|
||||
{
|
||||
bandolierPrimary = 0,
|
||||
bandolierSecondary,
|
||||
bandolierRange,
|
||||
bandolierAmmo
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[1]; // Variable Length
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
|
||||
struct BandolierItem_Struct
|
||||
{
|
||||
char Name[1]; // Variable Length
|
||||
uint32 ID;
|
||||
uint32 Icon;
|
||||
};
|
||||
|
||||
struct Bandolier_Struct_Old {
|
||||
char name[32];
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
//len = 72
|
||||
struct BandolierItem_Struct_Old
|
||||
{
|
||||
uint32 ID;
|
||||
uint32 Icon;
|
||||
char Name[64];
|
||||
};
|
||||
|
||||
struct PotionBelt_Struct {
|
||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
||||
//len = 320
|
||||
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 {
|
||||
@ -4109,30 +4137,35 @@ struct DynamicWall_Struct {
|
||||
/*80*/
|
||||
};
|
||||
|
||||
enum { //bandolier actions
|
||||
BandolierCreate = 0,
|
||||
BandolierRemove = 1,
|
||||
BandolierSet = 2
|
||||
// Bandolier actions
|
||||
enum
|
||||
{
|
||||
bandolierCreate = 0,
|
||||
bandolierRemove,
|
||||
bandolierSet
|
||||
};
|
||||
|
||||
struct BandolierCreate_Struct {
|
||||
/*00*/ uint32 action; //0 for create
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ char name[32];
|
||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 unknown39; //0
|
||||
struct BandolierCreate_Struct
|
||||
{
|
||||
/*00*/ uint32 Action; //0 for create
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ char Name[32];
|
||||
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 Unknown39; //0
|
||||
};
|
||||
|
||||
struct BandolierDelete_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierDelete_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct BandolierSet_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierSet_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct Arrow_Struct {
|
||||
|
||||
@ -880,38 +880,66 @@ struct Tribute_Struct {
|
||||
uint32 tier;
|
||||
};
|
||||
|
||||
struct BandolierItem_Struct {
|
||||
char item_name[1]; // Variable Length
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
};
|
||||
|
||||
//len = 72
|
||||
struct BandolierItem_Struct_Old {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
};
|
||||
|
||||
//len = 320
|
||||
enum { //bandolier item positions
|
||||
bandolierMainHand = 0,
|
||||
bandolierOffHand,
|
||||
// Bandolier item positions
|
||||
enum
|
||||
{
|
||||
bandolierPrimary = 0,
|
||||
bandolierSecondary,
|
||||
bandolierRange,
|
||||
bandolierAmmo
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[1]; // Variable Length
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
|
||||
struct BandolierItem_Struct
|
||||
{
|
||||
char Name[1]; // Variable Length
|
||||
uint32 ID;
|
||||
uint32 Icon;
|
||||
};
|
||||
|
||||
struct Bandolier_Struct_Old {
|
||||
char name[32];
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
//len = 72
|
||||
struct BandolierItem_Struct_Old
|
||||
{
|
||||
uint32 ID;
|
||||
uint32 Icon;
|
||||
char Name[64];
|
||||
};
|
||||
|
||||
struct PotionBelt_Struct {
|
||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
||||
//len = 320
|
||||
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 {
|
||||
@ -4113,30 +4141,35 @@ struct DynamicWall_Struct {
|
||||
/*80*/
|
||||
};
|
||||
|
||||
enum { //bandolier actions
|
||||
BandolierCreate = 0,
|
||||
BandolierRemove = 1,
|
||||
BandolierSet = 2
|
||||
// Bandolier actions
|
||||
enum
|
||||
{
|
||||
bandolierCreate = 0,
|
||||
bandolierRemove,
|
||||
bandolierSet
|
||||
};
|
||||
|
||||
struct BandolierCreate_Struct {
|
||||
/*00*/ uint32 action; //0 for create
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ char name[32];
|
||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 unknown39; //0
|
||||
struct BandolierCreate_Struct
|
||||
{
|
||||
/*00*/ uint32 Action; //0 for create
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ char Name[32];
|
||||
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 Unknown39; //0
|
||||
};
|
||||
|
||||
struct BandolierDelete_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierDelete_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct BandolierSet_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierSet_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct Arrow_Struct {
|
||||
|
||||
@ -1610,19 +1610,19 @@ namespace SoD
|
||||
//NOTE: new client supports 20 bandoliers, our internal rep
|
||||
//only supports 4..
|
||||
for (r = 0; r < 4; r++) {
|
||||
OUT_str(bandoliers[r].name);
|
||||
OUT_str(bandoliers[r].Name);
|
||||
uint32 k;
|
||||
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
||||
OUT(bandoliers[r].items[k].item_id);
|
||||
OUT(bandoliers[r].items[k].icon);
|
||||
OUT_str(bandoliers[r].items[k].item_name);
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// OUT(unknown07444[5120]);
|
||||
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
||||
OUT(potionbelt.items[r].item_id);
|
||||
OUT(potionbelt.items[r].icon);
|
||||
OUT_str(potionbelt.items[r].item_name);
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// OUT(unknown12852[8]);
|
||||
// OUT(unknown12864[76]);
|
||||
|
||||
@ -686,26 +686,42 @@ struct Tribute_Struct {
|
||||
uint32 tier;
|
||||
};
|
||||
|
||||
//len = 72
|
||||
struct BandolierItem_Struct {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
};
|
||||
|
||||
//len = 320
|
||||
enum { //bandolier item positions
|
||||
bandolierMainHand = 0,
|
||||
bandolierOffHand,
|
||||
// Bandolier item positions
|
||||
enum
|
||||
{
|
||||
bandolierPrimary = 0,
|
||||
bandolierSecondary,
|
||||
bandolierRange,
|
||||
bandolierAmmo
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[32];
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
|
||||
//len = 72
|
||||
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;
|
||||
@ -3686,30 +3702,35 @@ struct DynamicWall_Struct {
|
||||
/*80*/
|
||||
};
|
||||
|
||||
enum { //bandolier actions
|
||||
BandolierCreate = 0,
|
||||
BandolierRemove = 1,
|
||||
BandolierSet = 2
|
||||
// Bandolier actions
|
||||
enum
|
||||
{
|
||||
bandolierCreate = 0,
|
||||
bandolierRemove,
|
||||
bandolierSet
|
||||
};
|
||||
|
||||
struct BandolierCreate_Struct {
|
||||
/*00*/ uint32 action; //0 for create
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ char name[32];
|
||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 unknown39; //0
|
||||
struct BandolierCreate_Struct
|
||||
{
|
||||
/*00*/ uint32 Action; //0 for create
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ char Name[32];
|
||||
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 Unknown39; //0
|
||||
};
|
||||
|
||||
struct BandolierDelete_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierDelete_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct BandolierSet_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierSet_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct Arrow_Struct {
|
||||
|
||||
@ -1268,19 +1268,19 @@ namespace SoF
|
||||
//NOTE: new client supports 20 bandoliers, our internal rep
|
||||
//only supports 4..
|
||||
for (r = 0; r < 4; r++) {
|
||||
OUT_str(bandoliers[r].name);
|
||||
OUT_str(bandoliers[r].Name);
|
||||
uint32 k;
|
||||
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
||||
OUT(bandoliers[r].items[k].item_id);
|
||||
OUT(bandoliers[r].items[k].icon);
|
||||
OUT_str(bandoliers[r].items[k].item_name);
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// OUT(unknown07444[5120]);
|
||||
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
||||
OUT(potionbelt.items[r].item_id);
|
||||
OUT(potionbelt.items[r].icon);
|
||||
OUT_str(potionbelt.items[r].item_name);
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// OUT(unknown12852[8]);
|
||||
// OUT(unknown12864[76]);
|
||||
|
||||
@ -663,26 +663,42 @@ struct Tribute_Struct {
|
||||
uint32 tier;
|
||||
};
|
||||
|
||||
//len = 72
|
||||
struct BandolierItem_Struct {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
};
|
||||
|
||||
//len = 320
|
||||
enum { //bandolier item positions
|
||||
bandolierMainHand = 0,
|
||||
bandolierOffHand,
|
||||
// Bandolier item positions
|
||||
enum
|
||||
{
|
||||
bandolierPrimary = 0,
|
||||
bandolierSecondary,
|
||||
bandolierRange,
|
||||
bandolierAmmo
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[32];
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
|
||||
//len = 72
|
||||
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;
|
||||
@ -3548,30 +3564,35 @@ struct DynamicWall_Struct {
|
||||
/*80*/
|
||||
};
|
||||
|
||||
enum { //bandolier actions
|
||||
BandolierCreate = 0,
|
||||
BandolierRemove = 1,
|
||||
BandolierSet = 2
|
||||
// Bandolier actions
|
||||
enum
|
||||
{
|
||||
bandolierCreate = 0,
|
||||
bandolierRemove,
|
||||
bandolierSet
|
||||
};
|
||||
|
||||
struct BandolierCreate_Struct {
|
||||
/*00*/ uint32 action; //0 for create
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ char name[32];
|
||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 unknown39; //0
|
||||
struct BandolierCreate_Struct
|
||||
{
|
||||
/*00*/ uint32 Action; //0 for create
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ char Name[32];
|
||||
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 Unknown39; //0
|
||||
};
|
||||
|
||||
struct BandolierDelete_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierDelete_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct BandolierSet_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierSet_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct Arrow_Struct {
|
||||
|
||||
@ -924,19 +924,19 @@ namespace Titanium
|
||||
OUT(aapoints);
|
||||
// OUT(unknown06160[4]);
|
||||
for (r = 0; r < structs::MAX_PLAYER_BANDOLIER; r++) {
|
||||
OUT_str(bandoliers[r].name);
|
||||
OUT_str(bandoliers[r].Name);
|
||||
uint32 k;
|
||||
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
||||
OUT(bandoliers[r].items[k].item_id);
|
||||
OUT(bandoliers[r].items[k].icon);
|
||||
OUT_str(bandoliers[r].items[k].item_name);
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// OUT(unknown07444[5120]);
|
||||
for (r = 0; r < structs::MAX_PLAYER_BANDOLIER_ITEMS; r++) {
|
||||
OUT(potionbelt.items[r].item_id);
|
||||
OUT(potionbelt.items[r].icon);
|
||||
OUT_str(potionbelt.items[r].item_name);
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// OUT(unknown12852[8]);
|
||||
// OUT(unknown12864[76]);
|
||||
|
||||
@ -594,26 +594,42 @@ struct Tribute_Struct {
|
||||
uint32 tier;
|
||||
};
|
||||
|
||||
//len = 72
|
||||
struct BandolierItem_Struct {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
};
|
||||
|
||||
//len = 320
|
||||
enum { //bandolier item positions
|
||||
bandolierMainHand = 0,
|
||||
bandolierOffHand,
|
||||
// Bandolier item positions
|
||||
enum
|
||||
{
|
||||
bandolierPrimary = 0,
|
||||
bandolierSecondary,
|
||||
bandolierRange,
|
||||
bandolierAmmo
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[32];
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
|
||||
//len = 72
|
||||
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;
|
||||
@ -3030,30 +3046,35 @@ struct DynamicWall_Struct {
|
||||
/*80*/
|
||||
};
|
||||
|
||||
enum { //bandolier actions
|
||||
BandolierCreate = 0,
|
||||
BandolierRemove = 1,
|
||||
BandolierSet = 2
|
||||
// Bandolier actions
|
||||
enum
|
||||
{
|
||||
bandolierCreate = 0,
|
||||
bandolierRemove,
|
||||
bandolierSet
|
||||
};
|
||||
|
||||
struct BandolierCreate_Struct {
|
||||
/*00*/ uint32 action; //0 for create
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ char name[32];
|
||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 unknown39; //0
|
||||
struct BandolierCreate_Struct
|
||||
{
|
||||
/*00*/ uint32 Action; //0 for create
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ char Name[32];
|
||||
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 Unknown39; //0
|
||||
};
|
||||
|
||||
struct BandolierDelete_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierDelete_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct BandolierSet_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierSet_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct Arrow_Struct {
|
||||
|
||||
@ -1872,19 +1872,19 @@ namespace UF
|
||||
//NOTE: new client supports 20 bandoliers, our internal rep
|
||||
//only supports 4..
|
||||
for (r = 0; r < 4; r++) {
|
||||
OUT_str(bandoliers[r].name);
|
||||
OUT_str(bandoliers[r].Name);
|
||||
uint32 k;
|
||||
for (k = 0; k < structs::MAX_PLAYER_BANDOLIER_ITEMS; k++) {
|
||||
OUT(bandoliers[r].items[k].item_id);
|
||||
OUT(bandoliers[r].items[k].icon);
|
||||
OUT_str(bandoliers[r].items[k].item_name);
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// OUT(unknown07444[5120]);
|
||||
for (r = 0; r < structs::MAX_POTIONS_IN_BELT; r++) {
|
||||
OUT(potionbelt.items[r].item_id);
|
||||
OUT(potionbelt.items[r].icon);
|
||||
OUT_str(potionbelt.items[r].item_name);
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// OUT(unknown12852[8]);
|
||||
// OUT(unknown12864[76]);
|
||||
|
||||
@ -732,26 +732,42 @@ struct Tribute_Struct {
|
||||
uint32 tier;
|
||||
};
|
||||
|
||||
//len = 72
|
||||
struct BandolierItem_Struct {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
};
|
||||
|
||||
//len = 320
|
||||
enum { //bandolier item positions
|
||||
bandolierMainHand = 0,
|
||||
bandolierOffHand,
|
||||
// Bandolier item positions
|
||||
enum
|
||||
{
|
||||
bandolierPrimary = 0,
|
||||
bandolierSecondary,
|
||||
bandolierRange,
|
||||
bandolierAmmo
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[32];
|
||||
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
|
||||
|
||||
//len = 72
|
||||
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;
|
||||
@ -3758,30 +3774,35 @@ struct DynamicWall_Struct {
|
||||
/*80*/
|
||||
};
|
||||
|
||||
enum { //bandolier actions
|
||||
BandolierCreate = 0,
|
||||
BandolierRemove = 1,
|
||||
BandolierSet = 2
|
||||
// Bandolier actions
|
||||
enum
|
||||
{
|
||||
bandolierCreate = 0,
|
||||
bandolierRemove,
|
||||
bandolierSet
|
||||
};
|
||||
|
||||
struct BandolierCreate_Struct {
|
||||
/*00*/ uint32 action; //0 for create
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ char name[32];
|
||||
/*37*/ uint16 unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 unknown39; //0
|
||||
struct BandolierCreate_Struct
|
||||
{
|
||||
/*00*/ uint32 Action; //0 for create
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ char Name[32];
|
||||
/*37*/ uint16 Unknown37; //seen 0x93FD
|
||||
/*39*/ uint8 Unknown39; //0
|
||||
};
|
||||
|
||||
struct BandolierDelete_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierDelete_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*04*/ uint8 Number;
|
||||
/*05*/ uint8 Unknown05[35];
|
||||
};
|
||||
|
||||
struct BandolierSet_Struct {
|
||||
/*00*/ uint32 action;
|
||||
/*04*/ uint8 number;
|
||||
/*05*/ uint8 unknown05[35];
|
||||
struct BandolierSet_Struct
|
||||
{
|
||||
/*00*/ uint32 Action;
|
||||
/*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'
|
||||
|
||||
@ -3183,19 +3183,20 @@ void Client::Handle_OP_Bandolier(const EQApplicationPacket *app)
|
||||
|
||||
BandolierCreate_Struct *bs = (BandolierCreate_Struct*)app->pBuffer;
|
||||
|
||||
switch (bs->action) {
|
||||
case BandolierCreate:
|
||||
switch (bs->Action)
|
||||
{
|
||||
case bandolierCreate:
|
||||
CreateBandolier(app);
|
||||
break;
|
||||
case BandolierRemove:
|
||||
case bandolierRemove:
|
||||
RemoveBandolier(app);
|
||||
break;
|
||||
case BandolierSet:
|
||||
case bandolierSet:
|
||||
SetBandolier(app);
|
||||
break;
|
||||
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) {
|
||||
const Item_Struct *BaseItem = database.GetItem(mptbs->ItemID);
|
||||
if (BaseItem) {
|
||||
m_pp.potionbelt.items[mptbs->SlotNumber].item_id = BaseItem->ID;
|
||||
m_pp.potionbelt.items[mptbs->SlotNumber].icon = BaseItem->Icon;
|
||||
strn0cpy(m_pp.potionbelt.items[mptbs->SlotNumber].item_name, BaseItem->Name, sizeof(BaseItem->Name));
|
||||
database.SaveCharacterPotionBelt(this->CharacterID(), mptbs->SlotNumber, m_pp.potionbelt.items[mptbs->SlotNumber].item_id, m_pp.potionbelt.items[mptbs->SlotNumber].icon);
|
||||
m_pp.potionbelt.Items[mptbs->SlotNumber].ID = BaseItem->ID;
|
||||
m_pp.potionbelt.Items[mptbs->SlotNumber].Icon = BaseItem->Icon;
|
||||
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].ID, m_pp.potionbelt.Items[mptbs->SlotNumber].Icon);
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_pp.potionbelt.items[mptbs->SlotNumber].item_id = 0;
|
||||
m_pp.potionbelt.items[mptbs->SlotNumber].icon = 0;
|
||||
strncpy(m_pp.potionbelt.items[mptbs->SlotNumber].item_name, "\0", 1);
|
||||
m_pp.potionbelt.Items[mptbs->SlotNumber].ID = 0;
|
||||
m_pp.potionbelt.Items[mptbs->SlotNumber].Icon = 0;
|
||||
strncpy(m_pp.potionbelt.Items[mptbs->SlotNumber].Name, "\0", 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2476,12 +2476,13 @@ EQApplicationPacket* Client::ReturnItemPacket(int16 slot_id, const ItemInst* ins
|
||||
return outapp;
|
||||
}
|
||||
|
||||
static int16 BandolierSlotToWeaponSlot(int BandolierSlot) {
|
||||
|
||||
switch(BandolierSlot) {
|
||||
case bandolierMainHand:
|
||||
static int16 BandolierSlotToWeaponSlot(int BandolierSlot)
|
||||
{
|
||||
switch (BandolierSlot)
|
||||
{
|
||||
case bandolierPrimary:
|
||||
return MainPrimary;
|
||||
case bandolierOffHand:
|
||||
case bandolierSecondary:
|
||||
return MainSecondary;
|
||||
case bandolierRange:
|
||||
return MainRange;
|
||||
@ -2490,83 +2491,84 @@ static int16 BandolierSlotToWeaponSlot(int BandolierSlot) {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// in the players weapon slots.
|
||||
|
||||
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);
|
||||
strcpy(m_pp.bandoliers[bs->number].name, 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);
|
||||
|
||||
const ItemInst* InvItem = 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);
|
||||
InvItem = GetInv()[WeaponSlot];
|
||||
if(InvItem) {
|
||||
BaseItem = InvItem->GetItem();
|
||||
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].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);
|
||||
m_pp.bandoliers[bs->Number].Items[BandolierSlot].ID = BaseItem->ID;
|
||||
m_pp.bandoliers[bs->Number].Items[BandolierSlot].Icon = BaseItem->Icon;
|
||||
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 {
|
||||
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].icon = 0;
|
||||
m_pp.bandoliers[bs->Number].Items[BandolierSlot].ID = 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;
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s removing set", GetName(), bds->number);
|
||||
memset(m_pp.bandoliers[bds->number].name, 0, 32);
|
||||
for(int i = bandolierMainHand; i <= bandolierAmmo; i++) {
|
||||
m_pp.bandoliers[bds->number].items[i].item_id = 0;
|
||||
m_pp.bandoliers[bds->number].items[i].icon = 0;
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s removing set", GetName(), bds->Number);
|
||||
memset(m_pp.bandoliers[bds->Number].Name, 0, 32);
|
||||
for(int i = bandolierPrimary; i <= bandolierAmmo; i++) {
|
||||
m_pp.bandoliers[bds->Number].Items[i].ID = 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
|
||||
// any items currently in the weapon slots to inventory.
|
||||
|
||||
BandolierSet_Struct *bss = (BandolierSet_Struct*)app->pBuffer;
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s activating set %i", GetName(), bss->number);
|
||||
int16 slot;
|
||||
int16 WeaponSlot;
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Char: %s activating set %i", GetName(), bss->Number);
|
||||
int16 slot = 0;
|
||||
int16 WeaponSlot = 0;
|
||||
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
|
||||
// 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(m_pp.bandoliers[bss->number].items[BandolierSlot].item_id) {
|
||||
if(m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID) {
|
||||
WeaponSlot = BandolierSlotToWeaponSlot(BandolierSlot);
|
||||
|
||||
// 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);
|
||||
|
||||
// removed 'invWhereCursor' argument from above and implemented slots 30, 331-340 checks here
|
||||
if (slot == INVALID_INDEX) {
|
||||
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
|
||||
slot = MainCursor;
|
||||
}
|
||||
else if (m_inv.GetItem(MainCursor)->GetItem()->ItemClass == 1) {
|
||||
for(int16 CursorBagSlot = EmuConstants::CURSOR_BAG_BEGIN; CursorBagSlot <= EmuConstants::CURSOR_BAG_END; 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
|
||||
slot = CursorBagSlot;
|
||||
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
|
||||
// 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
|
||||
|
||||
WeaponSlot = BandolierSlotToWeaponSlot(BandolierSlot);
|
||||
|
||||
// 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(BandolierItems[BandolierSlot]) {
|
||||
// Pull the item that we are going to replace
|
||||
|
||||
@ -1175,20 +1175,21 @@ bool ZoneDatabase::LoadCharacterMaterialColor(uint32 character_id, PlayerProfile
|
||||
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);
|
||||
auto results = database.QueryDatabase(query); int i = 0; int r = 0; int si = 0;
|
||||
for (i = 0; i < EmuConstants::BANDOLIERS_COUNT; i++)
|
||||
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) {
|
||||
r = 0;
|
||||
i = atoi(row[r]); /* Bandolier ID */ r++;
|
||||
si = atoi(row[r]); /* Bandolier Slot */ r++;
|
||||
pp->bandoliers[i].items[si].item_id = atoi(row[r]); r++;
|
||||
pp->bandoliers[i].items[si].icon = atoi(row[r]); r++;
|
||||
strcpy(pp->bandoliers[i].name, row[r]); r++;
|
||||
pp->bandoliers[i].Items[si].ID = atoi(row[r]); r++;
|
||||
pp->bandoliers[i].Items[si].Icon = atoi(row[r]); r++;
|
||||
strcpy(pp->bandoliers[i].Name, row[r]); r++;
|
||||
si++;
|
||||
}
|
||||
return true;
|
||||
@ -1213,13 +1214,14 @@ bool ZoneDatabase::LoadCharacterTribute(uint32 character_id, PlayerProfile_Struc
|
||||
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);
|
||||
auto results = database.QueryDatabase(query); int i = 0;
|
||||
for (i = 0; i < EmuConstants::POTION_BELT_SIZE; i++){
|
||||
pp->potionbelt.items[i].icon = 0;
|
||||
pp->potionbelt.items[i].item_id = 0;
|
||||
strncpy(pp->potionbelt.items[i].item_name, "\0", 1);
|
||||
pp->potionbelt.Items[i].Icon = 0;
|
||||
pp->potionbelt.Items[i].ID = 0;
|
||||
strncpy(pp->potionbelt.Items[i].Name, "\0", 1);
|
||||
}
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
@ -1230,9 +1232,9 @@ bool ZoneDatabase::LoadCharacterPotions(uint32 character_id, PlayerProfile_Struc
|
||||
if(!item)
|
||||
continue;
|
||||
|
||||
pp->potionbelt.items[i].item_id = item_id;
|
||||
pp->potionbelt.items[i].icon = atoi(row[2]);
|
||||
strncpy(pp->potionbelt.items[i].item_name, item->Name, 64);
|
||||
pp->potionbelt.Items[i].ID = item_id;
|
||||
pp->potionbelt.Items[i].Icon = atoi(row[2]);
|
||||
strncpy(pp->potionbelt.Items[i].Name, item->Name, 64);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1326,7 +1328,8 @@ bool ZoneDatabase::SaveCharacterTribute(uint32 character_id, PlayerProfile_Struc
|
||||
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];
|
||||
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);
|
||||
@ -1335,7 +1338,8 @@ bool ZoneDatabase::SaveCharacterBandolier(uint32 character_id, uint8 bandolier_i
|
||||
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);
|
||||
auto results = QueryDatabase(query);
|
||||
return true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user