mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-27 16:32:27 +00:00
Validated up to OP_WorldObjectsSent
This commit is contained in:
parent
767f04731b
commit
f29d87aced
@ -23,6 +23,7 @@
|
|||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
#include "world/sof_char_create_data.h"
|
#include "world/sof_char_create_data.h"
|
||||||
|
|
||||||
@ -217,19 +218,22 @@ namespace TOB
|
|||||||
|
|
||||||
ENCODE(OP_BlockedBuffs)
|
ENCODE(OP_BlockedBuffs)
|
||||||
{
|
{
|
||||||
ENCODE_LENGTH_EXACT(BlockedBuffs_Struct);
|
// Blocked buffs are a major change. They are stored in a resizable array in TOB, so this sends size, then
|
||||||
SETUP_DIRECT_ENCODE(BlockedBuffs_Struct, structs::BlockedBuffs_Struct);
|
// spells, then the final two bools -- see 0x140202750
|
||||||
|
SETUP_VAR_ENCODE(BlockedBuffs_Struct);
|
||||||
|
|
||||||
for (uint32 i = 0; i < BLOCKED_BUFF_COUNT; ++i)
|
// size is uint32 + count * int32 + uint8 + uint8
|
||||||
eq->SpellID[i] = emu->SpellID[i];
|
uint32 sz = 6 + emu->Count * 4;
|
||||||
|
__packet->size = sz;
|
||||||
|
__packet->pBuffer = new unsigned char[sz];
|
||||||
|
memset(__packet->pBuffer, 0, sz);
|
||||||
|
|
||||||
for (uint32 i = BLOCKED_BUFF_COUNT; i < structs::BLOCKED_BUFF_COUNT; ++i)
|
__packet->WriteUInt32(emu->Count);
|
||||||
eq->SpellID[i] = -1;
|
for (int i = 0; i < emu->Count; i++)
|
||||||
|
__packet->WriteSInt32(emu->SpellID[i]);
|
||||||
|
|
||||||
OUT(Count);
|
__packet->WriteUInt8(emu->Pet);
|
||||||
OUT(Pet);
|
__packet->WriteUInt8(emu->Initialise);
|
||||||
OUT(Initialise);
|
|
||||||
OUT(Flags);
|
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@ -981,6 +985,7 @@ namespace TOB
|
|||||||
ENCODE(OP_NewSpawn) { ENCODE_FORWARD(OP_ZoneSpawns); }
|
ENCODE(OP_NewSpawn) { ENCODE_FORWARD(OP_ZoneSpawns); }
|
||||||
|
|
||||||
ENCODE(OP_NewZone) {
|
ENCODE(OP_NewZone) {
|
||||||
|
// zoneHeader
|
||||||
EQApplicationPacket* in = *p;
|
EQApplicationPacket* in = *p;
|
||||||
*p = nullptr;
|
*p = nullptr;
|
||||||
|
|
||||||
@ -2903,7 +2908,7 @@ namespace TOB
|
|||||||
|
|
||||||
buf.WriteString(new_message);
|
buf.WriteString(new_message);
|
||||||
|
|
||||||
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
|
auto outapp = new EQApplicationPacket(OP_SpecialMesg, std::move(buf));
|
||||||
|
|
||||||
dest->FastQueuePacket(&outapp, ack_req);
|
dest->FastQueuePacket(&outapp, ack_req);
|
||||||
delete in;
|
delete in;
|
||||||
@ -2934,14 +2939,14 @@ namespace TOB
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto outapp = new EQApplicationPacket(OP_ChangeSize, sizeof(ChangeSize_Struct));
|
auto outapp = new EQApplicationPacket(OP_ChangeSize, sizeof(structs::ChangeSize_Struct));
|
||||||
|
|
||||||
ChangeSize_Struct* css = (ChangeSize_Struct*)outapp->pBuffer;
|
structs::ChangeSize_Struct* css = (structs::ChangeSize_Struct*)outapp->pBuffer;
|
||||||
|
|
||||||
css->EntityID = sas->spawn_id;
|
css->EntityID = sas->spawn_id;
|
||||||
css->Size = (float)sas->parameter;
|
css->Size = (float)sas->parameter;
|
||||||
css->Unknown08 = 0;
|
css->CameraOffset = 0;
|
||||||
css->Unknown12 = 1.0f;
|
css->AnimationSpeedRelated = 1.0f;
|
||||||
|
|
||||||
dest->FastQueuePacket(&outapp, ack_req);
|
dest->FastQueuePacket(&outapp, ack_req);
|
||||||
delete in;
|
delete in;
|
||||||
@ -3574,18 +3579,28 @@ namespace TOB
|
|||||||
|
|
||||||
DECODE(OP_BlockedBuffs)
|
DECODE(OP_BlockedBuffs)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::BlockedBuffs_Struct);
|
uint32 count = __packet->ReadUInt32();
|
||||||
SETUP_DIRECT_DECODE(BlockedBuffs_Struct, structs::BlockedBuffs_Struct);
|
std::vector<int32> blocked_spell_ids;
|
||||||
|
blocked_spell_ids.reserve(count);
|
||||||
|
for (int i = 0; i < count; ++i)
|
||||||
|
blocked_spell_ids.push_back(static_cast<int32>(__packet->ReadUInt32()));
|
||||||
|
|
||||||
for (uint32 i = 0; i < BLOCKED_BUFF_COUNT; ++i)
|
bool pet = __packet->ReadUInt8() == 1;
|
||||||
emu->SpellID[i] = eq->SpellID[i];
|
bool init = __packet->ReadUInt8() == 1;
|
||||||
|
|
||||||
IN(Count);
|
__packet->SetReadPosition(0); // reset the packet read to pass it along
|
||||||
IN(Pet);
|
|
||||||
IN(Initialise);
|
|
||||||
IN(Flags);
|
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
__packet->size = sizeof(BlockedBuffs_Struct);
|
||||||
|
__packet->pBuffer = new unsigned char[__packet->size]{};
|
||||||
|
BlockedBuffs_Struct* emu = (BlockedBuffs_Struct*)__packet->pBuffer;
|
||||||
|
|
||||||
|
memset(emu->SpellID, -1, sizeof(emu->SpellID));
|
||||||
|
for (int i = 0; i < count; ++i)
|
||||||
|
emu->SpellID[i] = blocked_spell_ids[i];
|
||||||
|
|
||||||
|
emu->Count = count;
|
||||||
|
emu->Pet = pet;
|
||||||
|
emu->Initialise = init;
|
||||||
}
|
}
|
||||||
|
|
||||||
DECODE(OP_CastSpell)
|
DECODE(OP_CastSpell)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ namespace TOB {
|
|||||||
static const uint32 MAX_PP_UNKNOWN_ABILITIES = 25;
|
static const uint32 MAX_PP_UNKNOWN_ABILITIES = 25;
|
||||||
static const uint32 MAX_RECAST_TYPES = 25;
|
static const uint32 MAX_RECAST_TYPES = 25;
|
||||||
static const uint32 MAX_ITEM_RECAST_TYPES = 100;
|
static const uint32 MAX_ITEM_RECAST_TYPES = 100;
|
||||||
static const uint32 BLOCKED_BUFF_COUNT = 40;
|
static const uint32 BLOCKED_BUFF_COUNT = 60; // this might not be needed?
|
||||||
static const uint32 BUFF_COUNT = 62;
|
static const uint32 BUFF_COUNT = 62;
|
||||||
static const uint32 MAX_PP_LANGUAGE = 32;
|
static const uint32 MAX_PP_LANGUAGE = 32;
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
@ -274,7 +274,6 @@ namespace TOB {
|
|||||||
Unknown39,
|
Unknown39,
|
||||||
Unknown40,
|
Unknown40,
|
||||||
Unknown41,
|
Unknown41,
|
||||||
Unknown42,
|
|
||||||
Birthdate,
|
Birthdate,
|
||||||
EncounterLock
|
EncounterLock
|
||||||
};
|
};
|
||||||
@ -288,6 +287,15 @@ namespace TOB {
|
|||||||
/*0024*/
|
/*0024*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ChangeSize_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 EntityID;
|
||||||
|
/*04*/ float Size;
|
||||||
|
/*08*/ float CameraOffset;
|
||||||
|
/*12*/ float AnimationSpeedRelated;
|
||||||
|
/*16*/
|
||||||
|
};
|
||||||
|
|
||||||
struct Spawn_Struct_Bitfields
|
struct Spawn_Struct_Bitfields
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
@ -400,14 +408,14 @@ namespace TOB {
|
|||||||
/*056*/ float X;
|
/*056*/ float X;
|
||||||
/*060*/ float Z;
|
/*060*/ float Z;
|
||||||
/*064*/ float Heading;
|
/*064*/ float Heading;
|
||||||
/*068*/ float DoorAngle; //not sure if this is actually a float; it might be a uint32 like DefaultDoorAngle
|
/*068*/ float DoorAngle;
|
||||||
/*072*/ uint32 ScaleFactor; //rof2's size
|
/*072*/ uint32 ScaleFactor; //rof2's size
|
||||||
/*076*/ uint32 Unknown76; //client doesn't seem to read this
|
/*076*/ uint32 Unknown76; //client doesn't seem to read this
|
||||||
/*080*/ uint8 Id; //doorid
|
/*080*/ uint8 Id; //doorid
|
||||||
/*081*/ uint8 Type; //opentype
|
/*081*/ uint8 Type; //opentype
|
||||||
/*082*/ uint8 State; //state_at_spawn
|
/*082*/ uint8 State; //state_at_spawn
|
||||||
/*083*/ uint8 DefaultState; //invert_state
|
/*083*/ uint8 DefaultState; //invert_state
|
||||||
/*084*/ int32 Param; //door_param
|
/*084*/ int32 Param; //door_param (spell id?)
|
||||||
/*088*/ uint32 AdventureDoorId;
|
/*088*/ uint32 AdventureDoorId;
|
||||||
/*092*/ uint32 DynDoorID;
|
/*092*/ uint32 DynDoorID;
|
||||||
/*096*/ uint32 RealEstateDoorID;
|
/*096*/ uint32 RealEstateDoorID;
|
||||||
@ -549,15 +557,6 @@ namespace TOB {
|
|||||||
/*024*/
|
/*024*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ChangeSize_Struct
|
|
||||||
{
|
|
||||||
/*00*/ uint32 EntityID;
|
|
||||||
/*04*/ float Size;
|
|
||||||
/*08*/ uint32 Unknown08; // Observed 0
|
|
||||||
/*12*/ float Unknown12; // Observed 1.0f
|
|
||||||
/*16*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SpawnHPUpdate_Struct
|
struct SpawnHPUpdate_Struct
|
||||||
{
|
{
|
||||||
/*00*/ int16 spawn_id;
|
/*00*/ int16 spawn_id;
|
||||||
@ -837,15 +836,6 @@ namespace TOB {
|
|||||||
/*009*/ uint8 unknown009[3];
|
/*009*/ uint8 unknown009[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BlockedBuffs_Struct
|
|
||||||
{
|
|
||||||
/*000*/ int32 SpellID[BLOCKED_BUFF_COUNT];
|
|
||||||
/*120*/ uint32 Count;
|
|
||||||
/*124*/ uint8 Pet;
|
|
||||||
/*125*/ uint8 Initialise;
|
|
||||||
/*126*/ uint16 Flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ZonePlayerToBind_Struct {
|
struct ZonePlayerToBind_Struct {
|
||||||
//Same structure as the binds in PlayerProfile_Struct
|
//Same structure as the binds in PlayerProfile_Struct
|
||||||
//Assembly calls the same function
|
//Assembly calls the same function
|
||||||
|
|||||||
@ -349,7 +349,7 @@ RULE_STRING(World, MOTD, "", "Server MOTD sent on login, change from empty to ha
|
|||||||
RULE_STRING(World, Rules, "", "Server Rules, change from empty to have this be used instead of variables table 'rules' value, lines are pipe (|) separated, example: A|B|C")
|
RULE_STRING(World, Rules, "", "Server Rules, change from empty to have this be used instead of variables table 'rules' value, lines are pipe (|) separated, example: A|B|C")
|
||||||
RULE_BOOL(World, EnableAutoLogin, false, "Enables or disables auto login of characters, allowing people to log characters in directly from loginserver to ingame")
|
RULE_BOOL(World, EnableAutoLogin, false, "Enables or disables auto login of characters, allowing people to log characters in directly from loginserver to ingame")
|
||||||
RULE_BOOL(World, EnablePVPRegions, true, "Enables or disables PVP Regions automatically setting your PVP flag")
|
RULE_BOOL(World, EnablePVPRegions, true, "Enables or disables PVP Regions automatically setting your PVP flag")
|
||||||
RULE_STRING(World, SupportedClients, "RoF2", "Comma-delimited list of clients to restrict to. Supported values are Titanium | SoF | SoD | UF | RoF | RoF2. Example: Titanium,RoF2")
|
RULE_STRING(World, SupportedClients, "RoF2,TOB", "Comma-delimited list of clients to restrict to. Supported values are Titanium | SoF | SoD | UF | RoF | RoF2 | TOB. Example: Titanium,RoF2,TOB")
|
||||||
RULE_STRING(World, CustomFilesKey, "", "Enable if the server requires custom files and sends a key to validate. Empty string to disable. Example: eqcustom_v1")
|
RULE_STRING(World, CustomFilesKey, "", "Enable if the server requires custom files and sends a key to validate. Empty string to disable. Example: eqcustom_v1")
|
||||||
RULE_STRING(World, CustomFilesUrl, "github.com/knervous/eqnexus/releases", "URL to display at character select if client is missing custom files")
|
RULE_STRING(World, CustomFilesUrl, "github.com/knervous/eqnexus/releases", "URL to display at character select if client is missing custom files")
|
||||||
RULE_INT(World, CustomFilesAdminLevel, 20, "Admin level at which custom file key is not required when CustomFilesKey is specified")
|
RULE_INT(World, CustomFilesAdminLevel, 20, "Admin level at which custom file key is not required when CustomFilesKey is specified")
|
||||||
|
|||||||
1256
tob/opcodes.md
1256
tob/opcodes.md
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user