mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Finished ClientVersion naming conventions (don't forget to copy the renamed patch_UF.conf file)
This commit is contained in:
parent
fab3a988ae
commit
4832acde0b
@ -1,7 +1,10 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 01/27/2015 ==
|
||||||
|
Uleat: Finished ClientVersion update to include patch file and namespace updates - don't forget to copy the renamed 'patch_UF.conf' into your eqemu directory.)
|
||||||
|
|
||||||
== 01/26/2015 ==
|
== 01/26/2015 ==
|
||||||
Uleat: Changed Corpse::MoveItemToCorpse() to allow 'by address' passing of removed item slot list. Fixed a bug that would 'unattune' soulbound items inside of binds
|
Uleat: Changed Corpse::MoveItemToCorpse() to allow 'by address' passing of removed item slot list. Fixed a bug that kept soul-bound items inside of bags from attuning properly
|
||||||
|
|
||||||
== 01/25/2015 ==
|
== 01/25/2015 ==
|
||||||
Trevius: Fixed an issue where Mercenaries were causing several DB queries per second while suspended.
|
Trevius: Fixed an issue where Mercenaries were causing several DB queries per second while suspended.
|
||||||
@ -10,7 +13,7 @@ Trevius: Added Logs::Mercenaries to the new Logging System. Logging of Mercenar
|
|||||||
== 01/24/2015 ==
|
== 01/24/2015 ==
|
||||||
Uleat: Added equipment light source functionality to all mob derived classes (may still need tweaking...)
|
Uleat: Added equipment light source functionality to all mob derived classes (may still need tweaking...)
|
||||||
Notes:
|
Notes:
|
||||||
- In addition to equipment light sources, innate npc type light sources have already been activated
|
- In addition to equipment light sources, innate npc_type light sources have already been activated
|
||||||
- Valid light source values are 0 thru 15 (values are bitmask checked and limited to 0x0F)
|
- Valid light source values are 0 thru 15 (values are bitmask checked and limited to 0x0F)
|
||||||
- Not all classes handle equipment light sources the same way due to their equipment/loot list configurations
|
- Not all classes handle equipment light sources the same way due to their equipment/loot list configurations
|
||||||
- Spell (casting?) light sources may be implemented at some point..more information is needed
|
- Spell (casting?) light sources may be implemented at some point..more information is needed
|
||||||
@ -21,7 +24,7 @@ Notes:
|
|||||||
Akkadius: Massive Log System overhaul, see: http://wiki.eqemulator.org/p?Logging_System_Overhaul&frm=Main
|
Akkadius: Massive Log System overhaul, see: http://wiki.eqemulator.org/p?Logging_System_Overhaul&frm=Main
|
||||||
|
|
||||||
== 01/21/2015 ==
|
== 01/21/2015 ==
|
||||||
Uleat: Added `light` field to npctypes load query (all six clients tested positive for functionality.)
|
Uleat: Added `light` field to npc_types load query (all six clients tested positive for functionality.)
|
||||||
Note: This only affects 'innate' light. Equipment (other) light is still in-work.
|
Note: This only affects 'innate' light. Equipment (other) light is still in-work.
|
||||||
Optional SQL: utils/sql/git/optional/2015_01_21_NPC_Types_Light_Field_Primer.sql
|
Optional SQL: utils/sql/git/optional/2015_01_21_NPC_Types_Light_Field_Primer.sql
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ SET(common_sources
|
|||||||
patches/rof.cpp
|
patches/rof.cpp
|
||||||
patches/rof2.cpp
|
patches/rof2.cpp
|
||||||
patches/titanium.cpp
|
patches/titanium.cpp
|
||||||
patches/underfoot.cpp
|
patches/uf.cpp
|
||||||
SocketLib/Base64.cpp
|
SocketLib/Base64.cpp
|
||||||
SocketLib/File.cpp
|
SocketLib/File.cpp
|
||||||
SocketLib/HttpdCookies.cpp
|
SocketLib/HttpdCookies.cpp
|
||||||
@ -216,11 +216,11 @@ SET(common_headers
|
|||||||
patches/titanium_itemfields.h
|
patches/titanium_itemfields.h
|
||||||
patches/titanium_ops.h
|
patches/titanium_ops.h
|
||||||
patches/titanium_structs.h
|
patches/titanium_structs.h
|
||||||
patches/underfoot.h
|
patches/uf.h
|
||||||
patches/underfoot_constants.h
|
patches/uf_constants.h
|
||||||
patches/underfoot_itemfields.h
|
patches/uf_itemfields.h
|
||||||
patches/underfoot_ops.h
|
patches/uf_ops.h
|
||||||
patches/underfoot_structs.h
|
patches/uf_structs.h
|
||||||
SocketLib/Base64.h
|
SocketLib/Base64.h
|
||||||
SocketLib/File.h
|
SocketLib/File.h
|
||||||
SocketLib/HttpdCookies.h
|
SocketLib/HttpdCookies.h
|
||||||
@ -269,18 +269,18 @@ SOURCE_GROUP(Patches FILES
|
|||||||
patches/titanium_ops.h
|
patches/titanium_ops.h
|
||||||
patches/titanium_constants.h
|
patches/titanium_constants.h
|
||||||
patches/titanium_structs.h
|
patches/titanium_structs.h
|
||||||
patches/underfoot.h
|
patches/uf.h
|
||||||
patches/underfoot_itemfields.h
|
patches/uf_itemfields.h
|
||||||
patches/underfoot_ops.h
|
patches/uf_ops.h
|
||||||
patches/underfoot_constants.h
|
patches/uf_constants.h
|
||||||
patches/underfoot_structs.h
|
patches/uf_structs.h
|
||||||
patches/patches.cpp
|
patches/patches.cpp
|
||||||
patches/sod.cpp
|
patches/sod.cpp
|
||||||
patches/sof.cpp
|
patches/sof.cpp
|
||||||
patches/rof.cpp
|
patches/rof.cpp
|
||||||
patches/rof2.cpp
|
patches/rof2.cpp
|
||||||
patches/titanium.cpp
|
patches/titanium.cpp
|
||||||
patches/underfoot.cpp
|
patches/uf.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SOURCE_GROUP(SocketLib FILES
|
SOURCE_GROUP(SocketLib FILES
|
||||||
@ -330,7 +330,7 @@ ADD_LIBRARY(common ${common_sources} ${common_headers})
|
|||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
ADD_DEFINITIONS(-fPIC)
|
ADD_DEFINITIONS(-fPIC)
|
||||||
SET_SOURCE_FILES_PROPERTIES("SocketLib/Mime.cpp" PROPERTY COMPILE_FLAGS -Wno-unused-result)
|
SET_SOURCE_FILES_PROPERTIES("SocketLib/Mime.cpp" PROPERTY COMPILE_FLAGS -Wno-unused-result)
|
||||||
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/uf.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -7,14 +7,14 @@ static const uint32 BIT_Client62 = 1;
|
|||||||
static const uint32 BIT_Titanium = 2;
|
static const uint32 BIT_Titanium = 2;
|
||||||
static const uint32 BIT_SoF = 4;
|
static const uint32 BIT_SoF = 4;
|
||||||
static const uint32 BIT_SoD = 8;
|
static const uint32 BIT_SoD = 8;
|
||||||
static const uint32 BIT_Underfoot = 16;
|
static const uint32 BIT_UF = 16;
|
||||||
static const uint32 BIT_RoF = 32;
|
static const uint32 BIT_RoF = 32;
|
||||||
static const uint32 BIT_RoF2 = 64;
|
static const uint32 BIT_RoF2 = 64;
|
||||||
|
|
||||||
static const uint32 BIT_TitaniumAndEarlier = 0x00000003;
|
static const uint32 BIT_TitaniumAndEarlier = 0x00000003;
|
||||||
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
|
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
|
||||||
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
|
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
|
||||||
static const uint32 BIT_UnderfootAndLater = 0xFFFFFFF0;
|
static const uint32 BIT_UFAndLater = 0xFFFFFFF0;
|
||||||
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
|
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
|
||||||
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
|
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
|
||||||
static const uint32 BIT_AllClients = 0xFFFFFFFF;
|
static const uint32 BIT_AllClients = 0xFFFFFFFF;
|
||||||
@ -23,10 +23,10 @@ enum class ClientVersion
|
|||||||
{
|
{
|
||||||
Unknown = 0,
|
Unknown = 0,
|
||||||
Client62, // Build: 'Aug 4 2005 15:40:59'
|
Client62, // Build: 'Aug 4 2005 15:40:59'
|
||||||
Tit, // Build: 'Oct 31 2005 10:33:37'
|
Titanium, // Build: 'Oct 31 2005 10:33:37'
|
||||||
SoF, // Build: 'Sep 7 2007 09:11:49'
|
SoF, // Build: 'Sep 7 2007 09:11:49'
|
||||||
SoD, // Build: 'Dec 19 2008 15:22:49'
|
SoD, // Build: 'Dec 19 2008 15:22:49'
|
||||||
Und, // Build: 'Jun 8 2010 16:44:32'
|
UF, // Build: 'Jun 8 2010 16:44:32'
|
||||||
RoF, // Build: 'Dec 10 2012 17:35:44'
|
RoF, // Build: 'Dec 10 2012 17:35:44'
|
||||||
RoF2, // Build: 'May 10 2013 23:30:08'
|
RoF2, // Build: 'May 10 2013 23:30:08'
|
||||||
|
|
||||||
@ -49,14 +49,14 @@ static const char* ClientVersionName(ClientVersion version)
|
|||||||
return "ClientVersion::Unknown";
|
return "ClientVersion::Unknown";
|
||||||
case ClientVersion::Client62:
|
case ClientVersion::Client62:
|
||||||
return "ClientVersion::Client62";
|
return "ClientVersion::Client62";
|
||||||
case ClientVersion::Tit:
|
case ClientVersion::Titanium:
|
||||||
return "ClientVersion::Tit";
|
return "ClientVersion::Titanium";
|
||||||
case ClientVersion::SoF:
|
case ClientVersion::SoF:
|
||||||
return "ClientVersion::SoF";
|
return "ClientVersion::SoF";
|
||||||
case ClientVersion::SoD:
|
case ClientVersion::SoD:
|
||||||
return "ClientVersion::SoD";
|
return "ClientVersion::SoD";
|
||||||
case ClientVersion::Und:
|
case ClientVersion::UF:
|
||||||
return "ClientVersion::Und";
|
return "ClientVersion::UF";
|
||||||
case ClientVersion::RoF:
|
case ClientVersion::RoF:
|
||||||
return "ClientVersion::RoF";
|
return "ClientVersion::RoF";
|
||||||
case ClientVersion::RoF2:
|
case ClientVersion::RoF2:
|
||||||
|
|||||||
@ -492,7 +492,7 @@ uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion) {
|
|||||||
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
|
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
|
||||||
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
|
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
|
||||||
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
|
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
|
||||||
/*Underfoot*/ Underfoot::consts::MAP_CORPSE_SIZE,
|
/*Underfoot*/ UF::consts::MAP_CORPSE_SIZE,
|
||||||
/*RoF*/ RoF::consts::MAP_CORPSE_SIZE,
|
/*RoF*/ RoF::consts::MAP_CORPSE_SIZE,
|
||||||
/*RoF2*/ RoF2::consts::MAP_CORPSE_SIZE,
|
/*RoF2*/ RoF2::consts::MAP_CORPSE_SIZE,
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion) {
|
|||||||
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
|
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
|
||||||
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
|
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
|
||||||
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
|
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
|
||||||
/*Underfoot*/ Underfoot::consts::MAP_INSPECT_SIZE,
|
/*Underfoot*/ UF::consts::MAP_INSPECT_SIZE,
|
||||||
/*RoF*/ RoF::consts::MAP_INSPECT_SIZE,
|
/*RoF*/ RoF::consts::MAP_INSPECT_SIZE,
|
||||||
/*RoF2*/ RoF2::consts::MAP_INSPECT_SIZE,
|
/*RoF2*/ RoF2::consts::MAP_INSPECT_SIZE,
|
||||||
|
|
||||||
@ -800,7 +800,7 @@ bool EQLimits::AllowsEmptyBagInBag(ClientVersion clientVersion) {
|
|||||||
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
/*Underfoot*/ Underfoot::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*Underfoot*/ UF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
/*RoF2*/ RoF2::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*RoF2*/ RoF2::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
|
|
||||||
@ -821,7 +821,7 @@ bool EQLimits::AllowsClickCastFromBag(ClientVersion clientVersion) {
|
|||||||
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
/*Underfoot*/ Underfoot::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*Underfoot*/ UF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
/*RoF*/ RoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*RoF*/ RoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
/*RoF2*/ RoF2::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*RoF2*/ RoF2::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
|
|
||||||
@ -882,7 +882,7 @@ bool EQLimits::CoinHasWeight(ClientVersion clientVersion) {
|
|||||||
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
|
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
|
||||||
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
|
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
|
||||||
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
|
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
|
||||||
/*Underfoot*/ Underfoot::limits::COIN_HAS_WEIGHT,
|
/*Underfoot*/ UF::limits::COIN_HAS_WEIGHT,
|
||||||
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
|
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
|
||||||
/*RoF2*/ RoF::limits::COIN_HAS_WEIGHT,
|
/*RoF2*/ RoF::limits::COIN_HAS_WEIGHT,
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
#include "../common/patches/titanium_constants.h"
|
#include "../common/patches/titanium_constants.h"
|
||||||
#include "../common/patches/sof_constants.h"
|
#include "../common/patches/sof_constants.h"
|
||||||
#include "../common/patches/sod_constants.h"
|
#include "../common/patches/sod_constants.h"
|
||||||
#include "../common/patches/underfoot_constants.h"
|
#include "../common/patches/uf_constants.h"
|
||||||
#include "../common/patches/rof_constants.h"
|
#include "../common/patches/rof_constants.h"
|
||||||
#include "../common/patches/rof2_constants.h"
|
#include "../common/patches/rof2_constants.h"
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
#include "patches.h"
|
#include "patches.h"
|
||||||
|
|
||||||
#include "titanium.h"
|
#include "titanium.h"
|
||||||
#include "underfoot.h"
|
#include "uf.h"
|
||||||
#include "sof.h"
|
#include "sof.h"
|
||||||
#include "sod.h"
|
#include "sod.h"
|
||||||
#include "rof.h"
|
#include "rof.h"
|
||||||
@ -13,7 +13,7 @@ void RegisterAllPatches(EQStreamIdentifier &into) {
|
|||||||
Titanium::Register(into);
|
Titanium::Register(into);
|
||||||
SoF::Register(into);
|
SoF::Register(into);
|
||||||
SoD::Register(into);
|
SoD::Register(into);
|
||||||
Underfoot::Register(into);
|
UF::Register(into);
|
||||||
RoF::Register(into);
|
RoF::Register(into);
|
||||||
RoF2::Register(into);
|
RoF2::Register(into);
|
||||||
}
|
}
|
||||||
@ -22,7 +22,7 @@ void ReloadAllPatches() {
|
|||||||
Titanium::Reload();
|
Titanium::Reload();
|
||||||
SoF::Reload();
|
SoF::Reload();
|
||||||
SoD::Reload();
|
SoD::Reload();
|
||||||
Underfoot::Reload();
|
UF::Reload();
|
||||||
RoF::Reload();
|
RoF::Reload();
|
||||||
RoF2::Reload();
|
RoF2::Reload();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,14 +25,14 @@ namespace RoF
|
|||||||
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
|
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline structs::ItemSlotStruct ServerToRoFSlot(uint32 ServerSlot);
|
static inline structs::ItemSlotStruct ServerToRoFSlot(uint32 serverSlot);
|
||||||
static inline structs::MainInvItemSlotStruct ServerToRoFMainInvSlot(uint32 ServerSlot);
|
static inline structs::MainInvItemSlotStruct ServerToRoFMainInvSlot(uint32 serverSlot);
|
||||||
static inline uint32 ServerToRoFCorpseSlot(uint32 ServerCorpse);
|
static inline uint32 ServerToRoFCorpseSlot(uint32 serverCorpseSlot);
|
||||||
|
|
||||||
// client to server inventory location converters
|
// client to server inventory location converters
|
||||||
static inline uint32 RoFToServerSlot(structs::ItemSlotStruct RoFSlot);
|
static inline uint32 RoFToServerSlot(structs::ItemSlotStruct rofSlot);
|
||||||
static inline uint32 RoFToServerMainInvSlot(structs::MainInvItemSlotStruct RoFSlot);
|
static inline uint32 RoFToServerMainInvSlot(structs::MainInvItemSlotStruct rofSlot);
|
||||||
static inline uint32 RoFToServerCorpseSlot(uint32 RoFCorpse);
|
static inline uint32 RoFToServerCorpseSlot(uint32 rofCorpseSlot);
|
||||||
|
|
||||||
// server to client text link converter
|
// server to client text link converter
|
||||||
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink);
|
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink);
|
||||||
@ -4650,7 +4650,7 @@ namespace RoF
|
|||||||
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Moved item from %u to %u", eq->from_slot.MainSlot, eq->to_slot.MainSlot);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Moved item from %u to %u", eq->from_slot.MainSlot, eq->to_slot.MainSlot);
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] MoveItem SlotType from %i to %i, MainSlot from %i to %i, SubSlot from %i to %i, AugSlot from %i to %i, Unknown01 from %i to %i, Number %u", eq->from_slot.SlotType, eq->to_slot.SlotType, eq->from_slot.MainSlot, eq->to_slot.MainSlot, eq->from_slot.SubSlot, eq->to_slot.SubSlot, eq->from_slot.AugSlot, eq->to_slot.AugSlot, eq->from_slot.Unknown01, eq->to_slot.Unknown01, eq->number_in_stack);
|
Log.Out(Logs::General, Logs::Netcode, "[RoF] MoveItem SlotType from %i to %i, MainSlot from %i to %i, SubSlot from %i to %i, AugSlot from %i to %i, Unknown01 from %i to %i, Number %u", eq->from_slot.SlotType, eq->to_slot.SlotType, eq->from_slot.MainSlot, eq->to_slot.MainSlot, eq->from_slot.SubSlot, eq->to_slot.SubSlot, eq->from_slot.AugSlot, eq->to_slot.AugSlot, eq->from_slot.Unknown01, eq->to_slot.Unknown01, eq->number_in_stack);
|
||||||
emu->from_slot = RoFToServerSlot(eq->from_slot);
|
emu->from_slot = RoFToServerSlot(eq->from_slot);
|
||||||
emu->to_slot = RoFToServerSlot(eq->to_slot);
|
emu->to_slot = RoFToServerSlot(eq->to_slot);
|
||||||
IN(number_in_stack);
|
IN(number_in_stack);
|
||||||
@ -5507,7 +5507,7 @@ namespace RoF
|
|||||||
return item_serial;
|
return item_serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline structs::ItemSlotStruct ServerToRoFSlot(uint32 ServerSlot)
|
static inline structs::ItemSlotStruct ServerToRoFSlot(uint32 serverSlot)
|
||||||
{
|
{
|
||||||
structs::ItemSlotStruct RoFSlot;
|
structs::ItemSlotStruct RoFSlot;
|
||||||
RoFSlot.SlotType = INVALID_INDEX;
|
RoFSlot.SlotType = INVALID_INDEX;
|
||||||
@ -5519,17 +5519,17 @@ namespace RoF
|
|||||||
|
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (ServerSlot < 56 || ServerSlot == MainPowerSource) { // Main Inventory and Cursor
|
if (serverSlot < 56 || serverSlot == MainPowerSource) { // Main Inventory and Cursor
|
||||||
RoFSlot.SlotType = maps::MapPossessions;
|
RoFSlot.SlotType = maps::MapPossessions;
|
||||||
RoFSlot.MainSlot = ServerSlot;
|
RoFSlot.MainSlot = serverSlot;
|
||||||
|
|
||||||
if (ServerSlot == MainPowerSource)
|
if (serverSlot == MainPowerSource)
|
||||||
RoFSlot.MainSlot = slots::MainPowerSource;
|
RoFSlot.MainSlot = slots::MainPowerSource;
|
||||||
|
|
||||||
else if (ServerSlot >= MainCursor) // Cursor and Extended Corpse Inventory
|
else if (serverSlot >= MainCursor) // Cursor and Extended Corpse Inventory
|
||||||
RoFSlot.MainSlot += 3;
|
RoFSlot.MainSlot += 3;
|
||||||
|
|
||||||
else if (ServerSlot >= MainAmmo) // (> 20)
|
else if (serverSlot >= MainAmmo) // (> 20)
|
||||||
RoFSlot.MainSlot += 1;
|
RoFSlot.MainSlot += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5538,9 +5538,9 @@ namespace RoF
|
|||||||
RoFSlot.MainSlot = ServerSlot - 31;
|
RoFSlot.MainSlot = ServerSlot - 31;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::GENERAL_BAGS_BEGIN && ServerSlot <= EmuConstants::CURSOR_BAG_END) { // (> 250 && < 341)
|
else if (serverSlot >= EmuConstants::GENERAL_BAGS_BEGIN && serverSlot <= EmuConstants::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||||
RoFSlot.SlotType = maps::MapPossessions;
|
RoFSlot.SlotType = maps::MapPossessions;
|
||||||
TempSlot = ServerSlot - 1;
|
TempSlot = serverSlot - 1;
|
||||||
RoFSlot.MainSlot = int(TempSlot / EmuConstants::ITEM_CONTAINER_SIZE) - 2;
|
RoFSlot.MainSlot = int(TempSlot / EmuConstants::ITEM_CONTAINER_SIZE) - 2;
|
||||||
RoFSlot.SubSlot = TempSlot - ((RoFSlot.MainSlot + 2) * EmuConstants::ITEM_CONTAINER_SIZE);
|
RoFSlot.SubSlot = TempSlot - ((RoFSlot.MainSlot + 2) * EmuConstants::ITEM_CONTAINER_SIZE);
|
||||||
|
|
||||||
@ -5548,14 +5548,14 @@ namespace RoF
|
|||||||
RoFSlot.MainSlot = slots::MainCursor;
|
RoFSlot.MainSlot = slots::MainCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::TRIBUTE_BEGIN && ServerSlot <= EmuConstants::TRIBUTE_END) { // Tribute
|
else if (serverSlot >= EmuConstants::TRIBUTE_BEGIN && serverSlot <= EmuConstants::TRIBUTE_END) { // Tribute
|
||||||
RoFSlot.SlotType = maps::MapTribute;
|
RoFSlot.SlotType = maps::MapTribute;
|
||||||
RoFSlot.MainSlot = ServerSlot - EmuConstants::TRIBUTE_BEGIN;
|
RoFSlot.MainSlot = serverSlot - EmuConstants::TRIBUTE_BEGIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::BANK_BEGIN && ServerSlot <= EmuConstants::BANK_BAGS_END) {
|
else if (serverSlot >= EmuConstants::BANK_BEGIN && serverSlot <= EmuConstants::BANK_BAGS_END) {
|
||||||
RoFSlot.SlotType = maps::MapBank;
|
RoFSlot.SlotType = maps::MapBank;
|
||||||
TempSlot = ServerSlot - EmuConstants::BANK_BEGIN;
|
TempSlot = serverSlot - EmuConstants::BANK_BEGIN;
|
||||||
RoFSlot.MainSlot = TempSlot;
|
RoFSlot.MainSlot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) { // (> 30)
|
if (TempSlot > 30) { // (> 30)
|
||||||
@ -5564,9 +5564,9 @@ namespace RoF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::SHARED_BANK_BEGIN && ServerSlot <= EmuConstants::SHARED_BANK_BAGS_END) {
|
else if (serverSlot >= EmuConstants::SHARED_BANK_BEGIN && serverSlot <= EmuConstants::SHARED_BANK_BAGS_END) {
|
||||||
RoFSlot.SlotType = maps::MapSharedBank;
|
RoFSlot.SlotType = maps::MapSharedBank;
|
||||||
TempSlot = ServerSlot - EmuConstants::SHARED_BANK_BEGIN;
|
TempSlot = serverSlot - EmuConstants::SHARED_BANK_BEGIN;
|
||||||
RoFSlot.MainSlot = TempSlot;
|
RoFSlot.MainSlot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) { // (> 30)
|
if (TempSlot > 30) { // (> 30)
|
||||||
@ -5575,9 +5575,9 @@ namespace RoF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::TRADE_BEGIN && ServerSlot <= EmuConstants::TRADE_BAGS_END) {
|
else if (serverSlot >= EmuConstants::TRADE_BEGIN && serverSlot <= EmuConstants::TRADE_BAGS_END) {
|
||||||
RoFSlot.SlotType = maps::MapTrade;
|
RoFSlot.SlotType = maps::MapTrade;
|
||||||
TempSlot = ServerSlot - EmuConstants::TRADE_BEGIN;
|
TempSlot = serverSlot - EmuConstants::TRADE_BEGIN;
|
||||||
RoFSlot.MainSlot = TempSlot;
|
RoFSlot.MainSlot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) {
|
if (TempSlot > 30) {
|
||||||
@ -5599,18 +5599,18 @@ namespace RoF
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::WORLD_BEGIN && ServerSlot <= EmuConstants::WORLD_END) {
|
else if (serverSlot >= EmuConstants::WORLD_BEGIN && serverSlot <= EmuConstants::WORLD_END) {
|
||||||
RoFSlot.SlotType = maps::MapWorld;
|
RoFSlot.SlotType = maps::MapWorld;
|
||||||
TempSlot = ServerSlot - EmuConstants::WORLD_BEGIN;
|
TempSlot = serverSlot - EmuConstants::WORLD_BEGIN;
|
||||||
RoFSlot.MainSlot = TempSlot;
|
RoFSlot.MainSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i", ServerSlot, RoFSlot.SlotType, RoFSlot.Unknown02, RoFSlot.MainSlot, RoFSlot.SubSlot, RoFSlot.AugSlot, RoFSlot.Unknown01);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.SlotType, RoFSlot.Unknown02, RoFSlot.MainSlot, RoFSlot.SubSlot, RoFSlot.AugSlot, RoFSlot.Unknown01);
|
||||||
|
|
||||||
return RoFSlot;
|
return RoFSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline structs::MainInvItemSlotStruct ServerToRoFMainInvSlot(uint32 ServerSlot)
|
static inline structs::MainInvItemSlotStruct ServerToRoFMainInvSlot(uint32 serverSlot)
|
||||||
{
|
{
|
||||||
structs::MainInvItemSlotStruct RoFSlot;
|
structs::MainInvItemSlotStruct RoFSlot;
|
||||||
RoFSlot.MainSlot = INVALID_INDEX;
|
RoFSlot.MainSlot = INVALID_INDEX;
|
||||||
@ -5620,16 +5620,16 @@ namespace RoF
|
|||||||
|
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (ServerSlot < 56 || ServerSlot == MainPowerSource) { // (< 52)
|
if (serverSlot < 56 || serverSlot == MainPowerSource) { // (< 52)
|
||||||
RoFSlot.MainSlot = ServerSlot;
|
RoFSlot.MainSlot = serverSlot;
|
||||||
|
|
||||||
if (ServerSlot == MainPowerSource)
|
if (serverSlot == MainPowerSource)
|
||||||
RoFSlot.MainSlot = slots::MainPowerSource;
|
RoFSlot.MainSlot = slots::MainPowerSource;
|
||||||
|
|
||||||
else if (ServerSlot >= MainCursor) // Cursor and Extended Corpse Inventory
|
else if (serverSlot >= MainCursor) // Cursor and Extended Corpse Inventory
|
||||||
RoFSlot.MainSlot += 3;
|
RoFSlot.MainSlot += 3;
|
||||||
|
|
||||||
else if (ServerSlot >= MainAmmo) // Ammo and Personl Inventory
|
else if (serverSlot >= MainAmmo) // Ammo and Personl Inventory
|
||||||
RoFSlot.MainSlot += 1;
|
RoFSlot.MainSlot += 1;
|
||||||
|
|
||||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||||
@ -5640,33 +5640,33 @@ namespace RoF
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::GENERAL_BAGS_BEGIN && ServerSlot <= EmuConstants::CURSOR_BAG_END) {
|
else if (serverSlot >= EmuConstants::GENERAL_BAGS_BEGIN && serverSlot <= EmuConstants::CURSOR_BAG_END) {
|
||||||
TempSlot = ServerSlot - 1;
|
TempSlot = serverSlot - 1;
|
||||||
RoFSlot.MainSlot = int(TempSlot / EmuConstants::ITEM_CONTAINER_SIZE) - 2;
|
RoFSlot.MainSlot = int(TempSlot / EmuConstants::ITEM_CONTAINER_SIZE) - 2;
|
||||||
RoFSlot.SubSlot = TempSlot - ((RoFSlot.MainSlot + 2) * EmuConstants::ITEM_CONTAINER_SIZE);
|
RoFSlot.SubSlot = TempSlot - ((RoFSlot.MainSlot + 2) * EmuConstants::ITEM_CONTAINER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", ServerSlot, RoFSlot.MainSlot, RoFSlot.SubSlot, RoFSlot.AugSlot, RoFSlot.Unknown01);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.MainSlot, RoFSlot.SubSlot, RoFSlot.AugSlot, RoFSlot.Unknown01);
|
||||||
|
|
||||||
return RoFSlot;
|
return RoFSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 ServerToRoFCorpseSlot(uint32 ServerCorpse)
|
static inline uint32 ServerToRoFCorpseSlot(uint32 serverCorpseSlot)
|
||||||
{
|
{
|
||||||
return (ServerCorpse + 1);
|
return (serverCorpseSlot + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 RoFToServerSlot(structs::ItemSlotStruct RoFSlot)
|
static inline uint32 RoFToServerSlot(structs::ItemSlotStruct rofSlot)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = INVALID_INDEX;
|
uint32 ServerSlot = INVALID_INDEX;
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (RoFSlot.SlotType == maps::MapPossessions && RoFSlot.MainSlot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
if (rofSlot.SlotType == maps::MapPossessions && rofSlot.MainSlot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||||
if (RoFSlot.MainSlot == slots::MainPowerSource)
|
if (rofSlot.MainSlot == slots::MainPowerSource)
|
||||||
TempSlot = MainPowerSource;
|
TempSlot = MainPowerSource;
|
||||||
|
|
||||||
else if (RoFSlot.MainSlot >= slots::MainCursor) // Cursor and Extended Corpse Inventory
|
else if (rofSlot.MainSlot >= slots::MainCursor) // Cursor and Extended Corpse Inventory
|
||||||
TempSlot = RoFSlot.MainSlot - 3;
|
TempSlot = rofSlot.MainSlot - 3;
|
||||||
|
|
||||||
/*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory/corpse slots
|
/*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory/corpse slots
|
||||||
// Need to figure out what to do when we get these
|
// Need to figure out what to do when we get these
|
||||||
@ -5679,61 +5679,61 @@ namespace RoF
|
|||||||
// For now, it's probably best to leave as-is and let this work itself out in the inventory rework.
|
// For now, it's probably best to leave as-is and let this work itself out in the inventory rework.
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
else if (RoFSlot.MainSlot >= slots::MainAmmo) // Ammo and Main Inventory
|
else if (rofSlot.MainSlot >= slots::MainAmmo) // Ammo and Main Inventory
|
||||||
TempSlot = RoFSlot.MainSlot - 1;
|
TempSlot = rofSlot.MainSlot - 1;
|
||||||
|
|
||||||
else // Worn Slots
|
else // Worn Slots
|
||||||
TempSlot = RoFSlot.MainSlot;
|
TempSlot = rofSlot.MainSlot;
|
||||||
|
|
||||||
if (RoFSlot.SubSlot >= SUB_BEGIN) // Bag Slots
|
if (rofSlot.SubSlot >= SUB_BEGIN) // Bag Slots
|
||||||
TempSlot = ((TempSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot + 1;
|
TempSlot = ((TempSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rofSlot.SubSlot + 1;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoFSlot.SlotType == maps::MapBank) {
|
else if (rofSlot.SlotType == maps::MapBank) {
|
||||||
TempSlot = EmuConstants::BANK_BEGIN;
|
TempSlot = EmuConstants::BANK_BEGIN;
|
||||||
|
|
||||||
if (RoFSlot.SubSlot >= SUB_BEGIN)
|
if (rofSlot.SubSlot >= SUB_BEGIN)
|
||||||
TempSlot += ((RoFSlot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot + 1;
|
TempSlot += ((rofSlot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rofSlot.SubSlot + 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += RoFSlot.MainSlot;
|
TempSlot += rofSlot.MainSlot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoFSlot.SlotType == maps::MapSharedBank) {
|
else if (rofSlot.SlotType == maps::MapSharedBank) {
|
||||||
TempSlot = EmuConstants::SHARED_BANK_BEGIN;
|
TempSlot = EmuConstants::SHARED_BANK_BEGIN;
|
||||||
|
|
||||||
if (RoFSlot.SubSlot >= SUB_BEGIN)
|
if (rofSlot.SubSlot >= SUB_BEGIN)
|
||||||
TempSlot += ((RoFSlot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot + 1;
|
TempSlot += ((rofSlot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rofSlot.SubSlot + 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += RoFSlot.MainSlot;
|
TempSlot += rofSlot.MainSlot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoFSlot.SlotType == maps::MapTrade) {
|
else if (rofSlot.SlotType == maps::MapTrade) {
|
||||||
TempSlot = EmuConstants::TRADE_BEGIN;
|
TempSlot = EmuConstants::TRADE_BEGIN;
|
||||||
|
|
||||||
if (RoFSlot.SubSlot >= SUB_BEGIN)
|
if (rofSlot.SubSlot >= SUB_BEGIN)
|
||||||
TempSlot += ((RoFSlot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot + 1;
|
TempSlot += ((rofSlot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rofSlot.SubSlot + 1;
|
||||||
// OLD CODE:
|
// OLD CODE:
|
||||||
//TempSlot += 100 + (RoFSlot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
//TempSlot += 100 + (RoFSlot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += RoFSlot.MainSlot;
|
TempSlot += rofSlot.MainSlot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoFSlot.SlotType == maps::MapWorld) {
|
else if (rofSlot.SlotType == maps::MapWorld) {
|
||||||
TempSlot = EmuConstants::WORLD_BEGIN;
|
TempSlot = EmuConstants::WORLD_BEGIN;
|
||||||
|
|
||||||
if (RoFSlot.MainSlot >= SUB_BEGIN)
|
if (rofSlot.MainSlot >= SUB_BEGIN)
|
||||||
TempSlot += RoFSlot.MainSlot;
|
TempSlot += rofSlot.MainSlot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
@ -5747,26 +5747,26 @@ namespace RoF
|
|||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
else if (RoFSlot.SlotType == maps::MapGuildTribute) {
|
else if (rofSlot.SlotType == maps::MapGuildTribute) {
|
||||||
ServerSlot = INVALID_INDEX;
|
ServerSlot = INVALID_INDEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", RoFSlot.SlotType, RoFSlot.Unknown02, RoFSlot.MainSlot, RoFSlot.SubSlot, RoFSlot.AugSlot, RoFSlot.Unknown01, ServerSlot);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rofSlot.SlotType, rofSlot.Unknown02, rofSlot.MainSlot, rofSlot.SubSlot, rofSlot.AugSlot, rofSlot.Unknown01, ServerSlot);
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 RoFToServerMainInvSlot(structs::MainInvItemSlotStruct RoFSlot)
|
static inline uint32 RoFToServerMainInvSlot(structs::MainInvItemSlotStruct rofSlot)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = INVALID_INDEX;
|
uint32 ServerSlot = INVALID_INDEX;
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (RoFSlot.MainSlot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
if (rofSlot.MainSlot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||||
if (RoFSlot.MainSlot == slots::MainPowerSource)
|
if (rofSlot.MainSlot == slots::MainPowerSource)
|
||||||
TempSlot = MainPowerSource;
|
TempSlot = MainPowerSource;
|
||||||
|
|
||||||
else if (RoFSlot.MainSlot >= slots::MainCursor) // Cursor and Extended Corpse Inventory
|
else if (rofSlot.MainSlot >= slots::MainCursor) // Cursor and Extended Corpse Inventory
|
||||||
TempSlot = RoFSlot.MainSlot - 3;
|
TempSlot = rofSlot.MainSlot - 3;
|
||||||
|
|
||||||
/*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory slots
|
/*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory slots
|
||||||
// Need to figure out what to do when we get these
|
// Need to figure out what to do when we get these
|
||||||
@ -5774,26 +5774,26 @@ namespace RoF
|
|||||||
// Same as above
|
// Same as above
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
else if (RoFSlot.MainSlot >= slots::MainAmmo) // Main Inventory and Ammo Slots
|
else if (rofSlot.MainSlot >= slots::MainAmmo) // Main Inventory and Ammo Slots
|
||||||
TempSlot = RoFSlot.MainSlot - 1;
|
TempSlot = rofSlot.MainSlot - 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot = RoFSlot.MainSlot;
|
TempSlot = rofSlot.MainSlot;
|
||||||
|
|
||||||
if (RoFSlot.SubSlot >= SUB_BEGIN) // Bag Slots
|
if (rofSlot.SubSlot >= SUB_BEGIN) // Bag Slots
|
||||||
TempSlot = ((TempSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot + 1;
|
TempSlot = ((TempSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rofSlot.SubSlot + 1;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", RoFSlot.MainSlot, RoFSlot.SubSlot, RoFSlot.AugSlot, RoFSlot.Unknown01, ServerSlot);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rofSlot.MainSlot, rofSlot.SubSlot, rofSlot.AugSlot, rofSlot.Unknown01, ServerSlot);
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 RoFToServerCorpseSlot(uint32 RoFCorpse)
|
static inline uint32 RoFToServerCorpseSlot(uint32 rofCorpseSlot)
|
||||||
{
|
{
|
||||||
return (RoFCorpse - 1);
|
return (rofCorpseSlot - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink)
|
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef RoF_H_
|
#ifndef ROF_H_
|
||||||
#define RoF_H_
|
#define ROF_H_
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
#include "../struct_strategy.h"
|
||||||
|
|
||||||
@ -32,6 +32,4 @@ namespace RoF {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /*ROF_H_*/
|
||||||
|
|
||||||
#endif /*RoF_H_*/
|
|
||||||
|
|||||||
@ -25,14 +25,14 @@ namespace RoF2
|
|||||||
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth, ItemPacketType packet_type);
|
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth, ItemPacketType packet_type);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline structs::ItemSlotStruct ServerToRoF2Slot(uint32 ServerSlot, ItemPacketType PacketType = ItemPacketInvalid);
|
static inline structs::ItemSlotStruct ServerToRoF2Slot(uint32 serverSlot, ItemPacketType PacketType = ItemPacketInvalid);
|
||||||
static inline structs::MainInvItemSlotStruct ServerToRoF2MainInvSlot(uint32 ServerSlot);
|
static inline structs::MainInvItemSlotStruct ServerToRoF2MainInvSlot(uint32 serverSlot);
|
||||||
static inline uint32 ServerToRoF2CorpseSlot(uint32 ServerCorpse);
|
static inline uint32 ServerToRoF2CorpseSlot(uint32 serverCorpseSlot);
|
||||||
|
|
||||||
// client to server inventory location converters
|
// client to server inventory location converters
|
||||||
static inline uint32 RoF2ToServerSlot(structs::ItemSlotStruct RoF2Slot, ItemPacketType PacketType = ItemPacketInvalid);
|
static inline uint32 RoF2ToServerSlot(structs::ItemSlotStruct rof2Slot, ItemPacketType PacketType = ItemPacketInvalid);
|
||||||
static inline uint32 RoF2ToServerMainInvSlot(structs::MainInvItemSlotStruct RoF2Slot);
|
static inline uint32 RoF2ToServerMainInvSlot(structs::MainInvItemSlotStruct rof2Slot);
|
||||||
static inline uint32 RoF2ToServerCorpseSlot(uint32 RoF2Corpse);
|
static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot);
|
||||||
|
|
||||||
// server to client text link converter
|
// server to client text link converter
|
||||||
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink);
|
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink);
|
||||||
@ -4720,7 +4720,7 @@ namespace RoF2
|
|||||||
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
||||||
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] MoveItem SlotType from %i to %i, MainSlot from %i to %i, SubSlot from %i to %i, AugSlot from %i to %i, Unknown01 from %i to %i, Number %u", eq->from_slot.SlotType, eq->to_slot.SlotType, eq->from_slot.MainSlot, eq->to_slot.MainSlot, eq->from_slot.SubSlot, eq->to_slot.SubSlot, eq->from_slot.AugSlot, eq->to_slot.AugSlot, eq->from_slot.Unknown01, eq->to_slot.Unknown01, eq->number_in_stack);
|
Log.Out(Logs::General, Logs::Netcode, "[RoF2] MoveItem SlotType from %i to %i, MainSlot from %i to %i, SubSlot from %i to %i, AugSlot from %i to %i, Unknown01 from %i to %i, Number %u", eq->from_slot.SlotType, eq->to_slot.SlotType, eq->from_slot.MainSlot, eq->to_slot.MainSlot, eq->from_slot.SubSlot, eq->to_slot.SubSlot, eq->from_slot.AugSlot, eq->to_slot.AugSlot, eq->from_slot.Unknown01, eq->to_slot.Unknown01, eq->number_in_stack);
|
||||||
emu->from_slot = RoF2ToServerSlot(eq->from_slot);
|
emu->from_slot = RoF2ToServerSlot(eq->from_slot);
|
||||||
emu->to_slot = RoF2ToServerSlot(eq->to_slot);
|
emu->to_slot = RoF2ToServerSlot(eq->to_slot);
|
||||||
IN(number_in_stack);
|
IN(number_in_stack);
|
||||||
@ -5589,7 +5589,7 @@ namespace RoF2
|
|||||||
return item_serial;
|
return item_serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline structs::ItemSlotStruct ServerToRoF2Slot(uint32 ServerSlot, ItemPacketType PacketType)
|
static inline structs::ItemSlotStruct ServerToRoF2Slot(uint32 serverSlot, ItemPacketType PacketType)
|
||||||
{
|
{
|
||||||
structs::ItemSlotStruct RoF2Slot;
|
structs::ItemSlotStruct RoF2Slot;
|
||||||
RoF2Slot.SlotType = INVALID_INDEX;
|
RoF2Slot.SlotType = INVALID_INDEX;
|
||||||
@ -5601,25 +5601,25 @@ namespace RoF2
|
|||||||
|
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (ServerSlot < 56 || ServerSlot == MainPowerSource) { // Main Inventory and Cursor
|
if (serverSlot < 56 || serverSlot == MainPowerSource) { // Main Inventory and Cursor
|
||||||
if (PacketType == ItemPacketLoot)
|
if (PacketType == ItemPacketLoot)
|
||||||
{
|
{
|
||||||
RoF2Slot.SlotType = maps::MapCorpse;
|
RoF2Slot.SlotType = maps::MapCorpse;
|
||||||
RoF2Slot.MainSlot = ServerSlot - EmuConstants::CORPSE_BEGIN;
|
RoF2Slot.MainSlot = serverSlot - EmuConstants::CORPSE_BEGIN;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RoF2Slot.SlotType = maps::MapPossessions;
|
RoF2Slot.SlotType = maps::MapPossessions;
|
||||||
RoF2Slot.MainSlot = ServerSlot;
|
RoF2Slot.MainSlot = serverSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ServerSlot == MainPowerSource)
|
if (serverSlot == MainPowerSource)
|
||||||
RoF2Slot.MainSlot = slots::MainPowerSource;
|
RoF2Slot.MainSlot = slots::MainPowerSource;
|
||||||
|
|
||||||
else if (ServerSlot >= MainCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
else if (serverSlot >= MainCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||||
RoF2Slot.MainSlot += 3;
|
RoF2Slot.MainSlot += 3;
|
||||||
|
|
||||||
else if (ServerSlot >= MainAmmo) // (> 20)
|
else if (serverSlot >= MainAmmo) // (> 20)
|
||||||
RoF2Slot.MainSlot += 1;
|
RoF2Slot.MainSlot += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5628,9 +5628,9 @@ namespace RoF2
|
|||||||
RoF2Slot.MainSlot = ServerSlot - 31;
|
RoF2Slot.MainSlot = ServerSlot - 31;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::GENERAL_BAGS_BEGIN && ServerSlot <= EmuConstants::CURSOR_BAG_END) { // (> 250 && < 341)
|
else if (serverSlot >= EmuConstants::GENERAL_BAGS_BEGIN && serverSlot <= EmuConstants::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||||
RoF2Slot.SlotType = maps::MapPossessions;
|
RoF2Slot.SlotType = maps::MapPossessions;
|
||||||
TempSlot = ServerSlot - 1;
|
TempSlot = serverSlot - 1;
|
||||||
RoF2Slot.MainSlot = int(TempSlot / EmuConstants::ITEM_CONTAINER_SIZE) - 2;
|
RoF2Slot.MainSlot = int(TempSlot / EmuConstants::ITEM_CONTAINER_SIZE) - 2;
|
||||||
RoF2Slot.SubSlot = TempSlot - ((RoF2Slot.MainSlot + 2) * EmuConstants::ITEM_CONTAINER_SIZE);
|
RoF2Slot.SubSlot = TempSlot - ((RoF2Slot.MainSlot + 2) * EmuConstants::ITEM_CONTAINER_SIZE);
|
||||||
|
|
||||||
@ -5638,14 +5638,14 @@ namespace RoF2
|
|||||||
RoF2Slot.MainSlot = slots::MainCursor;
|
RoF2Slot.MainSlot = slots::MainCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::TRIBUTE_BEGIN && ServerSlot <= EmuConstants::TRIBUTE_END) { // Tribute
|
else if (serverSlot >= EmuConstants::TRIBUTE_BEGIN && serverSlot <= EmuConstants::TRIBUTE_END) { // Tribute
|
||||||
RoF2Slot.SlotType = maps::MapTribute;
|
RoF2Slot.SlotType = maps::MapTribute;
|
||||||
RoF2Slot.MainSlot = ServerSlot - EmuConstants::TRIBUTE_BEGIN;
|
RoF2Slot.MainSlot = serverSlot - EmuConstants::TRIBUTE_BEGIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::BANK_BEGIN && ServerSlot <= EmuConstants::BANK_BAGS_END) {
|
else if (serverSlot >= EmuConstants::BANK_BEGIN && serverSlot <= EmuConstants::BANK_BAGS_END) {
|
||||||
RoF2Slot.SlotType = maps::MapBank;
|
RoF2Slot.SlotType = maps::MapBank;
|
||||||
TempSlot = ServerSlot - EmuConstants::BANK_BEGIN;
|
TempSlot = serverSlot - EmuConstants::BANK_BEGIN;
|
||||||
RoF2Slot.MainSlot = TempSlot;
|
RoF2Slot.MainSlot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) { // (> 30)
|
if (TempSlot > 30) { // (> 30)
|
||||||
@ -5654,9 +5654,9 @@ namespace RoF2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::SHARED_BANK_BEGIN && ServerSlot <= EmuConstants::SHARED_BANK_BAGS_END) {
|
else if (serverSlot >= EmuConstants::SHARED_BANK_BEGIN && serverSlot <= EmuConstants::SHARED_BANK_BAGS_END) {
|
||||||
RoF2Slot.SlotType = maps::MapSharedBank;
|
RoF2Slot.SlotType = maps::MapSharedBank;
|
||||||
TempSlot = ServerSlot - EmuConstants::SHARED_BANK_BEGIN;
|
TempSlot = serverSlot - EmuConstants::SHARED_BANK_BEGIN;
|
||||||
RoF2Slot.MainSlot = TempSlot;
|
RoF2Slot.MainSlot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) { // (> 30)
|
if (TempSlot > 30) { // (> 30)
|
||||||
@ -5665,9 +5665,9 @@ namespace RoF2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::TRADE_BEGIN && ServerSlot <= EmuConstants::TRADE_BAGS_END) {
|
else if (serverSlot >= EmuConstants::TRADE_BEGIN && serverSlot <= EmuConstants::TRADE_BAGS_END) {
|
||||||
RoF2Slot.SlotType = maps::MapTrade;
|
RoF2Slot.SlotType = maps::MapTrade;
|
||||||
TempSlot = ServerSlot - EmuConstants::TRADE_BEGIN;
|
TempSlot = serverSlot - EmuConstants::TRADE_BEGIN;
|
||||||
RoF2Slot.MainSlot = TempSlot;
|
RoF2Slot.MainSlot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) {
|
if (TempSlot > 30) {
|
||||||
@ -5689,18 +5689,18 @@ namespace RoF2
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::WORLD_BEGIN && ServerSlot <= EmuConstants::WORLD_END) {
|
else if (serverSlot >= EmuConstants::WORLD_BEGIN && serverSlot <= EmuConstants::WORLD_END) {
|
||||||
RoF2Slot.SlotType = maps::MapWorld;
|
RoF2Slot.SlotType = maps::MapWorld;
|
||||||
TempSlot = ServerSlot - EmuConstants::WORLD_BEGIN;
|
TempSlot = serverSlot - EmuConstants::WORLD_BEGIN;
|
||||||
RoF2Slot.MainSlot = TempSlot;
|
RoF2Slot.MainSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i", ServerSlot, RoF2Slot.SlotType, RoF2Slot.Unknown02, RoF2Slot.MainSlot, RoF2Slot.SubSlot, RoF2Slot.AugSlot, RoF2Slot.Unknown01);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.SlotType, RoF2Slot.Unknown02, RoF2Slot.MainSlot, RoF2Slot.SubSlot, RoF2Slot.AugSlot, RoF2Slot.Unknown01);
|
||||||
|
|
||||||
return RoF2Slot;
|
return RoF2Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline structs::MainInvItemSlotStruct ServerToRoF2MainInvSlot(uint32 ServerSlot)
|
static inline structs::MainInvItemSlotStruct ServerToRoF2MainInvSlot(uint32 serverSlot)
|
||||||
{
|
{
|
||||||
structs::MainInvItemSlotStruct RoF2Slot;
|
structs::MainInvItemSlotStruct RoF2Slot;
|
||||||
RoF2Slot.MainSlot = INVALID_INDEX;
|
RoF2Slot.MainSlot = INVALID_INDEX;
|
||||||
@ -5710,16 +5710,16 @@ namespace RoF2
|
|||||||
|
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (ServerSlot < 56 || ServerSlot == MainPowerSource) { // (< 52)
|
if (serverSlot < 56 || serverSlot == MainPowerSource) { // (< 52)
|
||||||
RoF2Slot.MainSlot = ServerSlot;
|
RoF2Slot.MainSlot = serverSlot;
|
||||||
|
|
||||||
if (ServerSlot == MainPowerSource)
|
if (serverSlot == MainPowerSource)
|
||||||
RoF2Slot.MainSlot = slots::MainPowerSource;
|
RoF2Slot.MainSlot = slots::MainPowerSource;
|
||||||
|
|
||||||
else if (ServerSlot >= MainCursor) // Cursor and Extended Corpse Inventory
|
else if (serverSlot >= MainCursor) // Cursor and Extended Corpse Inventory
|
||||||
RoF2Slot.MainSlot += 3;
|
RoF2Slot.MainSlot += 3;
|
||||||
|
|
||||||
else if (ServerSlot >= MainAmmo) // Ammo and Personl Inventory
|
else if (serverSlot >= MainAmmo) // Ammo and Personl Inventory
|
||||||
RoF2Slot.MainSlot += 1;
|
RoF2Slot.MainSlot += 1;
|
||||||
|
|
||||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||||
@ -5730,33 +5730,33 @@ namespace RoF2
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (ServerSlot >= EmuConstants::GENERAL_BAGS_BEGIN && ServerSlot <= EmuConstants::CURSOR_BAG_END) {
|
else if (serverSlot >= EmuConstants::GENERAL_BAGS_BEGIN && serverSlot <= EmuConstants::CURSOR_BAG_END) {
|
||||||
TempSlot = ServerSlot - 1;
|
TempSlot = serverSlot - 1;
|
||||||
RoF2Slot.MainSlot = int(TempSlot / EmuConstants::ITEM_CONTAINER_SIZE) - 2;
|
RoF2Slot.MainSlot = int(TempSlot / EmuConstants::ITEM_CONTAINER_SIZE) - 2;
|
||||||
RoF2Slot.SubSlot = TempSlot - ((RoF2Slot.MainSlot + 2) * EmuConstants::ITEM_CONTAINER_SIZE);
|
RoF2Slot.SubSlot = TempSlot - ((RoF2Slot.MainSlot + 2) * EmuConstants::ITEM_CONTAINER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", ServerSlot, RoF2Slot.MainSlot, RoF2Slot.SubSlot, RoF2Slot.AugSlot, RoF2Slot.Unknown01);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.MainSlot, RoF2Slot.SubSlot, RoF2Slot.AugSlot, RoF2Slot.Unknown01);
|
||||||
|
|
||||||
return RoF2Slot;
|
return RoF2Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 ServerToRoF2CorpseSlot(uint32 ServerCorpse)
|
static inline uint32 ServerToRoF2CorpseSlot(uint32 serverCorpseSlot)
|
||||||
{
|
{
|
||||||
return (ServerCorpse - EmuConstants::CORPSE_BEGIN + 1);
|
return (serverCorpseSlot - EmuConstants::CORPSE_BEGIN + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 RoF2ToServerSlot(structs::ItemSlotStruct RoF2Slot, ItemPacketType PacketType)
|
static inline uint32 RoF2ToServerSlot(structs::ItemSlotStruct rof2Slot, ItemPacketType PacketType)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = INVALID_INDEX;
|
uint32 ServerSlot = INVALID_INDEX;
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (RoF2Slot.SlotType == maps::MapPossessions && RoF2Slot.MainSlot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
if (rof2Slot.SlotType == maps::MapPossessions && rof2Slot.MainSlot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||||
if (RoF2Slot.MainSlot == slots::MainPowerSource)
|
if (rof2Slot.MainSlot == slots::MainPowerSource)
|
||||||
TempSlot = MainPowerSource;
|
TempSlot = MainPowerSource;
|
||||||
|
|
||||||
else if (RoF2Slot.MainSlot >= slots::MainCursor) // Cursor and Extended Corpse Inventory
|
else if (rof2Slot.MainSlot >= slots::MainCursor) // Cursor and Extended Corpse Inventory
|
||||||
TempSlot = RoF2Slot.MainSlot - 3;
|
TempSlot = rof2Slot.MainSlot - 3;
|
||||||
|
|
||||||
/*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory/corpse slots
|
/*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory/corpse slots
|
||||||
// Need to figure out what to do when we get these
|
// Need to figure out what to do when we get these
|
||||||
@ -5769,61 +5769,61 @@ namespace RoF2
|
|||||||
// For now, it's probably best to leave as-is and let this work itself out in the inventory rework.
|
// For now, it's probably best to leave as-is and let this work itself out in the inventory rework.
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
else if (RoF2Slot.MainSlot >= slots::MainAmmo) // Ammo and Main Inventory
|
else if (rof2Slot.MainSlot >= slots::MainAmmo) // Ammo and Main Inventory
|
||||||
TempSlot = RoF2Slot.MainSlot - 1;
|
TempSlot = rof2Slot.MainSlot - 1;
|
||||||
|
|
||||||
else // Worn Slots
|
else // Worn Slots
|
||||||
TempSlot = RoF2Slot.MainSlot;
|
TempSlot = rof2Slot.MainSlot;
|
||||||
|
|
||||||
if (RoF2Slot.SubSlot >= SUB_BEGIN) // Bag Slots
|
if (rof2Slot.SubSlot >= SUB_BEGIN) // Bag Slots
|
||||||
TempSlot = ((TempSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot + 1;
|
TempSlot = ((TempSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rof2Slot.SubSlot + 1;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoF2Slot.SlotType == maps::MapBank) {
|
else if (rof2Slot.SlotType == maps::MapBank) {
|
||||||
TempSlot = EmuConstants::BANK_BEGIN;
|
TempSlot = EmuConstants::BANK_BEGIN;
|
||||||
|
|
||||||
if (RoF2Slot.SubSlot >= SUB_BEGIN)
|
if (rof2Slot.SubSlot >= SUB_BEGIN)
|
||||||
TempSlot += ((RoF2Slot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot + 1;
|
TempSlot += ((rof2Slot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rof2Slot.SubSlot + 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += RoF2Slot.MainSlot;
|
TempSlot += rof2Slot.MainSlot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoF2Slot.SlotType == maps::MapSharedBank) {
|
else if (rof2Slot.SlotType == maps::MapSharedBank) {
|
||||||
TempSlot = EmuConstants::SHARED_BANK_BEGIN;
|
TempSlot = EmuConstants::SHARED_BANK_BEGIN;
|
||||||
|
|
||||||
if (RoF2Slot.SubSlot >= SUB_BEGIN)
|
if (rof2Slot.SubSlot >= SUB_BEGIN)
|
||||||
TempSlot += ((RoF2Slot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot + 1;
|
TempSlot += ((rof2Slot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rof2Slot.SubSlot + 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += RoF2Slot.MainSlot;
|
TempSlot += rof2Slot.MainSlot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoF2Slot.SlotType == maps::MapTrade) {
|
else if (rof2Slot.SlotType == maps::MapTrade) {
|
||||||
TempSlot = EmuConstants::TRADE_BEGIN;
|
TempSlot = EmuConstants::TRADE_BEGIN;
|
||||||
|
|
||||||
if (RoF2Slot.SubSlot >= SUB_BEGIN)
|
if (rof2Slot.SubSlot >= SUB_BEGIN)
|
||||||
TempSlot += ((RoF2Slot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot + 1;
|
TempSlot += ((rof2Slot.MainSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rof2Slot.SubSlot + 1;
|
||||||
// OLD CODE:
|
// OLD CODE:
|
||||||
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += RoF2Slot.MainSlot;
|
TempSlot += rof2Slot.MainSlot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoF2Slot.SlotType == maps::MapWorld) {
|
else if (rof2Slot.SlotType == maps::MapWorld) {
|
||||||
TempSlot = EmuConstants::WORLD_BEGIN;
|
TempSlot = EmuConstants::WORLD_BEGIN;
|
||||||
|
|
||||||
if (RoF2Slot.MainSlot >= SUB_BEGIN)
|
if (rof2Slot.MainSlot >= SUB_BEGIN)
|
||||||
TempSlot += RoF2Slot.MainSlot;
|
TempSlot += rof2Slot.MainSlot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
@ -5837,30 +5837,30 @@ namespace RoF2
|
|||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
else if (RoF2Slot.SlotType == maps::MapGuildTribute) {
|
else if (rof2Slot.SlotType == maps::MapGuildTribute) {
|
||||||
ServerSlot = INVALID_INDEX;
|
ServerSlot = INVALID_INDEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (RoF2Slot.SlotType == maps::MapCorpse) {
|
else if (rof2Slot.SlotType == maps::MapCorpse) {
|
||||||
ServerSlot = RoF2Slot.MainSlot + EmuConstants::CORPSE_BEGIN;
|
ServerSlot = rof2Slot.MainSlot + EmuConstants::CORPSE_BEGIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", RoF2Slot.SlotType, RoF2Slot.Unknown02, RoF2Slot.MainSlot, RoF2Slot.SubSlot, RoF2Slot.AugSlot, RoF2Slot.Unknown01, ServerSlot);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rof2Slot.SlotType, rof2Slot.Unknown02, rof2Slot.MainSlot, rof2Slot.SubSlot, rof2Slot.AugSlot, rof2Slot.Unknown01, ServerSlot);
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 RoF2ToServerMainInvSlot(structs::MainInvItemSlotStruct RoF2Slot)
|
static inline uint32 RoF2ToServerMainInvSlot(structs::MainInvItemSlotStruct rof2Slot)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = INVALID_INDEX;
|
uint32 ServerSlot = INVALID_INDEX;
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (RoF2Slot.MainSlot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
if (rof2Slot.MainSlot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||||
if (RoF2Slot.MainSlot == slots::MainPowerSource)
|
if (rof2Slot.MainSlot == slots::MainPowerSource)
|
||||||
TempSlot = MainPowerSource;
|
TempSlot = MainPowerSource;
|
||||||
|
|
||||||
else if (RoF2Slot.MainSlot >= slots::MainCursor) // Cursor and Extended Corpse Inventory
|
else if (rof2Slot.MainSlot >= slots::MainCursor) // Cursor and Extended Corpse Inventory
|
||||||
TempSlot = RoF2Slot.MainSlot - 3;
|
TempSlot = rof2Slot.MainSlot - 3;
|
||||||
|
|
||||||
/*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory slots
|
/*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory slots
|
||||||
// Need to figure out what to do when we get these
|
// Need to figure out what to do when we get these
|
||||||
@ -5868,26 +5868,26 @@ namespace RoF2
|
|||||||
// Same as above
|
// Same as above
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
else if (RoF2Slot.MainSlot >= slots::MainAmmo) // Main Inventory and Ammo Slots
|
else if (rof2Slot.MainSlot >= slots::MainAmmo) // Main Inventory and Ammo Slots
|
||||||
TempSlot = RoF2Slot.MainSlot - 1;
|
TempSlot = rof2Slot.MainSlot - 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot = RoF2Slot.MainSlot;
|
TempSlot = rof2Slot.MainSlot;
|
||||||
|
|
||||||
if (RoF2Slot.SubSlot >= SUB_BEGIN) // Bag Slots
|
if (rof2Slot.SubSlot >= SUB_BEGIN) // Bag Slots
|
||||||
TempSlot = ((TempSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot + 1;
|
TempSlot = ((TempSlot + 3) * EmuConstants::ITEM_CONTAINER_SIZE) + rof2Slot.SubSlot + 1;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", RoF2Slot.MainSlot, RoF2Slot.SubSlot, RoF2Slot.AugSlot, RoF2Slot.Unknown01, ServerSlot);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rof2Slot.MainSlot, rof2Slot.SubSlot, rof2Slot.AugSlot, rof2Slot.Unknown01, ServerSlot);
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 RoF2ToServerCorpseSlot(uint32 RoF2Corpse)
|
static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot)
|
||||||
{
|
{
|
||||||
return (RoF2Corpse + EmuConstants::CORPSE_BEGIN - 1);
|
return (rof2CorpseSlot + EmuConstants::CORPSE_BEGIN - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink)
|
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef RoF2_H_
|
#ifndef ROF2_H_
|
||||||
#define RoF2_H_
|
#define ROF2_H_
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
#include "../struct_strategy.h"
|
||||||
|
|
||||||
@ -32,6 +32,4 @@ namespace RoF2 {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /*ROF2_H_*/
|
||||||
|
|
||||||
#endif /*RoF2_H_*/
|
|
||||||
|
|||||||
@ -19,8 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RoF2_CONSTANTS_H_
|
#ifndef ROF2_CONSTANTS_H_
|
||||||
#define RoF2_CONSTANTS_H_
|
#define ROF2_CONSTANTS_H_
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ namespace RoF2 {
|
|||||||
|
|
||||||
}; //end namespace RoF2
|
}; //end namespace RoF2
|
||||||
|
|
||||||
#endif /*RoF2_CONSTANTS_H_*/
|
#endif /*ROF2_CONSTANTS_H_*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
RoF2 Notes:
|
RoF2 Notes:
|
||||||
|
|||||||
@ -439,4 +439,3 @@ These fields must be in the order of how they are serialized!
|
|||||||
#undef C
|
#undef C
|
||||||
#undef S
|
#undef S
|
||||||
#undef F
|
#undef F
|
||||||
|
|
||||||
|
|||||||
@ -174,5 +174,6 @@ D(OP_WhoAllRequest)
|
|||||||
D(OP_ZoneChange)
|
D(OP_ZoneChange)
|
||||||
D(OP_ZoneEntry)
|
D(OP_ZoneEntry)
|
||||||
// End RoF Encodes/Decodes
|
// End RoF Encodes/Decodes
|
||||||
|
|
||||||
#undef E
|
#undef E
|
||||||
#undef D
|
#undef D
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef RoF2_STRUCTS_H_
|
#ifndef ROF2_STRUCTS_H_
|
||||||
#define RoF2_STRUCTS_H_
|
#define ROF2_STRUCTS_H_
|
||||||
|
|
||||||
namespace RoF2 {
|
namespace RoF2 {
|
||||||
namespace structs {
|
namespace structs {
|
||||||
@ -4881,4 +4881,4 @@ struct MercenaryMerchantResponse_Struct {
|
|||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
}; //end namespace RoF2
|
}; //end namespace RoF2
|
||||||
|
|
||||||
#endif /*RoF2_STRUCTS_H_*/
|
#endif /*ROF2_STRUCTS_H_*/
|
||||||
|
|||||||
@ -19,8 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RoF_CONSTANTS_H_
|
#ifndef ROF_CONSTANTS_H_
|
||||||
#define RoF_CONSTANTS_H_
|
#define ROF_CONSTANTS_H_
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ namespace RoF {
|
|||||||
|
|
||||||
}; //end namespace RoF
|
}; //end namespace RoF
|
||||||
|
|
||||||
#endif /*RoF_CONSTANTS_H_*/
|
#endif /*ROF_CONSTANTS_H_*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
RoF Notes:
|
RoF Notes:
|
||||||
|
|||||||
@ -439,4 +439,3 @@ These fields must be in the order of how they are serialized!
|
|||||||
#undef C
|
#undef C
|
||||||
#undef S
|
#undef S
|
||||||
#undef F
|
#undef F
|
||||||
|
|
||||||
|
|||||||
@ -162,5 +162,6 @@ D(OP_TributeItem)
|
|||||||
D(OP_WhoAllRequest)
|
D(OP_WhoAllRequest)
|
||||||
D(OP_ZoneChange)
|
D(OP_ZoneChange)
|
||||||
D(OP_ZoneEntry)
|
D(OP_ZoneEntry)
|
||||||
|
|
||||||
#undef E
|
#undef E
|
||||||
#undef D
|
#undef D
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef RoF_STRUCTS_H_
|
#ifndef ROF_STRUCTS_H_
|
||||||
#define RoF_STRUCTS_H_
|
#define ROF_STRUCTS_H_
|
||||||
|
|
||||||
namespace RoF {
|
namespace RoF {
|
||||||
namespace structs {
|
namespace structs {
|
||||||
@ -4897,4 +4897,4 @@ struct MercenaryMerchantResponse_Struct {
|
|||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
}; //end namespace RoF
|
}; //end namespace RoF
|
||||||
|
|
||||||
#endif /*RoF_STRUCTS_H_*/
|
#endif /*ROF_STRUCTS_H_*/
|
||||||
|
|||||||
@ -26,11 +26,11 @@ namespace SoD
|
|||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline uint32 ServerToSoDSlot(uint32 ServerSlot);
|
static inline uint32 ServerToSoDSlot(uint32 ServerSlot);
|
||||||
static inline uint32 ServerToSoDCorpseSlot(uint32 ServerCorpse);
|
static inline uint32 ServerToSoDCorpseSlot(uint32 serverCorpseSlot);
|
||||||
|
|
||||||
// client to server inventory location converters
|
// client to server inventory location converters
|
||||||
static inline uint32 SoDToServerSlot(uint32 SoDSlot);
|
static inline uint32 SoDToServerSlot(uint32 sodSlot);
|
||||||
static inline uint32 SoDToServerCorpseSlot(uint32 SoDCorpse);
|
static inline uint32 SoDToServerCorpseSlot(uint32 sodCorpseSlot);
|
||||||
|
|
||||||
// server to client text link converter
|
// server to client text link converter
|
||||||
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink);
|
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink);
|
||||||
@ -3242,7 +3242,7 @@ namespace SoD
|
|||||||
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
||||||
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Moved item from %u to %u", eq->from_slot, eq->to_slot);
|
Log.Out(Logs::General, Logs::Netcode, "[SoD] Moved item from %u to %u", eq->from_slot, eq->to_slot);
|
||||||
|
|
||||||
emu->from_slot = SoDToServerSlot(eq->from_slot);
|
emu->from_slot = SoDToServerSlot(eq->from_slot);
|
||||||
emu->to_slot = SoDToServerSlot(eq->to_slot);
|
emu->to_slot = SoDToServerSlot(eq->to_slot);
|
||||||
@ -3961,54 +3961,54 @@ namespace SoD
|
|||||||
return item_serial;
|
return item_serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 ServerToSoDSlot(uint32 ServerSlot)
|
static inline uint32 ServerToSoDSlot(uint32 serverSlot)
|
||||||
{
|
{
|
||||||
uint32 SoDSlot = 0;
|
uint32 SoDSlot = 0;
|
||||||
|
|
||||||
if (ServerSlot >= MainAmmo && ServerSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (serverSlot >= MainAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
SoDSlot = ServerSlot + 1;
|
SoDSlot = serverSlot + 1;
|
||||||
else if (ServerSlot >= EmuConstants::GENERAL_BAGS_BEGIN && ServerSlot <= EmuConstants::CURSOR_BAG_END)
|
else if (serverSlot >= EmuConstants::GENERAL_BAGS_BEGIN && serverSlot <= EmuConstants::CURSOR_BAG_END)
|
||||||
SoDSlot = ServerSlot + 11;
|
SoDSlot = serverSlot + 11;
|
||||||
else if (ServerSlot >= EmuConstants::BANK_BAGS_BEGIN && ServerSlot <= EmuConstants::BANK_BAGS_END)
|
else if (serverSlot >= EmuConstants::BANK_BAGS_BEGIN && serverSlot <= EmuConstants::BANK_BAGS_END)
|
||||||
SoDSlot = ServerSlot + 1;
|
SoDSlot = serverSlot + 1;
|
||||||
else if (ServerSlot >= EmuConstants::SHARED_BANK_BAGS_BEGIN && ServerSlot <= EmuConstants::SHARED_BANK_BAGS_END)
|
else if (serverSlot >= EmuConstants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EmuConstants::SHARED_BANK_BAGS_END)
|
||||||
SoDSlot = ServerSlot + 1;
|
SoDSlot = serverSlot + 1;
|
||||||
else if (ServerSlot == MainPowerSource)
|
else if (serverSlot == MainPowerSource)
|
||||||
SoDSlot = slots::MainPowerSource;
|
SoDSlot = slots::MainPowerSource;
|
||||||
else
|
else
|
||||||
SoDSlot = ServerSlot;
|
SoDSlot = serverSlot;
|
||||||
return SoDSlot;
|
return SoDSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 ServerToSoDCorpseSlot(uint32 ServerCorpse)
|
static inline uint32 ServerToSoDCorpseSlot(uint32 serverCorpseSlot)
|
||||||
{
|
{
|
||||||
//uint32 SoDCorpse;
|
//uint32 SoDCorpse;
|
||||||
return (ServerCorpse + 1);
|
return (serverCorpseSlot + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 SoDToServerSlot(uint32 SoDSlot)
|
static inline uint32 SoDToServerSlot(uint32 sodSlot)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = 0;
|
uint32 ServerSlot = 0;
|
||||||
|
|
||||||
if (SoDSlot >= slots::MainAmmo && SoDSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (sodSlot >= slots::MainAmmo && sodSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
ServerSlot = SoDSlot - 1;
|
ServerSlot = sodSlot - 1;
|
||||||
else if (SoDSlot >= consts::GENERAL_BAGS_BEGIN && SoDSlot <= consts::CURSOR_BAG_END)
|
else if (sodSlot >= consts::GENERAL_BAGS_BEGIN && sodSlot <= consts::CURSOR_BAG_END)
|
||||||
ServerSlot = SoDSlot - 11;
|
ServerSlot = sodSlot - 11;
|
||||||
else if (SoDSlot >= consts::BANK_BAGS_BEGIN && SoDSlot <= consts::BANK_BAGS_END)
|
else if (sodSlot >= consts::BANK_BAGS_BEGIN && sodSlot <= consts::BANK_BAGS_END)
|
||||||
ServerSlot = SoDSlot - 1;
|
ServerSlot = sodSlot - 1;
|
||||||
else if (SoDSlot >= consts::SHARED_BANK_BAGS_BEGIN && SoDSlot <= consts::SHARED_BANK_BAGS_END)
|
else if (sodSlot >= consts::SHARED_BANK_BAGS_BEGIN && sodSlot <= consts::SHARED_BANK_BAGS_END)
|
||||||
ServerSlot = SoDSlot - 1;
|
ServerSlot = sodSlot - 1;
|
||||||
else if (SoDSlot == slots::MainPowerSource)
|
else if (sodSlot == slots::MainPowerSource)
|
||||||
ServerSlot = MainPowerSource;
|
ServerSlot = MainPowerSource;
|
||||||
else
|
else
|
||||||
ServerSlot = SoDSlot;
|
ServerSlot = sodSlot;
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 SoDToServerCorpseSlot(uint32 SoDCorpse)
|
static inline uint32 SoDToServerCorpseSlot(uint32 sodCorpseSlot)
|
||||||
{
|
{
|
||||||
//uint32 ServerCorpse;
|
//uint32 ServerCorpse;
|
||||||
return (SoDCorpse - 1);
|
return (sodCorpseSlot - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink)
|
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef SoD_H_
|
#ifndef SOD_H_
|
||||||
#define SoD_H_
|
#define SOD_H_
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
#include "../struct_strategy.h"
|
||||||
|
|
||||||
@ -32,6 +32,4 @@ namespace SoD {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /*SOD_H_*/
|
||||||
|
|
||||||
#endif /*SoD_H_*/
|
|
||||||
|
|||||||
@ -19,8 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SoD_CONSTANTS_H_
|
#ifndef SOD_CONSTANTS_H_
|
||||||
#define SoD_CONSTANTS_H_
|
#define SOD_CONSTANTS_H_
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ namespace SoD {
|
|||||||
|
|
||||||
}; //end namespace SoD
|
}; //end namespace SoD
|
||||||
|
|
||||||
#endif /*SoD_CONSTANTS_H_*/
|
#endif /*SOD_CONSTANTS_H_*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SoD Notes:
|
SoD Notes:
|
||||||
|
|||||||
@ -436,4 +436,3 @@ These fields must be in the order of how they are serialized!
|
|||||||
#undef C
|
#undef C
|
||||||
#undef S
|
#undef S
|
||||||
#undef F
|
#undef F
|
||||||
|
|
||||||
|
|||||||
@ -120,5 +120,6 @@ D(OP_TradeSkillCombine)
|
|||||||
D(OP_TributeItem)
|
D(OP_TributeItem)
|
||||||
D(OP_WearChange)
|
D(OP_WearChange)
|
||||||
D(OP_WhoAllRequest)
|
D(OP_WhoAllRequest)
|
||||||
|
|
||||||
#undef E
|
#undef E
|
||||||
#undef D
|
#undef D
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef SoD_STRUCTS_H_
|
#ifndef SOD_STRUCTS_H_
|
||||||
#define SoD_STRUCTS_H_
|
#define SOD_STRUCTS_H_
|
||||||
|
|
||||||
namespace SoD {
|
namespace SoD {
|
||||||
namespace structs {
|
namespace structs {
|
||||||
@ -4412,4 +4412,4 @@ struct MercenaryAssign_Struct {
|
|||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
}; //end namespace SoD
|
}; //end namespace SoD
|
||||||
|
|
||||||
#endif /*SoD_STRUCTS_H_*/
|
#endif /*SOD_STRUCTS_H_*/
|
||||||
|
|||||||
@ -25,12 +25,12 @@ namespace SoF
|
|||||||
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
|
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline uint32 ServerToSoFSlot(uint32 ServerSlot);
|
static inline uint32 ServerToSoFSlot(uint32 serverSlot);
|
||||||
static inline uint32 ServerToSoFCorpseSlot(uint32 ServerCorpse);
|
static inline uint32 ServerToSoFCorpseSlot(uint32 serverCorpseSlot);
|
||||||
|
|
||||||
// client to server inventory location converters
|
// client to server inventory location converters
|
||||||
static inline uint32 SoFToServerSlot(uint32 SoFSlot);
|
static inline uint32 SoFToServerSlot(uint32 sofSlot);
|
||||||
static inline uint32 SoFToServerCorpseSlot(uint32 SoFCorpse);
|
static inline uint32 SoFToServerCorpseSlot(uint32 sofCorpseSlot);
|
||||||
|
|
||||||
// server to client text link converter
|
// server to client text link converter
|
||||||
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink);
|
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink);
|
||||||
@ -2580,7 +2580,7 @@ namespace SoF
|
|||||||
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
||||||
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Moved item from %u to %u", eq->from_slot, eq->to_slot);
|
Log.Out(Logs::General, Logs::Netcode, "[SoF] Moved item from %u to %u", eq->from_slot, eq->to_slot);
|
||||||
|
|
||||||
emu->from_slot = SoFToServerSlot(eq->from_slot);
|
emu->from_slot = SoFToServerSlot(eq->from_slot);
|
||||||
emu->to_slot = SoFToServerSlot(eq->to_slot);
|
emu->to_slot = SoFToServerSlot(eq->to_slot);
|
||||||
@ -3281,56 +3281,56 @@ namespace SoF
|
|||||||
return item_serial;
|
return item_serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 ServerToSoFSlot(uint32 ServerSlot)
|
static inline uint32 ServerToSoFSlot(uint32 serverSlot)
|
||||||
{
|
{
|
||||||
uint32 SoFSlot = 0;
|
uint32 SoFSlot = 0;
|
||||||
|
|
||||||
if (ServerSlot >= MainAmmo && ServerSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (serverSlot >= MainAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
SoFSlot = ServerSlot + 1;
|
SoFSlot = serverSlot + 1;
|
||||||
else if (ServerSlot >= EmuConstants::GENERAL_BAGS_BEGIN && ServerSlot <= EmuConstants::CURSOR_BAG_END)
|
else if (serverSlot >= EmuConstants::GENERAL_BAGS_BEGIN && serverSlot <= EmuConstants::CURSOR_BAG_END)
|
||||||
SoFSlot = ServerSlot + 11;
|
SoFSlot = serverSlot + 11;
|
||||||
else if (ServerSlot >= EmuConstants::BANK_BAGS_BEGIN && ServerSlot <= EmuConstants::BANK_BAGS_END)
|
else if (serverSlot >= EmuConstants::BANK_BAGS_BEGIN && serverSlot <= EmuConstants::BANK_BAGS_END)
|
||||||
SoFSlot = ServerSlot + 1;
|
SoFSlot = serverSlot + 1;
|
||||||
else if (ServerSlot >= EmuConstants::SHARED_BANK_BAGS_BEGIN && ServerSlot <= EmuConstants::SHARED_BANK_BAGS_END)
|
else if (serverSlot >= EmuConstants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EmuConstants::SHARED_BANK_BAGS_END)
|
||||||
SoFSlot = ServerSlot + 1;
|
SoFSlot = serverSlot + 1;
|
||||||
else if (ServerSlot == MainPowerSource)
|
else if (serverSlot == MainPowerSource)
|
||||||
SoFSlot = slots::MainPowerSource;
|
SoFSlot = slots::MainPowerSource;
|
||||||
else
|
else
|
||||||
SoFSlot = ServerSlot;
|
SoFSlot = serverSlot;
|
||||||
|
|
||||||
return SoFSlot;
|
return SoFSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 ServerToSoFCorpseSlot(uint32 ServerCorpse)
|
static inline uint32 ServerToSoFCorpseSlot(uint32 serverCorpseSlot)
|
||||||
{
|
{
|
||||||
//uint32 SoFCorpse;
|
//uint32 SoFCorpse;
|
||||||
return (ServerCorpse + 1);
|
return (serverCorpseSlot + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 SoFToServerSlot(uint32 SoFSlot)
|
static inline uint32 SoFToServerSlot(uint32 sofSlot)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = 0;
|
uint32 ServerSlot = 0;
|
||||||
|
|
||||||
if (SoFSlot >= slots::MainAmmo && SoFSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (sofSlot >= slots::MainAmmo && sofSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
ServerSlot = SoFSlot - 1;
|
ServerSlot = sofSlot - 1;
|
||||||
else if (SoFSlot >= consts::GENERAL_BAGS_BEGIN && SoFSlot <= consts::CURSOR_BAG_END)
|
else if (sofSlot >= consts::GENERAL_BAGS_BEGIN && sofSlot <= consts::CURSOR_BAG_END)
|
||||||
ServerSlot = SoFSlot - 11;
|
ServerSlot = sofSlot - 11;
|
||||||
else if (SoFSlot >= consts::BANK_BAGS_BEGIN && SoFSlot <= consts::BANK_BAGS_END)
|
else if (sofSlot >= consts::BANK_BAGS_BEGIN && sofSlot <= consts::BANK_BAGS_END)
|
||||||
ServerSlot = SoFSlot - 1;
|
ServerSlot = sofSlot - 1;
|
||||||
else if (SoFSlot >= consts::SHARED_BANK_BAGS_BEGIN && SoFSlot <= consts::SHARED_BANK_BAGS_END)
|
else if (sofSlot >= consts::SHARED_BANK_BAGS_BEGIN && sofSlot <= consts::SHARED_BANK_BAGS_END)
|
||||||
ServerSlot = SoFSlot - 1;
|
ServerSlot = sofSlot - 1;
|
||||||
else if (SoFSlot == slots::MainPowerSource)
|
else if (sofSlot == slots::MainPowerSource)
|
||||||
ServerSlot = MainPowerSource;
|
ServerSlot = MainPowerSource;
|
||||||
else
|
else
|
||||||
ServerSlot = SoFSlot;
|
ServerSlot = sofSlot;
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 SoFToServerCorpseSlot(uint32 SoFCorpse)
|
static inline uint32 SoFToServerCorpseSlot(uint32 sofCorpseSlot)
|
||||||
{
|
{
|
||||||
//uint32 ServerCorpse;
|
//uint32 ServerCorpse;
|
||||||
return (SoFCorpse - 1);
|
return (sofCorpseSlot - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink)
|
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef SoF_H_
|
#ifndef SOF_H_
|
||||||
#define SoF_H_
|
#define SOF_H_
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
#include "../struct_strategy.h"
|
||||||
|
|
||||||
@ -32,6 +32,4 @@ namespace SoF {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /*SOF_H_*/
|
||||||
|
|
||||||
#endif /*SoF_H_*/
|
|
||||||
|
|||||||
@ -19,8 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SoF_CONSTANTS_H_
|
#ifndef SOF_CONSTANTS_H_
|
||||||
#define SoF_CONSTANTS_H_
|
#define SOF_CONSTANTS_H_
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ namespace SoF {
|
|||||||
|
|
||||||
}; //end namespace SoF
|
}; //end namespace SoF
|
||||||
|
|
||||||
#endif /*SoF_CONSTANTS_H_*/
|
#endif /*SOF_CONSTANTS_H_*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SoF Notes:
|
SoF Notes:
|
||||||
|
|||||||
@ -436,4 +436,3 @@ These fields must be in the order of how they are serialized!
|
|||||||
#undef C
|
#undef C
|
||||||
#undef S
|
#undef S
|
||||||
#undef F
|
#undef F
|
||||||
|
|
||||||
|
|||||||
@ -1226,4 +1226,3 @@
|
|||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
|
|
||||||
// 1217 (0x4c1) opcodes counted
|
// 1217 (0x4c1) opcodes counted
|
||||||
|
|
||||||
|
|||||||
@ -103,5 +103,6 @@ D(OP_TradeSkillCombine)
|
|||||||
D(OP_TributeItem)
|
D(OP_TributeItem)
|
||||||
D(OP_WearChange)
|
D(OP_WearChange)
|
||||||
D(OP_WhoAllRequest)
|
D(OP_WhoAllRequest)
|
||||||
|
|
||||||
#undef E
|
#undef E
|
||||||
#undef D
|
#undef D
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef SoF_STRUCTS_H_
|
#ifndef SOF_STRUCTS_H_
|
||||||
#define SoF_STRUCTS_H_
|
#define SOF_STRUCTS_H_
|
||||||
|
|
||||||
namespace SoF {
|
namespace SoF {
|
||||||
namespace structs {
|
namespace structs {
|
||||||
@ -4118,4 +4118,4 @@ struct AltCurrencySellItem_Struct {
|
|||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
}; //end namespace SoF
|
}; //end namespace SoF
|
||||||
|
|
||||||
#endif /*SoF_STRUCTS_H_*/
|
#endif /*SOF_STRUCTS_H_*/
|
||||||
|
|||||||
@ -23,12 +23,12 @@ namespace Titanium
|
|||||||
char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint8 depth);
|
char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline int16 ServerToTitaniumSlot(uint32 ServerSlot);
|
static inline int16 ServerToTitaniumSlot(uint32 serverSlot);
|
||||||
static inline int16 ServerToTitaniumCorpseSlot(uint32 ServerCorpse);
|
static inline int16 ServerToTitaniumCorpseSlot(uint32 serverCorpseSlot);
|
||||||
|
|
||||||
// client to server inventory location converters
|
// client to server inventory location converters
|
||||||
static inline uint32 TitaniumToServerSlot(int16 TitaniumSlot);
|
static inline uint32 TitaniumToServerSlot(int16 titaniumSlot);
|
||||||
static inline uint32 TitaniumToServerCorpseSlot(int16 TitaniumCorpse);
|
static inline uint32 TitaniumToServerCorpseSlot(int16 titaniumCorpseSlot);
|
||||||
|
|
||||||
// server to client text link converter
|
// server to client text link converter
|
||||||
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink);
|
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink);
|
||||||
@ -113,7 +113,7 @@ namespace Titanium
|
|||||||
|
|
||||||
const ClientVersion Strategy::GetClientVersion() const
|
const ClientVersion Strategy::GetClientVersion() const
|
||||||
{
|
{
|
||||||
return ClientVersion::Tit;
|
return ClientVersion::Titanium;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "ss_define.h"
|
#include "ss_define.h"
|
||||||
@ -1774,7 +1774,7 @@ namespace Titanium
|
|||||||
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
||||||
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Moved item from %u to %u", eq->from_slot, eq->to_slot);
|
Log.Out(Logs::General, Logs::Netcode, "[Titanium] Moved item from %u to %u", eq->from_slot, eq->to_slot);
|
||||||
|
|
||||||
emu->from_slot = TitaniumToServerSlot(eq->from_slot);
|
emu->from_slot = TitaniumToServerSlot(eq->from_slot);
|
||||||
emu->to_slot = TitaniumToServerSlot(eq->to_slot);
|
emu->to_slot = TitaniumToServerSlot(eq->to_slot);
|
||||||
@ -2062,34 +2062,34 @@ namespace Titanium
|
|||||||
return serialization;
|
return serialization;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int16 ServerToTitaniumSlot(uint32 ServerSlot)
|
static inline int16 ServerToTitaniumSlot(uint32 serverSlot)
|
||||||
{
|
{
|
||||||
//int16 TitaniumSlot;
|
//int16 TitaniumSlot;
|
||||||
if (ServerSlot == INVALID_INDEX)
|
if (serverSlot == INVALID_INDEX)
|
||||||
return INVALID_INDEX;
|
return INVALID_INDEX;
|
||||||
|
|
||||||
return ServerSlot; // deprecated
|
return serverSlot; // deprecated
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int16 ServerToTitaniumCorpseSlot(uint32 ServerCorpse)
|
static inline int16 ServerToTitaniumCorpseSlot(uint32 serverCorpseSlot)
|
||||||
{
|
{
|
||||||
//int16 TitaniumCorpse;
|
//int16 TitaniumCorpse;
|
||||||
return ServerCorpse;
|
return serverCorpseSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 TitaniumToServerSlot(int16 TitaniumSlot)
|
static inline uint32 TitaniumToServerSlot(int16 titaniumSlot)
|
||||||
{
|
{
|
||||||
//uint32 ServerSlot;
|
//uint32 ServerSlot;
|
||||||
if (TitaniumSlot == INVALID_INDEX)
|
if (titaniumSlot == INVALID_INDEX)
|
||||||
return INVALID_INDEX;
|
return INVALID_INDEX;
|
||||||
|
|
||||||
return TitaniumSlot; // deprecated
|
return titaniumSlot; // deprecated
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 TitaniumToServerCorpseSlot(int16 TitaniumCorpse)
|
static inline uint32 TitaniumToServerCorpseSlot(int16 titaniumCorpseSlot)
|
||||||
{
|
{
|
||||||
//uint32 ServerCorpse;
|
//uint32 ServerCorpse;
|
||||||
return TitaniumCorpse;
|
return titaniumCorpseSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink)
|
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef Titanium_H_
|
#ifndef TITANIUM_H_
|
||||||
#define Titanium_H_
|
#define TITANIUM_H_
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
#include "../struct_strategy.h"
|
||||||
|
|
||||||
@ -32,6 +32,4 @@ namespace Titanium {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /*TITANIUM_H_*/
|
||||||
|
|
||||||
#endif /*Titanium_H_*/
|
|
||||||
|
|||||||
@ -19,8 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef Titanium_CONSTANTS_H_
|
#ifndef TITANIUM_CONSTANTS_H_
|
||||||
#define Titanium_CONSTANTS_H_
|
#define TITANIUM_CONSTANTS_H_
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ namespace Titanium {
|
|||||||
|
|
||||||
}; //end namespace Titanium
|
}; //end namespace Titanium
|
||||||
|
|
||||||
#endif /*Titanium_CONSTANTS_H_*/
|
#endif /*TITANIUM_CONSTANTS_H_*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Titanium Notes:
|
Titanium Notes:
|
||||||
|
|||||||
@ -167,8 +167,8 @@ These fields must be in the order of how they are serialized!
|
|||||||
/* 156 */ I(Scroll.Level2)
|
/* 156 */ I(Scroll.Level2)
|
||||||
/* 157 */ I(Scroll.Level)
|
/* 157 */ I(Scroll.Level)
|
||||||
/* 158 */ C("0")
|
/* 158 */ C("0")
|
||||||
|
|
||||||
#undef I
|
#undef I
|
||||||
#undef C
|
#undef C
|
||||||
#undef S
|
#undef S
|
||||||
#undef F
|
#undef F
|
||||||
|
|
||||||
|
|||||||
@ -75,5 +75,6 @@ D(OP_TradeSkillCombine)
|
|||||||
D(OP_TributeItem)
|
D(OP_TributeItem)
|
||||||
D(OP_WearChange)
|
D(OP_WearChange)
|
||||||
D(OP_WhoAllRequest)
|
D(OP_WhoAllRequest)
|
||||||
|
|
||||||
#undef E
|
#undef E
|
||||||
#undef D
|
#undef D
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef Titanium_STRUCTS_H_
|
#ifndef TITANIUM_STRUCTS_H_
|
||||||
#define Titanium_STRUCTS_H_
|
#define TITANIUM_STRUCTS_H_
|
||||||
|
|
||||||
namespace Titanium {
|
namespace Titanium {
|
||||||
namespace structs {
|
namespace structs {
|
||||||
@ -3332,4 +3332,4 @@ struct LFGuild_GuildToggle_Struct
|
|||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
}; //end namespace Titanium
|
}; //end namespace Titanium
|
||||||
|
|
||||||
#endif /*Titanium_STRUCTS_H_*/
|
#endif /*TITANIUM_STRUCTS_H_*/
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "../global_define.h"
|
#include "../global_define.h"
|
||||||
#include "../eqemu_logsys.h"
|
#include "../eqemu_logsys.h"
|
||||||
#include "underfoot.h"
|
#include "uf.h"
|
||||||
#include "../opcodemgr.h"
|
#include "../opcodemgr.h"
|
||||||
|
|
||||||
#include "../eq_stream_ident.h"
|
#include "../eq_stream_ident.h"
|
||||||
@ -10,33 +10,33 @@
|
|||||||
#include "../misc_functions.h"
|
#include "../misc_functions.h"
|
||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
#include "../item.h"
|
#include "../item.h"
|
||||||
#include "underfoot_structs.h"
|
#include "uf_structs.h"
|
||||||
#include "../rulesys.h"
|
#include "../rulesys.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
namespace Underfoot
|
namespace UF
|
||||||
{
|
{
|
||||||
static const char *name = "Underfoot";
|
static const char *name = "UF";
|
||||||
static OpcodeManager *opcodes = nullptr;
|
static OpcodeManager *opcodes = nullptr;
|
||||||
static Strategy struct_strategy;
|
static Strategy struct_strategy;
|
||||||
|
|
||||||
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
|
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline uint32 ServerToUnderfootSlot(uint32 ServerSlot);
|
static inline uint32 ServerToUFSlot(uint32 serverSlot);
|
||||||
static inline uint32 ServerToUnderFootCorpseSlot(uint32 ServerCorpse);
|
static inline uint32 ServerToUFCorpseSlot(uint32 serverCorpseSlot);
|
||||||
|
|
||||||
// client to server inventory location converters
|
// client to server inventory location converters
|
||||||
static inline uint32 UnderfootToServerSlot(uint32 UnderfootSlot);
|
static inline uint32 UFToServerSlot(uint32 ufSlot);
|
||||||
static inline uint32 UnderfootToServerCorpseSlot(uint32 UnderfootCorpse);
|
static inline uint32 UFToServerCorpseSlot(uint32 ufCorpseSlot);
|
||||||
|
|
||||||
// server to client text link converter
|
// server to client text link converter
|
||||||
static inline void ServerToUnderfootTextLink(std::string& underfootTextLink, const std::string& serverTextLink);
|
static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink);
|
||||||
|
|
||||||
// client to server text link converter
|
// client to server text link converter
|
||||||
static inline void UnderfootToServerTextLink(std::string& serverTextLink, const std::string& underfootTextLink);
|
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink);
|
||||||
|
|
||||||
void Register(EQStreamIdentifier &into)
|
void Register(EQStreamIdentifier &into)
|
||||||
{
|
{
|
||||||
@ -102,7 +102,7 @@ namespace Underfoot
|
|||||||
{
|
{
|
||||||
//all opcodes default to passthrough.
|
//all opcodes default to passthrough.
|
||||||
#include "ss_register.h"
|
#include "ss_register.h"
|
||||||
#include "underfoot_ops.h"
|
#include "uf_ops.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Strategy::Describe() const
|
std::string Strategy::Describe() const
|
||||||
@ -115,7 +115,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
const ClientVersion Strategy::GetClientVersion() const
|
const ClientVersion Strategy::GetClientVersion() const
|
||||||
{
|
{
|
||||||
return ClientVersion::Und;
|
return ClientVersion::UF;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "ss_define.h"
|
#include "ss_define.h"
|
||||||
@ -164,7 +164,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
eq->unknown000 = 1;
|
eq->unknown000 = 1;
|
||||||
OUT(npcid);
|
OUT(npcid);
|
||||||
eq->slot = ServerToUnderfootSlot(emu->slot);
|
eq->slot = ServerToUFSlot(emu->slot);
|
||||||
OUT(charges);
|
OUT(charges);
|
||||||
OUT(sell_price);
|
OUT(sell_price);
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ namespace Underfoot
|
|||||||
SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
||||||
|
|
||||||
OUT(merchant_entity_id);
|
OUT(merchant_entity_id);
|
||||||
eq->slot_id = ServerToUnderfootSlot(emu->slot_id);
|
eq->slot_id = ServerToUFSlot(emu->slot_id);
|
||||||
OUT(charges);
|
OUT(charges);
|
||||||
OUT(cost);
|
OUT(cost);
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ namespace Underfoot
|
|||||||
ENCODE_LENGTH_EXACT(ApplyPoison_Struct);
|
ENCODE_LENGTH_EXACT(ApplyPoison_Struct);
|
||||||
SETUP_DIRECT_ENCODE(ApplyPoison_Struct, structs::ApplyPoison_Struct);
|
SETUP_DIRECT_ENCODE(ApplyPoison_Struct, structs::ApplyPoison_Struct);
|
||||||
|
|
||||||
eq->inventorySlot = ServerToUnderfootSlot(emu->inventorySlot);
|
eq->inventorySlot = ServerToUFSlot(emu->inventorySlot);
|
||||||
OUT(success);
|
OUT(success);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
@ -441,7 +441,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
std::string old_message = emu->message;
|
std::string old_message = emu->message;
|
||||||
std::string new_message;
|
std::string new_message;
|
||||||
ServerToUnderfootTextLink(new_message, old_message);
|
ServerToUFTextLink(new_message, old_message);
|
||||||
|
|
||||||
//in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36;
|
//in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36;
|
||||||
in->size = strlen(emu->sender) + strlen(emu->targetname) + new_message.length() + 39;
|
in->size = strlen(emu->sender) + strlen(emu->targetname) + new_message.length() + 39;
|
||||||
@ -593,8 +593,8 @@ namespace Underfoot
|
|||||||
ENCODE_LENGTH_EXACT(DeleteItem_Struct);
|
ENCODE_LENGTH_EXACT(DeleteItem_Struct);
|
||||||
SETUP_DIRECT_ENCODE(DeleteItem_Struct, structs::DeleteItem_Struct);
|
SETUP_DIRECT_ENCODE(DeleteItem_Struct, structs::DeleteItem_Struct);
|
||||||
|
|
||||||
eq->from_slot = ServerToUnderfootSlot(emu->from_slot);
|
eq->from_slot = ServerToUFSlot(emu->from_slot);
|
||||||
eq->to_slot = ServerToUnderfootSlot(emu->to_slot);
|
eq->to_slot = ServerToUFSlot(emu->to_slot);
|
||||||
OUT(number_in_stack);
|
OUT(number_in_stack);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
@ -755,7 +755,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
std::string old_message = emu->message;
|
std::string old_message = emu->message;
|
||||||
std::string new_message;
|
std::string new_message;
|
||||||
ServerToUnderfootTextLink(new_message, old_message);
|
ServerToUFTextLink(new_message, old_message);
|
||||||
|
|
||||||
//if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm)
|
//if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm)
|
||||||
// new_message = new_message.substr(0, 512);
|
// new_message = new_message.substr(0, 512);
|
||||||
@ -807,7 +807,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
for (int i = 0; i < 9; ++i) {
|
for (int i = 0; i < 9; ++i) {
|
||||||
if (old_message_array[i].length() == 0) { break; }
|
if (old_message_array[i].length() == 0) { break; }
|
||||||
ServerToUnderfootTextLink(new_message_array[i], old_message_array[i]);
|
ServerToUFTextLink(new_message_array[i], old_message_array[i]);
|
||||||
new_message_size += new_message_array[i].length() + 1;
|
new_message_size += new_message_array[i].length() + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1287,7 +1287,7 @@ namespace Underfoot
|
|||||||
ENCODE_LENGTH_EXACT(ItemVerifyReply_Struct);
|
ENCODE_LENGTH_EXACT(ItemVerifyReply_Struct);
|
||||||
SETUP_DIRECT_ENCODE(ItemVerifyReply_Struct, structs::ItemVerifyReply_Struct);
|
SETUP_DIRECT_ENCODE(ItemVerifyReply_Struct, structs::ItemVerifyReply_Struct);
|
||||||
|
|
||||||
eq->slot = ServerToUnderfootSlot(emu->slot);
|
eq->slot = ServerToUFSlot(emu->slot);
|
||||||
OUT(spell);
|
OUT(spell);
|
||||||
OUT(target);
|
OUT(target);
|
||||||
|
|
||||||
@ -1344,7 +1344,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
OUT(lootee);
|
OUT(lootee);
|
||||||
OUT(looter);
|
OUT(looter);
|
||||||
eq->slot_id = ServerToUnderFootCorpseSlot(emu->slot_id);
|
eq->slot_id = ServerToUFCorpseSlot(emu->slot_id);
|
||||||
OUT(auto_loot);
|
OUT(auto_loot);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
@ -1506,8 +1506,8 @@ namespace Underfoot
|
|||||||
ENCODE_LENGTH_EXACT(MoveItem_Struct);
|
ENCODE_LENGTH_EXACT(MoveItem_Struct);
|
||||||
SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct);
|
SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
eq->from_slot = ServerToUnderfootSlot(emu->from_slot);
|
eq->from_slot = ServerToUFSlot(emu->from_slot);
|
||||||
eq->to_slot = ServerToUnderfootSlot(emu->to_slot);
|
eq->to_slot = ServerToUFSlot(emu->to_slot);
|
||||||
OUT(number_in_stack);
|
OUT(number_in_stack);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
@ -2093,7 +2093,7 @@ namespace Underfoot
|
|||||||
else
|
else
|
||||||
eq->window = emu->window;
|
eq->window = emu->window;
|
||||||
OUT(type);
|
OUT(type);
|
||||||
eq->invslot = ServerToUnderfootSlot(emu->invslot);
|
eq->invslot = ServerToUFSlot(emu->invslot);
|
||||||
strn0cpy(eq->txtfile, emu->booktext, sizeof(eq->txtfile));
|
strn0cpy(eq->txtfile, emu->booktext, sizeof(eq->txtfile));
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
@ -2290,7 +2290,7 @@ namespace Underfoot
|
|||||||
SETUP_DIRECT_ENCODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct);
|
SETUP_DIRECT_ENCODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct);
|
||||||
|
|
||||||
OUT(npcid);
|
OUT(npcid);
|
||||||
eq->itemslot = ServerToUnderfootSlot(emu->itemslot);
|
eq->itemslot = ServerToUFSlot(emu->itemslot);
|
||||||
OUT(quantity);
|
OUT(quantity);
|
||||||
OUT(price);
|
OUT(price);
|
||||||
|
|
||||||
@ -2399,7 +2399,7 @@ namespace Underfoot
|
|||||||
std::string old_message = &emu->message[strlen(emu->sayer)];
|
std::string old_message = &emu->message[strlen(emu->sayer)];
|
||||||
std::string new_message;
|
std::string new_message;
|
||||||
|
|
||||||
ServerToUnderfootTextLink(new_message, old_message);
|
ServerToUFTextLink(new_message, old_message);
|
||||||
|
|
||||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||||
in->size = strlen(emu->sayer) + new_message.length() + 25;
|
in->size = strlen(emu->sayer) + new_message.length() + 25;
|
||||||
@ -2469,7 +2469,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
std::string old_message = InBuffer; // start 'Reward' as string
|
std::string old_message = InBuffer; // start 'Reward' as string
|
||||||
std::string new_message;
|
std::string new_message;
|
||||||
ServerToUnderfootTextLink(new_message, old_message);
|
ServerToUFTextLink(new_message, old_message);
|
||||||
|
|
||||||
in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+
|
in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+
|
||||||
sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+
|
sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+
|
||||||
@ -2570,7 +2570,7 @@ namespace Underfoot
|
|||||||
ENCODE_LENGTH_EXACT(TributeItem_Struct);
|
ENCODE_LENGTH_EXACT(TributeItem_Struct);
|
||||||
SETUP_DIRECT_ENCODE(TributeItem_Struct, structs::TributeItem_Struct);
|
SETUP_DIRECT_ENCODE(TributeItem_Struct, structs::TributeItem_Struct);
|
||||||
|
|
||||||
eq->slot = ServerToUnderfootSlot(emu->slot);
|
eq->slot = ServerToUFSlot(emu->slot);
|
||||||
OUT(quantity);
|
OUT(quantity);
|
||||||
OUT(tribute_master_id);
|
OUT(tribute_master_id);
|
||||||
OUT(tribute_points);
|
OUT(tribute_points);
|
||||||
@ -3060,7 +3060,7 @@ namespace Underfoot
|
|||||||
SETUP_DIRECT_DECODE(Adventure_Sell_Struct, structs::Adventure_Sell_Struct);
|
SETUP_DIRECT_DECODE(Adventure_Sell_Struct, structs::Adventure_Sell_Struct);
|
||||||
|
|
||||||
IN(npcid);
|
IN(npcid);
|
||||||
emu->slot = UnderfootToServerSlot(eq->slot);
|
emu->slot = UFToServerSlot(eq->slot);
|
||||||
IN(charges);
|
IN(charges);
|
||||||
IN(sell_price);
|
IN(sell_price);
|
||||||
|
|
||||||
@ -3073,7 +3073,7 @@ namespace Underfoot
|
|||||||
SETUP_DIRECT_DECODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
SETUP_DIRECT_DECODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
||||||
|
|
||||||
IN(merchant_entity_id);
|
IN(merchant_entity_id);
|
||||||
emu->slot_id = UnderfootToServerSlot(eq->slot_id);
|
emu->slot_id = UFToServerSlot(eq->slot_id);
|
||||||
IN(charges);
|
IN(charges);
|
||||||
IN(cost);
|
IN(cost);
|
||||||
|
|
||||||
@ -3086,7 +3086,7 @@ namespace Underfoot
|
|||||||
SETUP_DIRECT_DECODE(AltCurrencySelectItem_Struct, structs::AltCurrencySelectItem_Struct);
|
SETUP_DIRECT_DECODE(AltCurrencySelectItem_Struct, structs::AltCurrencySelectItem_Struct);
|
||||||
|
|
||||||
IN(merchant_entity_id);
|
IN(merchant_entity_id);
|
||||||
emu->slot_id = UnderfootToServerSlot(eq->slot_id);
|
emu->slot_id = UFToServerSlot(eq->slot_id);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
@ -3096,7 +3096,7 @@ namespace Underfoot
|
|||||||
DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct);
|
DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct);
|
||||||
SETUP_DIRECT_DECODE(ApplyPoison_Struct, structs::ApplyPoison_Struct);
|
SETUP_DIRECT_DECODE(ApplyPoison_Struct, structs::ApplyPoison_Struct);
|
||||||
|
|
||||||
emu->inventorySlot = UnderfootToServerSlot(eq->inventorySlot);
|
emu->inventorySlot = UFToServerSlot(eq->inventorySlot);
|
||||||
IN(success);
|
IN(success);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@ -3118,7 +3118,7 @@ namespace Underfoot
|
|||||||
DECODE_LENGTH_EXACT(structs::AugmentItem_Struct);
|
DECODE_LENGTH_EXACT(structs::AugmentItem_Struct);
|
||||||
SETUP_DIRECT_DECODE(AugmentItem_Struct, structs::AugmentItem_Struct);
|
SETUP_DIRECT_DECODE(AugmentItem_Struct, structs::AugmentItem_Struct);
|
||||||
|
|
||||||
emu->container_slot = UnderfootToServerSlot(eq->container_slot);
|
emu->container_slot = UFToServerSlot(eq->container_slot);
|
||||||
emu->augment_slot = eq->augment_slot;
|
emu->augment_slot = eq->augment_slot;
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@ -3184,7 +3184,7 @@ namespace Underfoot
|
|||||||
IN(slot);
|
IN(slot);
|
||||||
|
|
||||||
IN(spell_id);
|
IN(spell_id);
|
||||||
emu->inventoryslot = UnderfootToServerSlot(eq->inventoryslot);
|
emu->inventoryslot = UFToServerSlot(eq->inventoryslot);
|
||||||
IN(target_id);
|
IN(target_id);
|
||||||
IN(cs_unknown1);
|
IN(cs_unknown1);
|
||||||
IN(cs_unknown2);
|
IN(cs_unknown2);
|
||||||
@ -3218,7 +3218,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
std::string old_message = InBuffer;
|
std::string old_message = InBuffer;
|
||||||
std::string new_message;
|
std::string new_message;
|
||||||
UnderfootToServerTextLink(new_message, old_message);
|
UFToServerTextLink(new_message, old_message);
|
||||||
|
|
||||||
//__packet->size = sizeof(ChannelMessage_Struct)+strlen(InBuffer) + 1;
|
//__packet->size = sizeof(ChannelMessage_Struct)+strlen(InBuffer) + 1;
|
||||||
__packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
__packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||||
@ -3312,7 +3312,7 @@ namespace Underfoot
|
|||||||
DECODE_LENGTH_EXACT(structs::Consume_Struct);
|
DECODE_LENGTH_EXACT(structs::Consume_Struct);
|
||||||
SETUP_DIRECT_DECODE(Consume_Struct, structs::Consume_Struct);
|
SETUP_DIRECT_DECODE(Consume_Struct, structs::Consume_Struct);
|
||||||
|
|
||||||
emu->slot = UnderfootToServerSlot(eq->slot);
|
emu->slot = UFToServerSlot(eq->slot);
|
||||||
IN(auto_consumed);
|
IN(auto_consumed);
|
||||||
IN(type);
|
IN(type);
|
||||||
|
|
||||||
@ -3339,8 +3339,8 @@ namespace Underfoot
|
|||||||
DECODE_LENGTH_EXACT(structs::DeleteItem_Struct);
|
DECODE_LENGTH_EXACT(structs::DeleteItem_Struct);
|
||||||
SETUP_DIRECT_DECODE(DeleteItem_Struct, structs::DeleteItem_Struct);
|
SETUP_DIRECT_DECODE(DeleteItem_Struct, structs::DeleteItem_Struct);
|
||||||
|
|
||||||
emu->from_slot = UnderfootToServerSlot(eq->from_slot);
|
emu->from_slot = UFToServerSlot(eq->from_slot);
|
||||||
emu->to_slot = UnderfootToServerSlot(eq->to_slot);
|
emu->to_slot = UFToServerSlot(eq->to_slot);
|
||||||
IN(number_in_stack);
|
IN(number_in_stack);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@ -3352,7 +3352,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset
|
std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset
|
||||||
std::string new_message;
|
std::string new_message;
|
||||||
UnderfootToServerTextLink(new_message, old_message);
|
UFToServerTextLink(new_message, old_message);
|
||||||
|
|
||||||
__packet->size = sizeof(Emote_Struct);
|
__packet->size = sizeof(Emote_Struct);
|
||||||
__packet->pBuffer = new unsigned char[__packet->size];
|
__packet->pBuffer = new unsigned char[__packet->size];
|
||||||
@ -3519,7 +3519,7 @@ namespace Underfoot
|
|||||||
DECODE_LENGTH_EXACT(structs::ItemVerifyRequest_Struct);
|
DECODE_LENGTH_EXACT(structs::ItemVerifyRequest_Struct);
|
||||||
SETUP_DIRECT_DECODE(ItemVerifyRequest_Struct, structs::ItemVerifyRequest_Struct);
|
SETUP_DIRECT_DECODE(ItemVerifyRequest_Struct, structs::ItemVerifyRequest_Struct);
|
||||||
|
|
||||||
emu->slot = UnderfootToServerSlot(eq->slot);
|
emu->slot = UFToServerSlot(eq->slot);
|
||||||
IN(target);
|
IN(target);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@ -3546,7 +3546,7 @@ namespace Underfoot
|
|||||||
|
|
||||||
IN(lootee);
|
IN(lootee);
|
||||||
IN(looter);
|
IN(looter);
|
||||||
emu->slot_id = UnderfootToServerCorpseSlot(eq->slot_id);
|
emu->slot_id = UFToServerCorpseSlot(eq->slot_id);
|
||||||
IN(auto_loot);
|
IN(auto_loot);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@ -3557,10 +3557,10 @@ namespace Underfoot
|
|||||||
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
||||||
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Moved item from %u to %u", eq->from_slot, eq->to_slot);
|
Log.Out(Logs::General, Logs::Netcode, "[UF] Moved item from %u to %u", eq->from_slot, eq->to_slot);
|
||||||
|
|
||||||
emu->from_slot = UnderfootToServerSlot(eq->from_slot);
|
emu->from_slot = UFToServerSlot(eq->from_slot);
|
||||||
emu->to_slot = UnderfootToServerSlot(eq->to_slot);
|
emu->to_slot = UFToServerSlot(eq->to_slot);
|
||||||
IN(number_in_stack);
|
IN(number_in_stack);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@ -3622,7 +3622,7 @@ namespace Underfoot
|
|||||||
SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct);
|
SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct);
|
||||||
|
|
||||||
IN(type);
|
IN(type);
|
||||||
emu->invslot = UnderfootToServerSlot(eq->invslot);
|
emu->invslot = UFToServerSlot(eq->invslot);
|
||||||
emu->window = (uint8)eq->window;
|
emu->window = (uint8)eq->window;
|
||||||
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
|
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
|
||||||
|
|
||||||
@ -3672,7 +3672,7 @@ namespace Underfoot
|
|||||||
SETUP_DIRECT_DECODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct);
|
SETUP_DIRECT_DECODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct);
|
||||||
|
|
||||||
IN(npcid);
|
IN(npcid);
|
||||||
emu->itemslot = UnderfootToServerSlot(eq->itemslot);
|
emu->itemslot = UFToServerSlot(eq->itemslot);
|
||||||
IN(quantity);
|
IN(quantity);
|
||||||
IN(price);
|
IN(price);
|
||||||
|
|
||||||
@ -3700,7 +3700,7 @@ namespace Underfoot
|
|||||||
DECODE_LENGTH_EXACT(structs::NewCombine_Struct);
|
DECODE_LENGTH_EXACT(structs::NewCombine_Struct);
|
||||||
SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct);
|
SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct);
|
||||||
|
|
||||||
emu->container_slot = UnderfootToServerSlot(eq->container_slot);
|
emu->container_slot = UFToServerSlot(eq->container_slot);
|
||||||
IN(guildtribute_slot);
|
IN(guildtribute_slot);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@ -3711,7 +3711,7 @@ namespace Underfoot
|
|||||||
DECODE_LENGTH_EXACT(structs::TributeItem_Struct);
|
DECODE_LENGTH_EXACT(structs::TributeItem_Struct);
|
||||||
SETUP_DIRECT_DECODE(TributeItem_Struct, structs::TributeItem_Struct);
|
SETUP_DIRECT_DECODE(TributeItem_Struct, structs::TributeItem_Struct);
|
||||||
|
|
||||||
emu->slot = UnderfootToServerSlot(eq->slot);
|
emu->slot = UFToServerSlot(eq->slot);
|
||||||
IN(quantity);
|
IN(quantity);
|
||||||
IN(tribute_master_id);
|
IN(tribute_master_id);
|
||||||
IN(tribute_points);
|
IN(tribute_points);
|
||||||
@ -3781,11 +3781,11 @@ namespace Underfoot
|
|||||||
|
|
||||||
const Item_Struct *item = inst->GetUnscaledItem();
|
const Item_Struct *item = inst->GetUnscaledItem();
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Serialize called for: %s", item->Name);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Serialize called for: %s", item->Name);
|
||||||
Underfoot::structs::ItemSerializationHeader hdr;
|
UF::structs::ItemSerializationHeader hdr;
|
||||||
hdr.stacksize = stackable ? charges : 1;
|
hdr.stacksize = stackable ? charges : 1;
|
||||||
hdr.unknown004 = 0;
|
hdr.unknown004 = 0;
|
||||||
|
|
||||||
int32 slot_id = ServerToUnderfootSlot(slot_id_in);
|
int32 slot_id = ServerToUFSlot(slot_id_in);
|
||||||
|
|
||||||
hdr.slot = (merchant_slot == 0) ? slot_id : merchant_slot;
|
hdr.slot = (merchant_slot == 0) ? slot_id : merchant_slot;
|
||||||
hdr.price = inst->GetPrice();
|
hdr.price = inst->GetPrice();
|
||||||
@ -3800,10 +3800,10 @@ namespace Underfoot
|
|||||||
hdr.unknown048 = 0;
|
hdr.unknown048 = 0;
|
||||||
hdr.unknown052 = 0;
|
hdr.unknown052 = 0;
|
||||||
hdr.isEvolving = item->EvolvingLevel > 0 ? 1 : 0;
|
hdr.isEvolving = item->EvolvingLevel > 0 ? 1 : 0;
|
||||||
ss.write((const char*)&hdr, sizeof(Underfoot::structs::ItemSerializationHeader));
|
ss.write((const char*)&hdr, sizeof(UF::structs::ItemSerializationHeader));
|
||||||
|
|
||||||
if (item->EvolvingLevel > 0) {
|
if (item->EvolvingLevel > 0) {
|
||||||
Underfoot::structs::EvolvingItem evotop;
|
UF::structs::EvolvingItem evotop;
|
||||||
evotop.unknown001 = 0;
|
evotop.unknown001 = 0;
|
||||||
evotop.unknown002 = 0;
|
evotop.unknown002 = 0;
|
||||||
evotop.unknown003 = 0;
|
evotop.unknown003 = 0;
|
||||||
@ -3812,7 +3812,7 @@ namespace Underfoot
|
|||||||
evotop.progress = 95.512;
|
evotop.progress = 95.512;
|
||||||
evotop.Activated = 1;
|
evotop.Activated = 1;
|
||||||
evotop.evomaxlevel = 7;
|
evotop.evomaxlevel = 7;
|
||||||
ss.write((const char*)&evotop, sizeof(Underfoot::structs::EvolvingItem));
|
ss.write((const char*)&evotop, sizeof(UF::structs::EvolvingItem));
|
||||||
}
|
}
|
||||||
//ORNAMENT IDFILE / ICON -
|
//ORNAMENT IDFILE / ICON -
|
||||||
uint16 ornaIcon = 0;
|
uint16 ornaIcon = 0;
|
||||||
@ -3832,13 +3832,13 @@ namespace Underfoot
|
|||||||
ss.write((const char*)&null_term, sizeof(uint8)); //no idfile
|
ss.write((const char*)&null_term, sizeof(uint8)); //no idfile
|
||||||
}
|
}
|
||||||
|
|
||||||
Underfoot::structs::ItemSerializationHeaderFinish hdrf;
|
UF::structs::ItemSerializationHeaderFinish hdrf;
|
||||||
hdrf.ornamentIcon = ornaIcon;
|
hdrf.ornamentIcon = ornaIcon;
|
||||||
hdrf.unknown060 = 0; //This is Always 0.. or it breaks shit..
|
hdrf.unknown060 = 0; //This is Always 0.. or it breaks shit..
|
||||||
hdrf.unknown061 = 0; //possibly ornament / special ornament
|
hdrf.unknown061 = 0; //possibly ornament / special ornament
|
||||||
hdrf.isCopied = 0; //Flag for item to be 'Copied'
|
hdrf.isCopied = 0; //Flag for item to be 'Copied'
|
||||||
hdrf.ItemClass = item->ItemClass;
|
hdrf.ItemClass = item->ItemClass;
|
||||||
ss.write((const char*)&hdrf, sizeof(Underfoot::structs::ItemSerializationHeaderFinish));
|
ss.write((const char*)&hdrf, sizeof(UF::structs::ItemSerializationHeaderFinish));
|
||||||
|
|
||||||
if (strlen(item->Name) > 0)
|
if (strlen(item->Name) > 0)
|
||||||
{
|
{
|
||||||
@ -3870,8 +3870,8 @@ namespace Underfoot
|
|||||||
ss.write((const char*)&null_term, sizeof(uint8));
|
ss.write((const char*)&null_term, sizeof(uint8));
|
||||||
}
|
}
|
||||||
|
|
||||||
Underfoot::structs::ItemBodyStruct ibs;
|
UF::structs::ItemBodyStruct ibs;
|
||||||
memset(&ibs, 0, sizeof(Underfoot::structs::ItemBodyStruct));
|
memset(&ibs, 0, sizeof(UF::structs::ItemBodyStruct));
|
||||||
|
|
||||||
ibs.id = item->ID;
|
ibs.id = item->ID;
|
||||||
ibs.weight = item->Weight;
|
ibs.weight = item->Weight;
|
||||||
@ -3956,7 +3956,7 @@ namespace Underfoot
|
|||||||
ibs.FactionAmt4 = item->FactionAmt4;
|
ibs.FactionAmt4 = item->FactionAmt4;
|
||||||
ibs.FactionMod4 = item->FactionMod4;
|
ibs.FactionMod4 = item->FactionMod4;
|
||||||
|
|
||||||
ss.write((const char*)&ibs, sizeof(Underfoot::structs::ItemBodyStruct));
|
ss.write((const char*)&ibs, sizeof(UF::structs::ItemBodyStruct));
|
||||||
|
|
||||||
//charm text
|
//charm text
|
||||||
if (strlen(item->CharmFile) > 0)
|
if (strlen(item->CharmFile) > 0)
|
||||||
@ -3969,8 +3969,8 @@ namespace Underfoot
|
|||||||
ss.write((const char*)&null_term, sizeof(uint8));
|
ss.write((const char*)&null_term, sizeof(uint8));
|
||||||
}
|
}
|
||||||
|
|
||||||
Underfoot::structs::ItemSecondaryBodyStruct isbs;
|
UF::structs::ItemSecondaryBodyStruct isbs;
|
||||||
memset(&isbs, 0, sizeof(Underfoot::structs::ItemSecondaryBodyStruct));
|
memset(&isbs, 0, sizeof(UF::structs::ItemSecondaryBodyStruct));
|
||||||
|
|
||||||
isbs.augtype = item->AugType;
|
isbs.augtype = item->AugType;
|
||||||
isbs.augrestrict = item->AugRestrict;
|
isbs.augrestrict = item->AugRestrict;
|
||||||
@ -3996,7 +3996,7 @@ namespace Underfoot
|
|||||||
isbs.book = item->Book;
|
isbs.book = item->Book;
|
||||||
isbs.booktype = item->BookType;
|
isbs.booktype = item->BookType;
|
||||||
|
|
||||||
ss.write((const char*)&isbs, sizeof(Underfoot::structs::ItemSecondaryBodyStruct));
|
ss.write((const char*)&isbs, sizeof(UF::structs::ItemSecondaryBodyStruct));
|
||||||
|
|
||||||
if (strlen(item->Filename) > 0)
|
if (strlen(item->Filename) > 0)
|
||||||
{
|
{
|
||||||
@ -4008,8 +4008,8 @@ namespace Underfoot
|
|||||||
ss.write((const char*)&null_term, sizeof(uint8));
|
ss.write((const char*)&null_term, sizeof(uint8));
|
||||||
}
|
}
|
||||||
|
|
||||||
Underfoot::structs::ItemTertiaryBodyStruct itbs;
|
UF::structs::ItemTertiaryBodyStruct itbs;
|
||||||
memset(&itbs, 0, sizeof(Underfoot::structs::ItemTertiaryBodyStruct));
|
memset(&itbs, 0, sizeof(UF::structs::ItemTertiaryBodyStruct));
|
||||||
|
|
||||||
itbs.loregroup = item->LoreGroup;
|
itbs.loregroup = item->LoreGroup;
|
||||||
itbs.artifact = item->ArtifactFlag;
|
itbs.artifact = item->ArtifactFlag;
|
||||||
@ -4030,13 +4030,13 @@ namespace Underfoot
|
|||||||
itbs.no_transfer = item->NoTransfer;
|
itbs.no_transfer = item->NoTransfer;
|
||||||
itbs.expendablearrow = item->ExpendableArrow;
|
itbs.expendablearrow = item->ExpendableArrow;
|
||||||
|
|
||||||
ss.write((const char*)&itbs, sizeof(Underfoot::structs::ItemTertiaryBodyStruct));
|
ss.write((const char*)&itbs, sizeof(UF::structs::ItemTertiaryBodyStruct));
|
||||||
|
|
||||||
// Effect Structures Broken down to allow variable length strings for effect names
|
// Effect Structures Broken down to allow variable length strings for effect names
|
||||||
int32 effect_unknown = 0;
|
int32 effect_unknown = 0;
|
||||||
|
|
||||||
Underfoot::structs::ClickEffectStruct ices;
|
UF::structs::ClickEffectStruct ices;
|
||||||
memset(&ices, 0, sizeof(Underfoot::structs::ClickEffectStruct));
|
memset(&ices, 0, sizeof(UF::structs::ClickEffectStruct));
|
||||||
|
|
||||||
ices.effect = item->Click.Effect;
|
ices.effect = item->Click.Effect;
|
||||||
ices.level2 = item->Click.Level2;
|
ices.level2 = item->Click.Level2;
|
||||||
@ -4047,7 +4047,7 @@ namespace Underfoot
|
|||||||
ices.recast = item->RecastDelay;
|
ices.recast = item->RecastDelay;
|
||||||
ices.recast_type = item->RecastType;
|
ices.recast_type = item->RecastType;
|
||||||
|
|
||||||
ss.write((const char*)&ices, sizeof(Underfoot::structs::ClickEffectStruct));
|
ss.write((const char*)&ices, sizeof(UF::structs::ClickEffectStruct));
|
||||||
|
|
||||||
if (strlen(item->ClickName) > 0)
|
if (strlen(item->ClickName) > 0)
|
||||||
{
|
{
|
||||||
@ -4061,8 +4061,8 @@ namespace Underfoot
|
|||||||
|
|
||||||
ss.write((const char*)&effect_unknown, sizeof(int32)); // clickunk7
|
ss.write((const char*)&effect_unknown, sizeof(int32)); // clickunk7
|
||||||
|
|
||||||
Underfoot::structs::ProcEffectStruct ipes;
|
UF::structs::ProcEffectStruct ipes;
|
||||||
memset(&ipes, 0, sizeof(Underfoot::structs::ProcEffectStruct));
|
memset(&ipes, 0, sizeof(UF::structs::ProcEffectStruct));
|
||||||
|
|
||||||
ipes.effect = item->Proc.Effect;
|
ipes.effect = item->Proc.Effect;
|
||||||
ipes.level2 = item->Proc.Level2;
|
ipes.level2 = item->Proc.Level2;
|
||||||
@ -4070,7 +4070,7 @@ namespace Underfoot
|
|||||||
ipes.level = item->Proc.Level;
|
ipes.level = item->Proc.Level;
|
||||||
ipes.procrate = item->ProcRate;
|
ipes.procrate = item->ProcRate;
|
||||||
|
|
||||||
ss.write((const char*)&ipes, sizeof(Underfoot::structs::ProcEffectStruct));
|
ss.write((const char*)&ipes, sizeof(UF::structs::ProcEffectStruct));
|
||||||
|
|
||||||
if (strlen(item->ProcName) > 0)
|
if (strlen(item->ProcName) > 0)
|
||||||
{
|
{
|
||||||
@ -4084,15 +4084,15 @@ namespace Underfoot
|
|||||||
|
|
||||||
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown5
|
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown5
|
||||||
|
|
||||||
Underfoot::structs::WornEffectStruct iwes;
|
UF::structs::WornEffectStruct iwes;
|
||||||
memset(&iwes, 0, sizeof(Underfoot::structs::WornEffectStruct));
|
memset(&iwes, 0, sizeof(UF::structs::WornEffectStruct));
|
||||||
|
|
||||||
iwes.effect = item->Worn.Effect;
|
iwes.effect = item->Worn.Effect;
|
||||||
iwes.level2 = item->Worn.Level2;
|
iwes.level2 = item->Worn.Level2;
|
||||||
iwes.type = item->Worn.Type;
|
iwes.type = item->Worn.Type;
|
||||||
iwes.level = item->Worn.Level;
|
iwes.level = item->Worn.Level;
|
||||||
|
|
||||||
ss.write((const char*)&iwes, sizeof(Underfoot::structs::WornEffectStruct));
|
ss.write((const char*)&iwes, sizeof(UF::structs::WornEffectStruct));
|
||||||
|
|
||||||
if (strlen(item->WornName) > 0)
|
if (strlen(item->WornName) > 0)
|
||||||
{
|
{
|
||||||
@ -4106,15 +4106,15 @@ namespace Underfoot
|
|||||||
|
|
||||||
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown6
|
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown6
|
||||||
|
|
||||||
Underfoot::structs::WornEffectStruct ifes;
|
UF::structs::WornEffectStruct ifes;
|
||||||
memset(&ifes, 0, sizeof(Underfoot::structs::WornEffectStruct));
|
memset(&ifes, 0, sizeof(UF::structs::WornEffectStruct));
|
||||||
|
|
||||||
ifes.effect = item->Focus.Effect;
|
ifes.effect = item->Focus.Effect;
|
||||||
ifes.level2 = item->Focus.Level2;
|
ifes.level2 = item->Focus.Level2;
|
||||||
ifes.type = item->Focus.Type;
|
ifes.type = item->Focus.Type;
|
||||||
ifes.level = item->Focus.Level;
|
ifes.level = item->Focus.Level;
|
||||||
|
|
||||||
ss.write((const char*)&ifes, sizeof(Underfoot::structs::WornEffectStruct));
|
ss.write((const char*)&ifes, sizeof(UF::structs::WornEffectStruct));
|
||||||
|
|
||||||
if (strlen(item->FocusName) > 0)
|
if (strlen(item->FocusName) > 0)
|
||||||
{
|
{
|
||||||
@ -4128,15 +4128,15 @@ namespace Underfoot
|
|||||||
|
|
||||||
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown6
|
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown6
|
||||||
|
|
||||||
Underfoot::structs::WornEffectStruct ises;
|
UF::structs::WornEffectStruct ises;
|
||||||
memset(&ises, 0, sizeof(Underfoot::structs::WornEffectStruct));
|
memset(&ises, 0, sizeof(UF::structs::WornEffectStruct));
|
||||||
|
|
||||||
ises.effect = item->Scroll.Effect;
|
ises.effect = item->Scroll.Effect;
|
||||||
ises.level2 = item->Scroll.Level2;
|
ises.level2 = item->Scroll.Level2;
|
||||||
ises.type = item->Scroll.Type;
|
ises.type = item->Scroll.Type;
|
||||||
ises.level = item->Scroll.Level;
|
ises.level = item->Scroll.Level;
|
||||||
|
|
||||||
ss.write((const char*)&ises, sizeof(Underfoot::structs::WornEffectStruct));
|
ss.write((const char*)&ises, sizeof(UF::structs::WornEffectStruct));
|
||||||
|
|
||||||
if (strlen(item->ScrollName) > 0)
|
if (strlen(item->ScrollName) > 0)
|
||||||
{
|
{
|
||||||
@ -4151,8 +4151,8 @@ namespace Underfoot
|
|||||||
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown6
|
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown6
|
||||||
|
|
||||||
// Bard Effect?
|
// Bard Effect?
|
||||||
Underfoot::structs::WornEffectStruct ibes;
|
UF::structs::WornEffectStruct ibes;
|
||||||
memset(&ibes, 0, sizeof(Underfoot::structs::WornEffectStruct));
|
memset(&ibes, 0, sizeof(UF::structs::WornEffectStruct));
|
||||||
|
|
||||||
ibes.effect = item->Bard.Effect;
|
ibes.effect = item->Bard.Effect;
|
||||||
ibes.level2 = item->Bard.Level2;
|
ibes.level2 = item->Bard.Level2;
|
||||||
@ -4160,7 +4160,7 @@ namespace Underfoot
|
|||||||
ibes.level = item->Bard.Level;
|
ibes.level = item->Bard.Level;
|
||||||
//ibes.unknown6 = 0xffffffff;
|
//ibes.unknown6 = 0xffffffff;
|
||||||
|
|
||||||
ss.write((const char*)&ibes, sizeof(Underfoot::structs::WornEffectStruct));
|
ss.write((const char*)&ibes, sizeof(UF::structs::WornEffectStruct));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if(strlen(item->BardName) > 0)
|
if(strlen(item->BardName) > 0)
|
||||||
@ -4174,8 +4174,8 @@ namespace Underfoot
|
|||||||
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown6
|
ss.write((const char*)&effect_unknown, sizeof(int32)); // unknown6
|
||||||
// End of Effects
|
// End of Effects
|
||||||
|
|
||||||
Underfoot::structs::ItemQuaternaryBodyStruct iqbs;
|
UF::structs::ItemQuaternaryBodyStruct iqbs;
|
||||||
memset(&iqbs, 0, sizeof(Underfoot::structs::ItemQuaternaryBodyStruct));
|
memset(&iqbs, 0, sizeof(UF::structs::ItemQuaternaryBodyStruct));
|
||||||
|
|
||||||
iqbs.scriptfileid = item->ScriptFileID;
|
iqbs.scriptfileid = item->ScriptFileID;
|
||||||
iqbs.quest_item = item->QuestItemFlag;
|
iqbs.quest_item = item->QuestItemFlag;
|
||||||
@ -4240,7 +4240,7 @@ namespace Underfoot
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ss.write((const char*)&iqbs, sizeof(Underfoot::structs::ItemQuaternaryBodyStruct));
|
ss.write((const char*)&iqbs, sizeof(UF::structs::ItemQuaternaryBodyStruct));
|
||||||
|
|
||||||
for (int x = 0; x < 10; ++x) {
|
for (int x = 0; x < 10; ++x) {
|
||||||
|
|
||||||
@ -4262,62 +4262,62 @@ namespace Underfoot
|
|||||||
return item_serial;
|
return item_serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 ServerToUnderfootSlot(uint32 ServerSlot)
|
static inline uint32 ServerToUFSlot(uint32 serverSlot)
|
||||||
{
|
{
|
||||||
uint32 UnderfootSlot = 0;
|
uint32 UnderfootSlot = 0;
|
||||||
|
|
||||||
if (ServerSlot >= MainAmmo && ServerSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (serverSlot >= MainAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
UnderfootSlot = ServerSlot + 1;
|
UnderfootSlot = serverSlot + 1;
|
||||||
else if (ServerSlot >= EmuConstants::GENERAL_BAGS_BEGIN && ServerSlot <= EmuConstants::CURSOR_BAG_END)
|
else if (serverSlot >= EmuConstants::GENERAL_BAGS_BEGIN && serverSlot <= EmuConstants::CURSOR_BAG_END)
|
||||||
UnderfootSlot = ServerSlot + 11;
|
UnderfootSlot = serverSlot + 11;
|
||||||
else if (ServerSlot >= EmuConstants::BANK_BAGS_BEGIN && ServerSlot <= EmuConstants::BANK_BAGS_END)
|
else if (serverSlot >= EmuConstants::BANK_BAGS_BEGIN && serverSlot <= EmuConstants::BANK_BAGS_END)
|
||||||
UnderfootSlot = ServerSlot + 1;
|
UnderfootSlot = serverSlot + 1;
|
||||||
else if (ServerSlot >= EmuConstants::SHARED_BANK_BAGS_BEGIN && ServerSlot <= EmuConstants::SHARED_BANK_BAGS_END)
|
else if (serverSlot >= EmuConstants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EmuConstants::SHARED_BANK_BAGS_END)
|
||||||
UnderfootSlot = ServerSlot + 1;
|
UnderfootSlot = serverSlot + 1;
|
||||||
else if (ServerSlot == MainPowerSource)
|
else if (serverSlot == MainPowerSource)
|
||||||
UnderfootSlot = slots::MainPowerSource;
|
UnderfootSlot = slots::MainPowerSource;
|
||||||
else
|
else
|
||||||
UnderfootSlot = ServerSlot;
|
UnderfootSlot = serverSlot;
|
||||||
|
|
||||||
return UnderfootSlot;
|
return UnderfootSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 ServerToUnderFootCorpseSlot(uint32 ServerCorpse)
|
static inline uint32 ServerToUFCorpseSlot(uint32 serverCorpseSlot)
|
||||||
{
|
{
|
||||||
//uint32 UnderfootCorpse;
|
//uint32 UnderfootCorpse;
|
||||||
return (ServerCorpse + 1);
|
return (serverCorpseSlot + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 UnderfootToServerSlot(uint32 UnderfootSlot)
|
static inline uint32 UFToServerSlot(uint32 ufSlot)
|
||||||
{
|
{
|
||||||
uint32 ServerSlot = 0;
|
uint32 ServerSlot = 0;
|
||||||
|
|
||||||
if (UnderfootSlot >= slots::MainAmmo && UnderfootSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (ufSlot >= slots::MainAmmo && ufSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
ServerSlot = UnderfootSlot - 1;
|
ServerSlot = ufSlot - 1;
|
||||||
else if (UnderfootSlot >= consts::GENERAL_BAGS_BEGIN && UnderfootSlot <= consts::CURSOR_BAG_END)
|
else if (ufSlot >= consts::GENERAL_BAGS_BEGIN && ufSlot <= consts::CURSOR_BAG_END)
|
||||||
ServerSlot = UnderfootSlot - 11;
|
ServerSlot = ufSlot - 11;
|
||||||
else if (UnderfootSlot >= consts::BANK_BAGS_BEGIN && UnderfootSlot <= consts::BANK_BAGS_END)
|
else if (ufSlot >= consts::BANK_BAGS_BEGIN && ufSlot <= consts::BANK_BAGS_END)
|
||||||
ServerSlot = UnderfootSlot - 1;
|
ServerSlot = ufSlot - 1;
|
||||||
else if (UnderfootSlot >= consts::SHARED_BANK_BAGS_BEGIN && UnderfootSlot <= consts::SHARED_BANK_BAGS_END)
|
else if (ufSlot >= consts::SHARED_BANK_BAGS_BEGIN && ufSlot <= consts::SHARED_BANK_BAGS_END)
|
||||||
ServerSlot = UnderfootSlot - 1;
|
ServerSlot = ufSlot - 1;
|
||||||
else if (UnderfootSlot == slots::MainPowerSource)
|
else if (ufSlot == slots::MainPowerSource)
|
||||||
ServerSlot = MainPowerSource;
|
ServerSlot = MainPowerSource;
|
||||||
else
|
else
|
||||||
ServerSlot = UnderfootSlot;
|
ServerSlot = ufSlot;
|
||||||
|
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32 UnderfootToServerCorpseSlot(uint32 UnderfootCorpse)
|
static inline uint32 UFToServerCorpseSlot(uint32 ufCorpseSlot)
|
||||||
{
|
{
|
||||||
//uint32 ServerCorpse;
|
//uint32 ServerCorpse;
|
||||||
return (UnderfootCorpse - 1);
|
return (ufCorpseSlot - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ServerToUnderfootTextLink(std::string& underfootTextLink, const std::string& serverTextLink)
|
static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink)
|
||||||
{
|
{
|
||||||
if ((consts::TEXT_LINK_BODY_LENGTH == EmuConstants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
if ((consts::TEXT_LINK_BODY_LENGTH == EmuConstants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||||
underfootTextLink = serverTextLink;
|
ufTextLink = serverTextLink;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4326,7 +4326,7 @@ namespace Underfoot
|
|||||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||||
if (segment_iter & 1) {
|
if (segment_iter & 1) {
|
||||||
if (segments[segment_iter].length() <= EmuConstants::TEXT_LINK_BODY_LENGTH) {
|
if (segments[segment_iter].length() <= EmuConstants::TEXT_LINK_BODY_LENGTH) {
|
||||||
underfootTextLink.append(segments[segment_iter]);
|
ufTextLink.append(segments[segment_iter]);
|
||||||
// TODO: log size mismatch error
|
// TODO: log size mismatch error
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -4336,32 +4336,32 @@ namespace Underfoot
|
|||||||
// SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50)
|
// SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50)
|
||||||
// Diff: ^^^^^ ^
|
// Diff: ^^^^^ ^
|
||||||
|
|
||||||
underfootTextLink.push_back('\x12');
|
ufTextLink.push_back('\x12');
|
||||||
underfootTextLink.append(segments[segment_iter].substr(0, 31));
|
ufTextLink.append(segments[segment_iter].substr(0, 31));
|
||||||
underfootTextLink.append(segments[segment_iter].substr(36, 5));
|
ufTextLink.append(segments[segment_iter].substr(36, 5));
|
||||||
|
|
||||||
if (segments[segment_iter][41] == '0')
|
if (segments[segment_iter][41] == '0')
|
||||||
underfootTextLink.push_back(segments[segment_iter][42]);
|
ufTextLink.push_back(segments[segment_iter][42]);
|
||||||
else
|
else
|
||||||
underfootTextLink.push_back('F');
|
ufTextLink.push_back('F');
|
||||||
|
|
||||||
underfootTextLink.append(segments[segment_iter].substr(43));
|
ufTextLink.append(segments[segment_iter].substr(43));
|
||||||
underfootTextLink.push_back('\x12');
|
ufTextLink.push_back('\x12');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
underfootTextLink.append(segments[segment_iter]);
|
ufTextLink.append(segments[segment_iter]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void UnderfootToServerTextLink(std::string& serverTextLink, const std::string& underfootTextLink)
|
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink)
|
||||||
{
|
{
|
||||||
if ((EmuConstants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (underfootTextLink.find('\x12') == std::string::npos)) {
|
if ((EmuConstants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (ufTextLink.find('\x12') == std::string::npos)) {
|
||||||
serverTextLink = underfootTextLink;
|
serverTextLink = ufTextLink;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto segments = SplitString(underfootTextLink, '\x12');
|
auto segments = SplitString(ufTextLink, '\x12');
|
||||||
|
|
||||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||||
if (segment_iter & 1) {
|
if (segment_iter & 1) {
|
||||||
@ -4390,4 +4390,4 @@ namespace Underfoot
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// end namespace Underfoot
|
// end namespace UF
|
||||||
@ -1,11 +1,11 @@
|
|||||||
#ifndef Underfoot_H_
|
#ifndef UF_H_
|
||||||
#define Underfoot_H_
|
#define UF_H_
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
#include "../struct_strategy.h"
|
||||||
|
|
||||||
class EQStreamIdentifier;
|
class EQStreamIdentifier;
|
||||||
|
|
||||||
namespace Underfoot {
|
namespace UF {
|
||||||
|
|
||||||
//these are the only public member of this namespace.
|
//these are the only public member of this namespace.
|
||||||
extern void Register(EQStreamIdentifier &into);
|
extern void Register(EQStreamIdentifier &into);
|
||||||
@ -27,11 +27,9 @@ namespace Underfoot {
|
|||||||
|
|
||||||
//magic macro to declare our opcode processors
|
//magic macro to declare our opcode processors
|
||||||
#include "ss_declare.h"
|
#include "ss_declare.h"
|
||||||
#include "underfoot_ops.h"
|
#include "uf_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /*UF_H_*/
|
||||||
|
|
||||||
#endif /*Underfoot_H_*/
|
|
||||||
@ -19,12 +19,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef Underfoot_CONSTANTS_H_
|
#ifndef UF_CONSTANTS_H_
|
||||||
#define Underfoot_CONSTANTS_H_
|
#define UF_CONSTANTS_H_
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
|
|
||||||
namespace Underfoot {
|
namespace UF {
|
||||||
namespace maps {
|
namespace maps {
|
||||||
typedef enum : int16 {
|
typedef enum : int16 {
|
||||||
// this needs work to match actual client equivilents
|
// this needs work to match actual client equivilents
|
||||||
@ -187,12 +187,12 @@ namespace Underfoot {
|
|||||||
static const bool COIN_HAS_WEIGHT = false;
|
static const bool COIN_HAS_WEIGHT = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}; //end namespace Underfoot
|
}; //end namespace UF
|
||||||
|
|
||||||
#endif /*Underfoot_CONSTANTS_H_*/
|
#endif /*UF_CONSTANTS_H_*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Underfoot Notes:
|
UF Notes:
|
||||||
** Integer-based inventory **
|
** Integer-based inventory **
|
||||||
ok Possessions: 0 - 31 (Corpse: 23 - 54 [Offset 23])
|
ok Possessions: 0 - 31 (Corpse: 23 - 54 [Offset 23])
|
||||||
ok [Equipment: 0 - 22]
|
ok [Equipment: 0 - 22]
|
||||||
@ -436,4 +436,3 @@ These fields must be in the order of how they are serialized!
|
|||||||
#undef C
|
#undef C
|
||||||
#undef S
|
#undef S
|
||||||
#undef F
|
#undef F
|
||||||
|
|
||||||
@ -129,5 +129,6 @@ D(OP_TradeSkillCombine)
|
|||||||
D(OP_TributeItem)
|
D(OP_TributeItem)
|
||||||
D(OP_WearChange)
|
D(OP_WearChange)
|
||||||
D(OP_WhoAllRequest)
|
D(OP_WhoAllRequest)
|
||||||
|
|
||||||
#undef E
|
#undef E
|
||||||
#undef D
|
#undef D
|
||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef Underfoot_STRUCTS_H_
|
#ifndef UF_STRUCTS_H_
|
||||||
#define Underfoot_STRUCTS_H_
|
#define UF_STRUCTS_H_
|
||||||
|
|
||||||
namespace Underfoot {
|
namespace UF {
|
||||||
namespace structs {
|
namespace structs {
|
||||||
|
|
||||||
|
|
||||||
@ -4531,6 +4531,6 @@ struct MercenaryAssign_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
}; //end namespace Underfoot
|
}; //end namespace UF
|
||||||
|
|
||||||
#endif /*Underfoot_STRUCTS_H_*/
|
#endif /*UF_STRUCTS_H_*/
|
||||||
@ -845,7 +845,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
|
|
||||||
char ConnectionType;
|
char ConnectionType;
|
||||||
|
|
||||||
if(ClientVersionBit & BIT_UnderfootAndLater)
|
if(ClientVersionBit & BIT_UFAndLater)
|
||||||
ConnectionType = 'U';
|
ConnectionType = 'U';
|
||||||
else if(ClientVersionBit & BIT_SoFAndLater)
|
else if(ClientVersionBit & BIT_SoFAndLater)
|
||||||
ConnectionType = 'S';
|
ConnectionType = 'S';
|
||||||
|
|||||||
@ -1138,7 +1138,7 @@ public:
|
|||||||
void HandleLFGuildResponse(ServerPacket *pack);
|
void HandleLFGuildResponse(ServerPacket *pack);
|
||||||
void SendLFGuildStatus();
|
void SendLFGuildStatus();
|
||||||
void SendGuildLFGuildStatus();
|
void SendGuildLFGuildStatus();
|
||||||
inline bool XTargettingAvailable() const { return ((ClientVersionBit & BIT_UnderfootAndLater) && RuleB(Character, EnableXTargetting)); }
|
inline bool XTargettingAvailable() const { return ((ClientVersionBit & BIT_UFAndLater) && RuleB(Character, EnableXTargetting)); }
|
||||||
inline uint8 GetMaxXTargets() const { return MaxXTargets; }
|
inline uint8 GetMaxXTargets() const { return MaxXTargets; }
|
||||||
void SetMaxXTargets(uint8 NewMax);
|
void SetMaxXTargets(uint8 NewMax);
|
||||||
bool IsXTarget(const Mob *m) const;
|
bool IsXTarget(const Mob *m) const;
|
||||||
|
|||||||
@ -848,7 +848,7 @@ void Client::CompleteConnect()
|
|||||||
worldserver.SendPacket(pack);
|
worldserver.SendPacket(pack);
|
||||||
delete pack;
|
delete pack;
|
||||||
|
|
||||||
if (IsClient() && CastToClient()->GetClientVersionBit() & BIT_UnderfootAndLater) {
|
if (IsClient() && CastToClient()->GetClientVersionBit() & BIT_UFAndLater) {
|
||||||
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
||||||
CastToClient()->FastQueuePacket(&outapp);
|
CastToClient()->FastQueuePacket(&outapp);
|
||||||
}
|
}
|
||||||
@ -1864,7 +1864,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
|||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ClientVersionBit & BIT_UnderfootAndLater) {
|
if (ClientVersionBit & BIT_UFAndLater) {
|
||||||
outapp = new EQApplicationPacket(OP_XTargetResponse, 8);
|
outapp = new EQApplicationPacket(OP_XTargetResponse, 8);
|
||||||
outapp->WriteUInt32(GetMaxXTargets());
|
outapp->WriteUInt32(GetMaxXTargets());
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
|
|||||||
@ -2231,7 +2231,7 @@ void Client::ClearHover()
|
|||||||
entity_list.QueueClients(this, outapp, false);
|
entity_list.QueueClients(this, outapp, false);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
|
|
||||||
if(IsClient() && CastToClient()->GetClientVersionBit() & BIT_UnderfootAndLater)
|
if(IsClient() && CastToClient()->GetClientVersionBit() & BIT_UFAndLater)
|
||||||
{
|
{
|
||||||
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
||||||
CastToClient()->FastQueuePacket(&outapp);
|
CastToClient()->FastQueuePacket(&outapp);
|
||||||
|
|||||||
@ -1759,12 +1759,11 @@ luabind::scope lua_register_client_version() {
|
|||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[
|
||||||
luabind::value("Unknown", static_cast<int>(ClientVersion::Unknown)),
|
luabind::value("Unknown", static_cast<int>(ClientVersion::Unknown)),
|
||||||
luabind::value("Titanium", static_cast<int>(ClientVersion::Tit)), // deprecated
|
luabind::value("Titanium", static_cast<int>(ClientVersion::Titanium)),
|
||||||
luabind::value("Tit", static_cast<int>(ClientVersion::Tit)),
|
|
||||||
luabind::value("SoF", static_cast<int>(ClientVersion::SoF)),
|
luabind::value("SoF", static_cast<int>(ClientVersion::SoF)),
|
||||||
luabind::value("SoD", static_cast<int>(ClientVersion::SoD)),
|
luabind::value("SoD", static_cast<int>(ClientVersion::SoD)),
|
||||||
luabind::value("Underfoot", static_cast<int>(ClientVersion::Und)), // deprecated
|
luabind::value("Underfoot", static_cast<int>(ClientVersion::UF)), // deprecated
|
||||||
luabind::value("Und", static_cast<int>(ClientVersion::Und)),
|
luabind::value("UF", static_cast<int>(ClientVersion::UF)),
|
||||||
luabind::value("RoF", static_cast<int>(ClientVersion::RoF)),
|
luabind::value("RoF", static_cast<int>(ClientVersion::RoF)),
|
||||||
luabind::value("RoF2", static_cast<int>(ClientVersion::RoF2))
|
luabind::value("RoF2", static_cast<int>(ClientVersion::RoF2))
|
||||||
];
|
];
|
||||||
|
|||||||
@ -42,7 +42,7 @@ Merc::Merc(const NPCType* d, float x, float y, float z, float heading)
|
|||||||
_baseFR = d->FR;
|
_baseFR = d->FR;
|
||||||
_basePR = d->PR;
|
_basePR = d->PR;
|
||||||
_baseCorrup = d->Corrup;
|
_baseCorrup = d->Corrup;
|
||||||
_OwnerClientVersion = static_cast<unsigned int>(ClientVersion::Tit);
|
_OwnerClientVersion = static_cast<unsigned int>(ClientVersion::Titanium);
|
||||||
RestRegenHP = 0;
|
RestRegenHP = 0;
|
||||||
RestRegenMana = 0;
|
RestRegenMana = 0;
|
||||||
RestRegenEndurance = 0;
|
RestRegenEndurance = 0;
|
||||||
|
|||||||
@ -134,7 +134,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
if (spells[spell_id].EndurUpkeep > 0)
|
if (spells[spell_id].EndurUpkeep > 0)
|
||||||
SetEndurUpkeep(true);
|
SetEndurUpkeep(true);
|
||||||
|
|
||||||
if(IsClient() && CastToClient()->GetClientVersionBit() & BIT_UnderfootAndLater)
|
if(IsClient() && CastToClient()->GetClientVersionBit() & BIT_UFAndLater)
|
||||||
{
|
{
|
||||||
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
||||||
CastToClient()->FastQueuePacket(&outapp);
|
CastToClient()->FastQueuePacket(&outapp);
|
||||||
@ -3409,7 +3409,7 @@ void Mob::BuffProcess()
|
|||||||
{
|
{
|
||||||
CastToClient()->SendBuffDurationPacket(buffs[buffs_i]);
|
CastToClient()->SendBuffDurationPacket(buffs[buffs_i]);
|
||||||
// Hack to get UF to play nicer, RoF seems fine without it
|
// Hack to get UF to play nicer, RoF seems fine without it
|
||||||
if (CastToClient()->GetClientVersion() == ClientVersion::Und && buffs[buffs_i].numhits > 0)
|
if (CastToClient()->GetClientVersion() == ClientVersion::UF && buffs[buffs_i].numhits > 0)
|
||||||
CastToClient()->SendBuffNumHitPacket(buffs[buffs_i], buffs_i);
|
CastToClient()->SendBuffNumHitPacket(buffs[buffs_i], buffs_i);
|
||||||
buffs[buffs_i].UpdateClient = false;
|
buffs[buffs_i].UpdateClient = false;
|
||||||
}
|
}
|
||||||
@ -4175,7 +4175,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
|||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(IsClient() && CastToClient()->GetClientVersionBit() & BIT_UnderfootAndLater)
|
if(IsClient() && CastToClient()->GetClientVersionBit() & BIT_UFAndLater)
|
||||||
{
|
{
|
||||||
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
EQApplicationPacket *outapp = MakeBuffsPacket(false);
|
||||||
CastToClient()->FastQueuePacket(&outapp);
|
CastToClient()->FastQueuePacket(&outapp);
|
||||||
|
|||||||
@ -5248,7 +5248,7 @@ void Client::SendBuffDurationPacket(Buffs_Struct &buff)
|
|||||||
void Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
|
void Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
|
||||||
{
|
{
|
||||||
// UF+ use this packet
|
// UF+ use this packet
|
||||||
if (GetClientVersion() < ClientVersion::Und)
|
if (GetClientVersion() < ClientVersion::UF)
|
||||||
return;
|
return;
|
||||||
EQApplicationPacket *outapp;
|
EQApplicationPacket *outapp;
|
||||||
outapp = new EQApplicationPacket(OP_BuffCreate, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct));
|
outapp = new EQApplicationPacket(OP_BuffCreate, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user