mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-23 00:08:23 +00:00
Merge from master
This commit is contained in:
@@ -548,6 +548,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
},
|
||||
{ // local[MapBank]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ NOT_USED,
|
||||
/*Titanium*/ Titanium::consts::MAP_BANK_SIZE,
|
||||
/*SoF*/ EmuConstants::MAP_BANK_SIZE,
|
||||
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
|
||||
@@ -697,6 +698,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
},
|
||||
{ // local[MapCorpse]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ NOT_USED,
|
||||
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
|
||||
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
|
||||
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
|
||||
@@ -726,6 +728,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
},
|
||||
{ // local[MapInspect]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ NOT_USED,
|
||||
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
|
||||
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
|
||||
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
|
||||
@@ -1003,6 +1006,7 @@ uint64 EQLimits::CursorBitmask(uint32 version) {
|
||||
bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
|
||||
static const bool local[_EmuClientCount] = {
|
||||
/*Unknown*/ false,
|
||||
/*62*/ false,
|
||||
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
@@ -1023,6 +1027,8 @@ bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
|
||||
bool EQLimits::AllowsClickCastFromBag(uint32 version) {
|
||||
static const bool local[_EmuClientCount] = {
|
||||
/*Unknown*/ false,
|
||||
/*62*/ false,
|
||||
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*Underfoot*/ Underfoot::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
@@ -1082,6 +1088,7 @@ uint16 EQLimits::ItemContainerSize(uint32 version) {
|
||||
bool EQLimits::CoinHasWeight(uint32 version) {
|
||||
static const bool local[_EmuClientCount] = {
|
||||
/*Unknown*/ true,
|
||||
/*62*/ true,
|
||||
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
|
||||
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
|
||||
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
|
||||
|
||||
@@ -1380,19 +1380,19 @@ struct PlayerPositionUpdateServer_Struct
|
||||
struct PlayerPositionUpdateClient_Struct
|
||||
{
|
||||
/*0000*/ uint16 spawn_id;
|
||||
/*0022*/ uint16 sequence; //increments one each packet
|
||||
/*0002*/ uint16 sequence; //increments one each packet
|
||||
/*0004*/ float y_pos; // y coord
|
||||
/*0008*/ float delta_z; // Change in z
|
||||
/*0016*/ float delta_x; // Change in x
|
||||
/*0012*/ float delta_y; // Change in y
|
||||
/*0012*/ float delta_x; // Change in x
|
||||
/*0016*/ float delta_y; // Change in y
|
||||
/*0020*/ int32 animation:10, // animation
|
||||
delta_heading:10, // change in heading
|
||||
padding0020:12; // ***Placeholder (mostly 1)
|
||||
/*0024*/ float x_pos; // x coord
|
||||
/*0028*/ float z_pos; // z coord
|
||||
/*0034*/ uint16 heading:12, // Directional heading
|
||||
/*0032*/ uint16 heading:12, // Directional heading
|
||||
padding0004:4; // ***Placeholder
|
||||
/*0032*/ uint8 unknown0006[2]; // ***Placeholder
|
||||
/*0034*/ uint8 unknown0006[2]; // ***Placeholder
|
||||
/*0036*/
|
||||
};
|
||||
|
||||
|
||||
+19
-9
@@ -47,7 +47,13 @@
|
||||
|
||||
uint16 EQStream::MaxWindowSize=2048;
|
||||
|
||||
void EQStream::init() {
|
||||
void EQStream::init(bool resetSession) {
|
||||
// we only reset these statistics if it is a 'new' connection
|
||||
if ( resetSession )
|
||||
{
|
||||
streamactive = false;
|
||||
sessionAttempts = 0;
|
||||
}
|
||||
active_users = 0;
|
||||
Session=0;
|
||||
Key=0;
|
||||
@@ -313,18 +319,22 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
||||
}
|
||||
#ifndef COLLECTOR
|
||||
if (GetState()==ESTABLISHED) {
|
||||
_log(NET__ERROR, _L "Received OP_SessionRequest in ESTABLISHED state (%d)" __L, GetState());
|
||||
_log(NET__ERROR, _L "Received OP_SessionRequest in ESTABLISHED state (%d) streamactive (%i) attempt (%i)" __L, GetState(),streamactive,sessionAttempts);
|
||||
|
||||
/*RemoveData();
|
||||
init();
|
||||
State=UNESTABLISHED;*/
|
||||
_SendDisconnect();
|
||||
SetState(CLOSED);
|
||||
break;
|
||||
// client seems to try a max of 30 times (initial+3 retries) then gives up, giving it a few more attempts just in case
|
||||
// streamactive means we identified the opcode for the stream, we cannot re-establish this connection
|
||||
if ( streamactive || ( sessionAttempts > MAX_SESSION_RETRIES ) )
|
||||
{
|
||||
_SendDisconnect();
|
||||
SetState(CLOSED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//std::cout << "Got OP_SessionRequest" << std::endl;
|
||||
init();
|
||||
sessionAttempts++;
|
||||
// we set established below, so statistics will not be reset for session attempts/stream active.
|
||||
init(GetState()!=ESTABLISHED);
|
||||
OutboundQueueClear();
|
||||
SessionRequest *Request=(SessionRequest *)p->pBuffer;
|
||||
Session=ntohl(Request->Session);
|
||||
|
||||
+12
-2
@@ -49,6 +49,10 @@ class EQProtocolPacket;
|
||||
#define RETRANSMIT_ACKED_PACKETS true
|
||||
#endif
|
||||
|
||||
#ifndef MAX_SESSION_RETRIES
|
||||
#define MAX_SESSION_RETRIES 30
|
||||
#endif
|
||||
|
||||
#pragma pack(1)
|
||||
struct SessionRequest {
|
||||
uint32 UnknownA;
|
||||
@@ -104,6 +108,9 @@ class EQStream : public EQStreamInterface {
|
||||
uint32 retransmittimer;
|
||||
uint32 retransmittimeout;
|
||||
|
||||
uint16 sessionAttempts;
|
||||
bool streamactive;
|
||||
|
||||
//uint32 buffer_len;
|
||||
|
||||
uint32 Session, Key;
|
||||
@@ -197,9 +204,9 @@ class EQStream : public EQStreamInterface {
|
||||
|
||||
void _SendDisconnect();
|
||||
|
||||
void init();
|
||||
void init(bool resetSession=true);
|
||||
public:
|
||||
EQStream() { init(); remote_ip = 0; remote_port = 0; State=UNESTABLISHED; StreamType=UnknownStream; compressed=true; encoded=false; app_opcode_size=2; bytes_sent=0; bytes_recv=0; create_time=Timer::GetTimeSeconds(); }
|
||||
EQStream() { init(); remote_ip = 0; remote_port = 0; State=UNESTABLISHED; StreamType=UnknownStream; compressed=true; encoded=false; app_opcode_size=2; bytes_sent=0; bytes_recv=0; create_time=Timer::GetTimeSeconds(); sessionAttempts = 0; streamactive=false; }
|
||||
EQStream(sockaddr_in addr) { init(); remote_ip=addr.sin_addr.s_addr; remote_port=addr.sin_port; State=UNESTABLISHED; StreamType=UnknownStream; compressed=true; encoded=false; app_opcode_size=2; bytes_sent=0; bytes_recv=0; create_time=Timer::GetTimeSeconds(); }
|
||||
virtual ~EQStream() { RemoveData(); SetState(CLOSED); }
|
||||
void SetMaxLen(uint32 length) { MaxLen=length; }
|
||||
@@ -224,6 +231,9 @@ class EQStream : public EQStreamInterface {
|
||||
void SetLastPacketTime(uint32 t) {LastPacket=t;}
|
||||
void Write(int eq_fd);
|
||||
|
||||
// whether or not the stream has been assigned (we passed our stream match)
|
||||
void SetActive(bool val) { streamactive = val; }
|
||||
|
||||
//
|
||||
inline bool IsInUse() { bool flag; MInUse.lock(); flag=(active_users>0); MInUse.unlock(); return flag; }
|
||||
inline void PutInUse() { MInUse.lock(); active_users++; MInUse.unlock(); }
|
||||
|
||||
@@ -110,6 +110,9 @@ void EQStreamIdentifier::Process() {
|
||||
|
||||
_log(NET__IDENTIFY, "Identified stream %s:%d with signature %s", long2ip(r->stream->GetRemoteIP()).c_str(), ntohs(r->stream->GetRemotePort()), p->name.c_str());
|
||||
|
||||
// before we assign the eqstream to an interface, let the stream recognize it is in use and the session should not be reset any further
|
||||
r->stream->SetActive(true);
|
||||
|
||||
//might want to do something less-specific here... some day..
|
||||
EQStreamInterface *s = new EQStreamProxy(r->stream, p->structs, p->opcodes);
|
||||
m_identified.push(s);
|
||||
|
||||
+5
-30
@@ -205,7 +205,7 @@ namespace RoF
|
||||
SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
||||
|
||||
OUT(merchant_entity_id);
|
||||
eq->slot_id = ServerToRoFSlot(emu->slot_id);
|
||||
eq->slot_id = ServerToRoFMainInvSlot(emu->slot_id);
|
||||
OUT(charges);
|
||||
OUT(cost);
|
||||
|
||||
@@ -2045,15 +2045,6 @@ namespace RoF
|
||||
outapp->WriteUInt32(emu->skills[r]);
|
||||
}
|
||||
|
||||
// deprecated
|
||||
// Write zeroes for the rest of the skills
|
||||
/*
|
||||
for(uint32 r = 0; r < structs::MAX_PP_SKILL - MAX_PP_SKILL; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->skills[r]);
|
||||
}
|
||||
*/
|
||||
|
||||
outapp->WriteUInt32(25); // Unknown count
|
||||
|
||||
for (uint32 r = 0; r < 25; r++)
|
||||
@@ -2130,18 +2121,6 @@ namespace RoF
|
||||
|
||||
outapp->WriteUInt32(structs::BUFF_COUNT);
|
||||
|
||||
//*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
||||
//*001*/ float unknown004; // Seen 1 for no buff
|
||||
//*005*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
||||
//*009*/ uint32 unknown016;
|
||||
//*013*/ uint8 bard_modifier;
|
||||
//*014*/ uint32 duration;
|
||||
//*018*/ uint8 level;
|
||||
//*019*/ uint32 spellid;
|
||||
//*023*/ uint32 counters;
|
||||
//*027*/ uint8 unknown0028[53];
|
||||
//*080*/
|
||||
|
||||
for (uint32 r = 0; r < BUFF_COUNT; r++)
|
||||
{
|
||||
float instrument_mod = 0.0f;
|
||||
@@ -3902,7 +3881,7 @@ namespace RoF
|
||||
SETUP_DIRECT_DECODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
||||
|
||||
IN(merchant_entity_id);
|
||||
emu->slot_id = RoFToServerSlot(eq->slot_id);
|
||||
emu->slot_id = RoFToServerMainInvSlot(eq->slot_id);
|
||||
IN(charges);
|
||||
IN(cost);
|
||||
|
||||
@@ -3915,7 +3894,7 @@ namespace RoF
|
||||
SETUP_DIRECT_DECODE(AltCurrencySelectItem_Struct, structs::AltCurrencySelectItem_Struct);
|
||||
|
||||
IN(merchant_entity_id);
|
||||
emu->slot_id = RoFToServerSlot(eq->slot_id);
|
||||
emu->slot_id = RoFToServerMainInvSlot(eq->slot_id);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
@@ -4878,7 +4857,8 @@ namespace RoF
|
||||
uint16 ornaIcon = 0;
|
||||
int32 heroModel = 0;
|
||||
/*
|
||||
if (inst->GetOrnamentationAug(ornamentationAugtype)) {
|
||||
if (inst->GetOrnamentationAug(ornamentationAugtype))
|
||||
{
|
||||
const Item_Struct *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
|
||||
//Mainhand
|
||||
ss.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
|
||||
@@ -5081,11 +5061,6 @@ namespace RoF
|
||||
isbs.augslots[x].unknown = item->AugSlotUnk2[x];
|
||||
}
|
||||
|
||||
// Increased to 6 max aug slots
|
||||
//isbs.augslots[5].type = 0;
|
||||
//isbs.augslots[5].visible = 1;
|
||||
//isbs.augslots[5].unknown = 0;
|
||||
|
||||
isbs.ldonpoint_type = item->PointType;
|
||||
isbs.ldontheme = item->LDoNTheme;
|
||||
isbs.ldonprice = item->LDoNPrice;
|
||||
|
||||
+46
-65
@@ -205,7 +205,7 @@ namespace RoF2
|
||||
SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
||||
|
||||
OUT(merchant_entity_id);
|
||||
eq->slot_id = ServerToRoF2Slot(emu->slot_id);
|
||||
eq->slot_id = ServerToRoF2MainInvSlot(emu->slot_id);
|
||||
OUT(charges);
|
||||
OUT(cost);
|
||||
|
||||
@@ -1696,6 +1696,8 @@ namespace RoF2
|
||||
eq->unknown932 = -1; // Set from PoK Example
|
||||
eq->unknown936 = -1; // Set from PoK Example
|
||||
eq->unknown944 = 1.0; // Set from PoK Example
|
||||
eq->unknown948 = 0; // New on Live as of Dec 15 2014
|
||||
eq->unknown952 = 100; // New on Live as of Dec 15 2014
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -2121,18 +2123,6 @@ namespace RoF2
|
||||
|
||||
outapp->WriteUInt32(structs::BUFF_COUNT);
|
||||
|
||||
//*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
||||
//*001*/ float unknown004; // Seen 1 for no buff
|
||||
//*005*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
||||
//*009*/ uint32 unknown016;
|
||||
//*013*/ uint8 bard_modifier;
|
||||
//*014*/ uint32 duration;
|
||||
//*018*/ uint8 level;
|
||||
//*019*/ uint32 spellid;
|
||||
//*023*/ uint32 counters;
|
||||
//*027*/ uint8 unknown0028[53];
|
||||
//*080*/
|
||||
|
||||
for (uint32 r = 0; r < BUFF_COUNT; r++)
|
||||
{
|
||||
float instrument_mod = 0.0f;
|
||||
@@ -2172,7 +2162,6 @@ namespace RoF2
|
||||
// 80 bytes of zeroes
|
||||
for (uint32 j = 0; j < 20; ++j)
|
||||
outapp->WriteUInt32(0);
|
||||
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(emu->platinum);
|
||||
@@ -2197,8 +2186,8 @@ namespace RoF2
|
||||
|
||||
outapp->WriteUInt32(emu->aapoints_spent);
|
||||
|
||||
outapp->WriteUInt32(5); // AA Points count ??
|
||||
outapp->WriteUInt32(1234); // AA Points assigned
|
||||
outapp->WriteUInt32(5); // AA Window Tab Count
|
||||
outapp->WriteUInt32(0); // AA Points assigned ?
|
||||
outapp->WriteUInt32(0); // AA Points in General ?
|
||||
outapp->WriteUInt32(0); // AA Points in Class ?
|
||||
outapp->WriteUInt32(0); // AA Points in Archetype ?
|
||||
@@ -2326,36 +2315,31 @@ namespace RoF2
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(emu->gm);
|
||||
outapp->WriteUInt32(emu->guild_id);
|
||||
outapp->WriteUInt8(0); // Unknown - observed 1 in a live packet.
|
||||
outapp->WriteUInt32(0); // Unknown - observed 1 in a live packet.
|
||||
outapp->WriteUInt8(0); // Unknown - observed 1 in a live packet.
|
||||
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
|
||||
outapp->WriteUInt64(emu->exp);
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt64(emu->exp); // int32 in client
|
||||
|
||||
outapp->WriteUInt8(0); // Unknown - Seen 5 on Live
|
||||
|
||||
outapp->WriteUInt32(emu->platinum_bank);
|
||||
outapp->WriteUInt32(emu->gold_bank);
|
||||
outapp->WriteUInt32(emu->silver_bank);
|
||||
outapp->WriteUInt32(emu->copper_bank);
|
||||
|
||||
// Commenting out for RoF Test
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(42); // The meaning of life ?
|
||||
|
||||
for (uint32 r = 0; r < 42; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
|
||||
outapp->WriteSInt32(-1); // Unknown
|
||||
outapp->WriteSInt32(-1); // Unknown
|
||||
|
||||
outapp->WriteUInt32(emu->career_tribute_points);
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(emu->tribute_points);
|
||||
@@ -2386,18 +2370,12 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
|
||||
/*
|
||||
|
||||
// Begin RoF2 Test
|
||||
for (uint32 r = 0; r < 1000; r++)
|
||||
|
||||
for (uint32 r = 0; r < 125; r++)
|
||||
{
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
// End RoF2 Test
|
||||
|
||||
// Block of 121 unknown bytes
|
||||
for (uint32 r = 0; r < 121; r++)
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(emu->currentRadCrystals);
|
||||
@@ -2411,7 +2389,9 @@ namespace RoF2
|
||||
// Unknown String ?
|
||||
outapp->WriteUInt32(64); // Unknown
|
||||
for (uint32 r = 0; r < 64; r++)
|
||||
{
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
}
|
||||
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
@@ -2439,22 +2419,30 @@ namespace RoF2
|
||||
// Unknown String ?
|
||||
outapp->WriteUInt32(64); // Unknown
|
||||
for (uint32 r = 0; r < 64; r++)
|
||||
{
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
}
|
||||
|
||||
// Unknown String ?
|
||||
outapp->WriteUInt32(64); // Unknown
|
||||
for (uint32 r = 0; r < 64; r++)
|
||||
{
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
|
||||
// Block of 320 unknown bytes
|
||||
for (uint32 r = 0; r < 320; r++)
|
||||
{
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
}
|
||||
|
||||
// Block of 343 unknown bytes
|
||||
for (uint32 r = 0; r < 343; r++)
|
||||
{
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
|
||||
@@ -2479,10 +2467,14 @@ namespace RoF2
|
||||
outapp->WriteUInt32(64); // Group of 64 int32s follow Group/Raid Leadership abilities ?
|
||||
|
||||
for (uint32 r = 0; r < MAX_LEADERSHIP_AA_ARRAY; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->leader_abilities.ranks[r]);
|
||||
}
|
||||
|
||||
for (uint32 r = 0; r < 64 - MAX_LEADERSHIP_AA_ARRAY; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0); // Unused/unsupported Leadership abilities
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(emu->air_remaining); // ?
|
||||
|
||||
@@ -2535,33 +2527,31 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
|
||||
*/
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Krono - itemid 88888 Hard coded in client?
|
||||
|
||||
outapp->WriteUInt8(emu->groupAutoconsent);
|
||||
outapp->WriteUInt8(emu->raidAutoconsent);
|
||||
outapp->WriteUInt8(emu->guildAutoconsent);
|
||||
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(emu->level); // Level3 ?
|
||||
outapp->WriteUInt32(emu->level); // Level3 ?
|
||||
|
||||
outapp->WriteUInt8(emu->showhelm);
|
||||
|
||||
outapp->WriteUInt32(emu->RestTimer);
|
||||
|
||||
outapp->WriteUInt32(1024); // Unknown Count
|
||||
|
||||
// Block of 1024 unknown bytes
|
||||
outapp->WriteUInt8(31); // Unknown
|
||||
|
||||
for (uint32 r = 0; r < 1023; r++)
|
||||
for (uint32 r = 0; r < 1024; r++)
|
||||
{
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
|
||||
// Think we need 1 byte of padding at the end
|
||||
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
_log(NET__STRUCTS, "Player Profile Packet is %i bytes", outapp->GetWritePosition());
|
||||
@@ -3887,6 +3877,7 @@ namespace RoF2
|
||||
}
|
||||
|
||||
// DECODE methods
|
||||
|
||||
DECODE(OP_AdventureMerchantSell)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::Adventure_Sell_Struct);
|
||||
@@ -3906,7 +3897,7 @@ namespace RoF2
|
||||
SETUP_DIRECT_DECODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
|
||||
|
||||
IN(merchant_entity_id);
|
||||
emu->slot_id = RoF2ToServerSlot(eq->slot_id);
|
||||
emu->slot_id = RoF2ToServerMainInvSlot(eq->slot_id);
|
||||
IN(charges);
|
||||
IN(cost);
|
||||
|
||||
@@ -3919,7 +3910,7 @@ namespace RoF2
|
||||
SETUP_DIRECT_DECODE(AltCurrencySelectItem_Struct, structs::AltCurrencySelectItem_Struct);
|
||||
|
||||
IN(merchant_entity_id);
|
||||
emu->slot_id = RoF2ToServerSlot(eq->slot_id);
|
||||
emu->slot_id = RoF2ToServerMainInvSlot(eq->slot_id);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
@@ -4860,8 +4851,8 @@ namespace RoF2
|
||||
hdr.charges = (stackable ? (item->MaxCharges ? 1 : 0) : charges);
|
||||
hdr.inst_nodrop = inst->IsAttuned() ? 1 : 0;
|
||||
hdr.unknown044 = 0;
|
||||
hdr.unknown048 = 7300 + Inventory::CalcMaterialFromSlot(slot_id_in); //0;
|
||||
hdr.unknown052 = 7300 + Inventory::CalcMaterialFromSlot(slot_id_in); //0;
|
||||
hdr.unknown048 = 0;
|
||||
hdr.unknown052 = 0;
|
||||
hdr.isEvolving = item->EvolvingLevel > 0 ? 1 : 0;
|
||||
ss.write((const char*)&hdr, sizeof(RoF2::structs::ItemSerializationHeader));
|
||||
|
||||
@@ -5085,11 +5076,6 @@ namespace RoF2
|
||||
isbs.augslots[x].unknown = item->AugSlotUnk2[x];
|
||||
}
|
||||
|
||||
// Increased to 6 max aug slots
|
||||
//isbs.augslots[5].type = 0;
|
||||
//isbs.augslots[5].visible = 1;
|
||||
//isbs.augslots[5].unknown = 0;
|
||||
|
||||
isbs.ldonpoint_type = item->PointType;
|
||||
isbs.ldontheme = item->LDoNTheme;
|
||||
isbs.ldonprice = item->LDoNPrice;
|
||||
@@ -5325,13 +5311,8 @@ namespace RoF2
|
||||
iqbs.SpellDmg = item->SpellDmg;
|
||||
iqbs.clairvoyance = item->Clairvoyance;
|
||||
iqbs.unknown28 = 0;
|
||||
|
||||
|
||||
// Begin RoF2 Test
|
||||
iqbs.unknown_TEST1 = 0;
|
||||
// End RoF2 Test
|
||||
|
||||
iqbs.unknown30 = 0;
|
||||
iqbs.unknown37a = 0;
|
||||
iqbs.unknown39 = 1;
|
||||
|
||||
iqbs.subitem_count = 0;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
// incoming packets that require a DECODE translation:
|
||||
// Begin RoF2 Decodes
|
||||
|
||||
|
||||
// End RoF2 Encodes/Decodes
|
||||
|
||||
// These require Encodes/Decodes for RoF, so they do for RoF2 as well
|
||||
|
||||
+112
-113
@@ -520,72 +520,73 @@ struct ServerZoneEntry_Struct //Adjusted from SEQ Everquest.h Struct
|
||||
|
||||
//New Zone Struct - Size: 948
|
||||
struct NewZone_Struct {
|
||||
/*0000*/ char char_name[64]; // Character Name
|
||||
/*0064*/ char zone_short_name[32]; // Zone Short Name
|
||||
/*0096*/ char unknown0096[96];
|
||||
/*0192*/ char zone_long_name[278]; // Zone Long Name
|
||||
/*0470*/ uint8 ztype; // Zone type (usually FF)
|
||||
/*0471*/ uint8 fog_red[4]; // Zone fog (red)
|
||||
/*0475*/ uint8 fog_green[4]; // Zone fog (green)
|
||||
/*0479*/ uint8 fog_blue[4]; // Zone fog (blue)
|
||||
/*0483*/ uint8 unknown323;
|
||||
/*0484*/ float fog_minclip[4];
|
||||
/*0500*/ float fog_maxclip[4];
|
||||
/*0516*/ float gravity;
|
||||
/*0520*/ uint8 time_type;
|
||||
/*0521*/ uint8 rain_chance[4];
|
||||
/*0525*/ uint8 rain_duration[4];
|
||||
/*0529*/ uint8 snow_chance[4];
|
||||
/*0533*/ uint8 snow_duration[4];
|
||||
/*0537*/ uint8 unknown537[33];
|
||||
/*0570*/ uint8 sky; // Sky Type
|
||||
/*0571*/ uint8 unknown571[13]; // ***Placeholder
|
||||
/*0584*/ float zone_exp_multiplier; // Experience Multiplier
|
||||
/*0588*/ float safe_y; // Zone Safe Y
|
||||
/*0592*/ float safe_x; // Zone Safe X
|
||||
/*0596*/ float safe_z; // Zone Safe Z
|
||||
/*0600*/ float min_z; // Guessed - NEW - Seen 0
|
||||
/*0604*/ float max_z; // Guessed
|
||||
/*0608*/ float underworld; // Underworld, min z (Not Sure?)
|
||||
/*0612*/ float minclip; // Minimum View Distance
|
||||
/*0616*/ float maxclip; // Maximum View DIstance
|
||||
/*0620*/ uint8 unknown620[84]; // ***Placeholder
|
||||
/*0704*/ char zone_short_name2[96]; //zone file name? excludes instance number which can be in previous version.
|
||||
/*0800*/ int32 unknown800; //seen -1
|
||||
/*0804*/ char unknown804[40]; //
|
||||
/*0844*/ int32 unknown844; //seen 600
|
||||
/*0848*/ int32 unknown848;
|
||||
/*0852*/ uint16 zone_id;
|
||||
/*0854*/ uint16 zone_instance;
|
||||
/*0856*/ char unknown856[20];
|
||||
/*0876*/ uint32 SuspendBuffs;
|
||||
/*0880*/ uint32 unknown880; // Seen 50
|
||||
/*0884*/ uint32 unknown884; // Seen 10
|
||||
/*0888*/ uint8 unknown888; // Seen 1
|
||||
/*0889*/ uint8 unknown889; // Seen 0 (POK) or 1 (rujj)
|
||||
/*0890*/ uint8 unknown890; // Seen 1
|
||||
/*0891*/ uint8 unknown891; // Seen 0
|
||||
/*0892*/ uint8 unknown892; // Seen 0
|
||||
/*0893*/ uint8 unknown893; // Seen 0 - 00
|
||||
/*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
/*0895*/ uint8 unknown895; // Seen 0 - 00
|
||||
/*0896*/ uint32 unknown896; // Seen 180
|
||||
/*0900*/ uint32 unknown900; // Seen 180
|
||||
/*0904*/ uint32 unknown904; // Seen 180
|
||||
/*0908*/ uint32 unknown908; // Seen 2
|
||||
/*0912*/ uint32 unknown912; // Seen 2
|
||||
/*0916*/ float FogDensity; // Most zones have this set to 0.33 Blightfire had 0.16
|
||||
/*0920*/ uint32 unknown920; // Seen 0
|
||||
/*0924*/ uint32 unknown924; // Seen 0
|
||||
/*0928*/ uint32 unknown928; // Seen 0
|
||||
/*0932*/ int32 unknown932; // Seen -1
|
||||
/*0936*/ int32 unknown936; // Seen -1
|
||||
/*0940*/ uint32 unknown940; // Seen 0
|
||||
/*0944*/ float unknown944; // Seen 1.0
|
||||
/*0948*/
|
||||
/*0000*/ char char_name[64]; // Character Name
|
||||
/*0064*/ char zone_short_name[32]; // Zone Short Name
|
||||
/*0096*/ char unknown0096[96];
|
||||
/*0192*/ char zone_long_name[278]; // Zone Long Name
|
||||
/*0470*/ uint8 ztype; // Zone type (usually FF)
|
||||
/*0471*/ uint8 fog_red[4]; // Zone fog (red)
|
||||
/*0475*/ uint8 fog_green[4]; // Zone fog (green)
|
||||
/*0479*/ uint8 fog_blue[4]; // Zone fog (blue)
|
||||
/*0483*/ uint8 unknown323;
|
||||
/*0484*/ float fog_minclip[4];
|
||||
/*0500*/ float fog_maxclip[4];
|
||||
/*0516*/ float gravity;
|
||||
/*0520*/ uint8 time_type;
|
||||
/*0521*/ uint8 rain_chance[4];
|
||||
/*0525*/ uint8 rain_duration[4];
|
||||
/*0529*/ uint8 snow_chance[4];
|
||||
/*0533*/ uint8 snow_duration[4];
|
||||
/*0537*/ uint8 unknown537[33];
|
||||
/*0570*/ uint8 sky; // Sky Type
|
||||
/*0571*/ uint8 unknown571[13]; // ***Placeholder
|
||||
/*0584*/ float zone_exp_multiplier; // Experience Multiplier
|
||||
/*0588*/ float safe_y; // Zone Safe Y
|
||||
/*0592*/ float safe_x; // Zone Safe X
|
||||
/*0596*/ float safe_z; // Zone Safe Z
|
||||
/*0600*/ float min_z; // Guessed - NEW - Seen 0
|
||||
/*0604*/ float max_z; // Guessed
|
||||
/*0608*/ float underworld; // Underworld, min z (Not Sure?)
|
||||
/*0612*/ float minclip; // Minimum View Distance
|
||||
/*0616*/ float maxclip; // Maximum View DIstance
|
||||
/*0620*/ uint8 unknown620[84]; // ***Placeholder
|
||||
/*0704*/ char zone_short_name2[96]; //zone file name? excludes instance number which can be in previous version.
|
||||
/*0800*/ int32 unknown800; //seen -1
|
||||
/*0804*/ char unknown804[40]; //
|
||||
/*0844*/ int32 unknown844; //seen 600
|
||||
/*0848*/ int32 unknown848;
|
||||
/*0852*/ uint16 zone_id;
|
||||
/*0854*/ uint16 zone_instance;
|
||||
/*0856*/ char unknown856[20];
|
||||
/*0876*/ uint32 SuspendBuffs;
|
||||
/*0880*/ uint32 unknown880; // Seen 50
|
||||
/*0884*/ uint32 unknown884; // Seen 10
|
||||
/*0888*/ uint8 unknown888; // Seen 1
|
||||
/*0889*/ uint8 unknown889; // Seen 0 (POK) or 1 (rujj)
|
||||
/*0890*/ uint8 unknown890; // Seen 1
|
||||
/*0891*/ uint8 unknown891; // Seen 0
|
||||
/*0892*/ uint8 unknown892; // Seen 0
|
||||
/*0893*/ uint8 unknown893; // Seen 0 - 00
|
||||
/*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off
|
||||
/*0895*/ uint8 unknown895; // Seen 0 - 00
|
||||
/*0896*/ uint32 unknown896; // Seen 180
|
||||
/*0900*/ uint32 unknown900; // Seen 180
|
||||
/*0904*/ uint32 unknown904; // Seen 180
|
||||
/*0908*/ uint32 unknown908; // Seen 2
|
||||
/*0912*/ uint32 unknown912; // Seen 2
|
||||
/*0916*/ float FogDensity; // Most zones have this set to 0.33 Blightfire had 0.16
|
||||
/*0920*/ uint32 unknown920; // Seen 0
|
||||
/*0924*/ uint32 unknown924; // Seen 0
|
||||
/*0928*/ uint32 unknown928; // Seen 0
|
||||
/*0932*/ int32 unknown932; // Seen -1
|
||||
/*0936*/ int32 unknown936; // Seen -1
|
||||
/*0940*/ uint32 unknown940; // Seen 0
|
||||
/*0944*/ float unknown944; // Seen 1.0
|
||||
/*0948*/ uint32 unknown948; // Seen 0 - New on Live as of Dec 15 2014
|
||||
/*0952*/ uint32 unknown952; // Seen 100 - New on Live as of Dec 15 2014
|
||||
/*0956*/
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
** Memorize Spell Struct
|
||||
** Length: 16 Bytes
|
||||
@@ -1598,23 +1599,24 @@ struct RespawnWindow_Struct {
|
||||
*/
|
||||
struct PlayerPositionUpdateServer_Struct
|
||||
{
|
||||
uint16 spawn_id;
|
||||
uint16 spawnId2;
|
||||
signed padding0004:12;
|
||||
signed y_pos:19; // y coord
|
||||
unsigned padding:1;
|
||||
signed delta_z:13; // change in z
|
||||
signed delta_x:13; // change in x
|
||||
signed padding0008:6;
|
||||
signed x_pos:19; // x coord
|
||||
unsigned heading:12; // heading
|
||||
signed padding0016:1;
|
||||
signed delta_heading:10; // change in heading
|
||||
signed z_pos:19; // z coord
|
||||
signed padding0020:3;
|
||||
signed animation:10; // animation
|
||||
signed delta_y:13; // change in y
|
||||
signed padding0024:9;
|
||||
/*0000*/ uint16 spawn_id;
|
||||
/*0002*/ uint16 spawnId2;
|
||||
/*0004*/ signed padding0004 : 12;
|
||||
signed y_pos : 19; // y coord
|
||||
unsigned padding : 1;
|
||||
/*0008*/ signed delta_z : 13; // change in z
|
||||
signed delta_x : 13; // change in x
|
||||
signed padding0008 : 6;
|
||||
/*0012*/ signed x_pos : 19; // x coord
|
||||
unsigned heading : 12; // heading
|
||||
signed padding0016 : 1;
|
||||
/*0016*/ signed delta_heading : 10; // change in heading
|
||||
signed z_pos : 19; // z coord
|
||||
signed padding0020 : 3;
|
||||
/*0020*/ signed animation : 10; // animation
|
||||
signed delta_y : 13; // change in y
|
||||
signed padding0024 : 9;
|
||||
/*0024*/
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1625,21 +1627,22 @@ struct PlayerPositionUpdateServer_Struct
|
||||
*/
|
||||
struct PlayerPositionUpdateClient_Struct
|
||||
{
|
||||
uint16 sequence; // increments one each packet - Verified
|
||||
uint16 spawn_id; // Player's spawn id
|
||||
uint8 unknown0004[6]; // ***Placeholder
|
||||
float delta_x; // Change in x
|
||||
unsigned heading:12; // Directional heading
|
||||
unsigned padding0040:20; // ***Placeholder
|
||||
float x_pos; // x coord (2nd loc value)
|
||||
float delta_z; // Change in z
|
||||
float z_pos; // z coord (3rd loc value)
|
||||
float y_pos; // y coord (1st loc value)
|
||||
unsigned animation:10; // ***Placeholder
|
||||
unsigned padding0024:22; // animation
|
||||
float delta_y; // Change in y
|
||||
signed delta_heading:10; // change in heading
|
||||
unsigned padding0041:22; // ***Placeholder
|
||||
/*0000*/ uint16 sequence; // increments one each packet - Verified
|
||||
/*0002*/ uint16 spawn_id; // Player's spawn id
|
||||
/*0004*/ uint8 unknown0004[6]; // ***Placeholder
|
||||
/*0010*/ float delta_x; // Change in x
|
||||
/*0014*/ unsigned heading : 12; // Directional heading
|
||||
unsigned padding0040 : 20; // ***Placeholder
|
||||
/*0018*/ float x_pos; // x coord (2nd loc value)
|
||||
/*0022*/ float delta_z; // Change in z
|
||||
/*0026*/ float z_pos; // z coord (3rd loc value)
|
||||
/*0030*/ float y_pos; // y coord (1st loc value)
|
||||
/*0034*/ unsigned animation : 10; // ***Placeholder
|
||||
unsigned padding0024 : 22; // animation
|
||||
/*0038*/ float delta_y; // Change in y
|
||||
/*0042*/ signed delta_heading : 10; // change in heading
|
||||
unsigned padding0041 : 22; // ***Placeholder
|
||||
/*0046*/
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -2177,8 +2180,8 @@ struct AltCurrencyUpdate_Struct {
|
||||
//When an item is selected while the alt currency merchant window is open
|
||||
struct AltCurrencySelectItem_Struct {
|
||||
/*000*/ uint32 merchant_entity_id;
|
||||
/*004*/ MainInvItemSlotStruct slot_id;
|
||||
/*004*/ //uint32 slot_id;
|
||||
ItemSlotStruct slot_id;
|
||||
/*008*/ uint32 unknown008;
|
||||
/*012*/ uint32 unknown012;
|
||||
/*016*/ uint32 unknown016;
|
||||
@@ -2235,10 +2238,10 @@ struct AltCurrencyReclaim_Struct {
|
||||
|
||||
struct AltCurrencySellItem_Struct {
|
||||
/*000*/ uint32 merchant_entity_id;
|
||||
/*004*/ MainInvItemSlotStruct slot_id;
|
||||
/*004*/ //uint32 slot_id;
|
||||
ItemSlotStruct slot_id;
|
||||
/*008*/ uint32 charges;
|
||||
/*012*/ uint32 cost;
|
||||
/*016*/ uint32 charges;
|
||||
/*020*/ uint32 cost;
|
||||
};
|
||||
|
||||
struct Adventure_Purchase_Struct {
|
||||
@@ -2258,14 +2261,14 @@ struct Adventure_Sell_Struct {
|
||||
};
|
||||
|
||||
struct AdventurePoints_Update_Struct {
|
||||
/*000*/ uint32 ldon_available_points; // Total available points
|
||||
/*004*/ uint8 unkown_apu004[20];
|
||||
/*024*/ uint32 ldon_guk_points; // Earned Deepest Guk points
|
||||
/*028*/ uint32 ldon_mirugal_points; // Earned Mirugal' Mebagerie points
|
||||
/*032*/ uint32 ldon_mistmoore_points; // Earned Mismoore Catacombs Points
|
||||
/*036*/ uint32 ldon_rujarkian_points; // Earned Rujarkian Hills points
|
||||
/*040*/ uint32 ldon_takish_points; // Earned Takish points
|
||||
/*044*/ uint8 unknown_apu042[216];
|
||||
/*000*/ uint32 ldon_available_points; // Total available points
|
||||
/*004*/ uint8 unkown_apu004[20];
|
||||
/*024*/ uint32 ldon_guk_points; // Earned Deepest Guk points
|
||||
/*028*/ uint32 ldon_mirugal_points; // Earned Mirugal' Mebagerie points
|
||||
/*032*/ uint32 ldon_mistmoore_points; // Earned Mismoore Catacombs Points
|
||||
/*036*/ uint32 ldon_rujarkian_points; // Earned Rujarkian Hills points
|
||||
/*040*/ uint32 ldon_takish_points; // Earned Takish points
|
||||
/*044*/ uint8 unknown_apu042[216];
|
||||
};
|
||||
|
||||
|
||||
@@ -4687,11 +4690,7 @@ struct ItemQuaternaryBodyStruct
|
||||
uint32 unknown37;
|
||||
uint32 unknown_RoF27;
|
||||
uint32 unknown_RoF28;
|
||||
|
||||
// Begin RoF2 Test
|
||||
uint8 unknown_TEST1;
|
||||
// End RoF2 Test
|
||||
|
||||
uint8 unknown37a; // (guessed position) New to RoF2
|
||||
uint8 unknown38; // 0
|
||||
uint8 unknown39; // 1
|
||||
uint32 subitem_count;
|
||||
|
||||
@@ -2174,8 +2174,7 @@ struct AltCurrencyUpdate_Struct {
|
||||
//When an item is selected while the alt currency merchant window is open
|
||||
struct AltCurrencySelectItem_Struct {
|
||||
/*000*/ uint32 merchant_entity_id;
|
||||
/*004*/ //uint32 slot_id;
|
||||
ItemSlotStruct slot_id;
|
||||
/*004*/ MainInvItemSlotStruct slot_id;
|
||||
/*008*/ uint32 unknown008;
|
||||
/*012*/ uint32 unknown012;
|
||||
/*016*/ uint32 unknown016;
|
||||
@@ -2232,8 +2231,7 @@ struct AltCurrencyReclaim_Struct {
|
||||
|
||||
struct AltCurrencySellItem_Struct {
|
||||
/*000*/ uint32 merchant_entity_id;
|
||||
/*004*/ //uint32 slot_id;
|
||||
ItemSlotStruct slot_id;
|
||||
/*004*/ MainInvItemSlotStruct slot_id;
|
||||
/*008*/ uint32 charges;
|
||||
/*012*/ uint32 cost;
|
||||
};
|
||||
|
||||
@@ -4365,8 +4365,8 @@ struct AltCurrencySelectItem_Struct {
|
||||
struct AltCurrencySellItem_Struct {
|
||||
/*000*/ uint32 merchant_entity_id;
|
||||
/*004*/ uint32 slot_id;
|
||||
/*006*/ uint32 charges;
|
||||
/*010*/ uint32 cost;
|
||||
/*008*/ uint32 charges;
|
||||
/*012*/ uint32 cost;
|
||||
};
|
||||
|
||||
struct AltCurrencyPopulateEntry_Struct
|
||||
|
||||
@@ -1234,6 +1234,9 @@ ItemInst* SharedDatabase::CreateBaseItem(const Item_Struct* item, int16 charges)
|
||||
// set it to 1 charge so that it is usable on creation
|
||||
if (charges == 0 && item->MaxCharges == -1)
|
||||
charges = 1;
|
||||
// Stackable items need a minimum charge of 1 to remain moveable.
|
||||
if(charges <= 0 && item->Stackable)
|
||||
charges = 1;
|
||||
|
||||
inst = new ItemInst(item, charges);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user