mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-25 18:21:28 +00:00
-Added several opcodes; not all confirmed working yet.
-Partial support for item packet (several of the types have been shuffled so this will take a while to get working).
This commit is contained in:
parent
2c48ec39ef
commit
c4a7fcc063
@ -71,6 +71,8 @@ namespace Laurion
|
||||
static inline uint32 LaurionToServerCorpseMainSlot(uint32 laurion_corpse_slot);
|
||||
static inline uint32 LaurionToServerTypelessSlot(structs::TypelessInventorySlot_Struct laurion_slot, int16 laurion_type);
|
||||
|
||||
structs::ItemPacketType ServerToLaurionItemPacketType(ItemPacketType laurion_type);
|
||||
|
||||
void Register(EQStreamIdentifier& into)
|
||||
{
|
||||
//create our opcode manager if we havent already
|
||||
@ -2850,6 +2852,39 @@ namespace Laurion
|
||||
delete in;
|
||||
}
|
||||
|
||||
ENCODE(OP_ItemPacket)
|
||||
{
|
||||
EQApplicationPacket* in = *p;
|
||||
*p = nullptr;
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
ItemPacket_Struct* old_item_pkt = (ItemPacket_Struct*)__emu_buffer;
|
||||
|
||||
switch (old_item_pkt->PacketType)
|
||||
{
|
||||
case ItemPacketParcel: {
|
||||
//parcels are significantly changed so we will need to figure this out
|
||||
}
|
||||
default: {
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
auto type = ServerToLaurionItemPacketType(old_item_pkt->PacketType);
|
||||
if (type == structs::ItemPacketInvalid) {
|
||||
break;
|
||||
}
|
||||
|
||||
SerializeBuffer buffer;
|
||||
buffer.WriteInt32((int32_t)type);
|
||||
SerializeItem(buffer, (const EQ::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_ItemPacket, buffer.size());
|
||||
outapp->WriteData(buffer.buffer(), buffer.size());
|
||||
dest->FastQueuePacket(&outapp, ack_req);
|
||||
}
|
||||
}
|
||||
|
||||
delete in;
|
||||
}
|
||||
|
||||
// DECODE methods
|
||||
|
||||
DECODE(OP_EnterWorld)
|
||||
@ -3969,7 +4004,14 @@ namespace Laurion
|
||||
|
||||
if (server_slot < EQ::invtype::POSSESSIONS_SIZE) {
|
||||
LaurionSlot.Type = invtype::typePossessions;
|
||||
LaurionSlot.Slot = server_slot;
|
||||
|
||||
if (server_slot == EQ::invslot::slotCursor) {
|
||||
LaurionSlot.Slot = invslot::slotCursor;
|
||||
}
|
||||
else
|
||||
{
|
||||
LaurionSlot.Slot = server_slot;
|
||||
}
|
||||
}
|
||||
|
||||
else if (server_slot <= EQ::invbag::CURSOR_BAG_END && server_slot >= EQ::invbag::GENERAL_BAGS_BEGIN) {
|
||||
@ -4387,4 +4429,23 @@ namespace Laurion
|
||||
|
||||
return ServerSlot;
|
||||
}
|
||||
|
||||
structs::ItemPacketType ServerToLaurionItemPacketType(ItemPacketType server_type) {
|
||||
switch (server_type) {
|
||||
case ItemPacketType::ItemPacketMerchant:
|
||||
return structs::ItemPacketType::ItemPacketMerchant;
|
||||
case ItemPacketType::ItemPacketTradeView:
|
||||
return structs::ItemPacketType::ItemPacketTradeView;
|
||||
case ItemPacketType::ItemPacketLoot:
|
||||
return structs::ItemPacketType::ItemPacketLoot;
|
||||
case ItemPacketType::ItemPacketTrade:
|
||||
return structs::ItemPacketType::ItemPacketTrade;
|
||||
case ItemPacketType::ItemPacketCharInventory:
|
||||
return structs::ItemPacketType::ItemPacketCharInventory;
|
||||
case ItemPacketType::ItemPacketLimbo:
|
||||
return structs::ItemPacketType::ItemPacketLimbo;
|
||||
default:
|
||||
return structs::ItemPacketType::ItemPacketInvalid;
|
||||
}
|
||||
}
|
||||
} /*Laurion*/
|
||||
|
||||
@ -33,6 +33,7 @@ E(OP_Death)
|
||||
E(OP_MoveItem)
|
||||
E(OP_ExpUpdate)
|
||||
E(OP_SendAATable)
|
||||
E(OP_ItemPacket)
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_EnterWorld)
|
||||
D(OP_ZoneEntry)
|
||||
|
||||
@ -522,7 +522,6 @@ namespace Laurion {
|
||||
/*08*/ int32 unknown2;
|
||||
/*12*/ uint8 doorid;
|
||||
/*13*/ uint8 padding2[3];
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
@ -603,6 +602,39 @@ namespace Laurion {
|
||||
/*0028*/
|
||||
};
|
||||
|
||||
//These are significantly changed in Laurion from RoF2
|
||||
enum ItemPacketType {
|
||||
//ItemPacketViewLink = 0x00,
|
||||
ItemPacketMerchant = 0x64,
|
||||
ItemPacketTradeView = 0x65,
|
||||
ItemPacketLoot = 0x66,
|
||||
ItemPacketTrade = 0x67,
|
||||
ItemPacketCharInventory = 0x6A, //Rof 0x69 -> Larion 0x6a (requires translation)
|
||||
ItemPacketLimbo = 0x6B, //0x6A -> 0x6B
|
||||
//ItemPacketWorldContainer = 0x6B, //These aren't found yet
|
||||
//ItemPacketTributeItem = 0x6C,
|
||||
//ItemPacketGuildTribute = 0x6D,
|
||||
//ItemPacketCharmUpdate = 0x6E, // Larion has a specific packet for this
|
||||
//ItemPacketRecovery = 0x71,
|
||||
//ItemPacketParcel = 0x73,
|
||||
ItemPacketInvalid = 0xFF
|
||||
};
|
||||
|
||||
/*
|
||||
enum ItemPacketType
|
||||
{
|
||||
ItemPacketViewLink = 0x00,
|
||||
ItemPacketTradeView = 0x65,
|
||||
ItemPacketLoot = 0x66,
|
||||
ItemPacketTrade = 0x67,
|
||||
ItemPacketCharInventory = 0x69,
|
||||
ItemPacketSummonItem = 0x6A,
|
||||
ItemPacketTributeItem = 0x6C,
|
||||
ItemPacketMerchant = 0x64,
|
||||
ItemPacketWorldContainer = 0x6B
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma pack()
|
||||
|
||||
}; //end namespace structs
|
||||
|
||||
@ -43,7 +43,7 @@ OP_SetChatServer2=0x2726
|
||||
OP_ZoneServerInfo=0x2273
|
||||
OP_WorldComplete=0x195c
|
||||
OP_WorldUnknown001=0x2049
|
||||
OP_FloatListThing=0x0000
|
||||
OP_FloatListThing=0x66fd
|
||||
|
||||
# Reasons for Disconnect:
|
||||
OP_ZoneUnavail=0x582d
|
||||
@ -231,8 +231,8 @@ OP_ConfirmDelete=0x0000
|
||||
OP_Logout=0x771d
|
||||
OP_Rewind=0x0000
|
||||
OP_TargetCommand=0x3b18
|
||||
OP_Hide=0x0000
|
||||
OP_Jump=0x0000
|
||||
OP_Hide=0x1cdf
|
||||
OP_Jump=0x6fa0
|
||||
OP_Camp=0x326f
|
||||
OP_Emote=0x0000
|
||||
OP_SetRunMode=0x0000
|
||||
@ -254,10 +254,10 @@ OP_AutoAttack=0x3f03
|
||||
OP_AutoAttack2=0x1c31
|
||||
OP_Consume=0x0000
|
||||
OP_MoveItem=0x11e3
|
||||
OP_MoveMultipleItems=0x0000
|
||||
OP_MoveMultipleItems=0x5205
|
||||
OP_DeleteItem=0x0000
|
||||
OP_DeleteCharge=0x0000
|
||||
OP_ItemPacket=0x0000
|
||||
OP_ItemPacket=0x7d43
|
||||
OP_ItemLinkResponse=0x0000
|
||||
OP_ItemLinkClick=0x0000
|
||||
OP_ItemPreview=0x0000
|
||||
@ -280,7 +280,7 @@ OP_RezzAnswer=0x0000
|
||||
OP_Shielding=0x0000
|
||||
OP_RequestDuel=0x0000
|
||||
OP_MobRename=0x0000
|
||||
OP_AugmentItem=0x0000
|
||||
OP_AugmentItem=0x3a1b
|
||||
OP_WeaponEquip1=0x0000
|
||||
OP_PlayerStateAdd=0x0000
|
||||
OP_PlayerStateRemove=0x0000
|
||||
@ -569,22 +569,21 @@ OP_MarkRaidNPC=0x0000
|
||||
OP_RaidClearNPCMarks=0x0000
|
||||
|
||||
# Button-push commands
|
||||
OP_Taunt=0x0000
|
||||
OP_CombatAbility=0x0000
|
||||
OP_SenseTraps=0x0000
|
||||
OP_PickPocket=0x0000
|
||||
OP_DisarmTraps=0x0000
|
||||
OP_Disarm=0x0000
|
||||
OP_Sneak=0x0000
|
||||
OP_Fishing=0x0000
|
||||
OP_InstillDoubt=0x0000
|
||||
OP_FeignDeath=0x0000
|
||||
OP_Mend=0x0000
|
||||
OP_Bind_Wound=0x0000
|
||||
OP_LDoNOpen=0x0000
|
||||
#OP_LDoNDisarmTraps= #Same as OP_DisarmTraps in RoF
|
||||
OP_LDoNPickLock=0x0000
|
||||
OP_LDoNInspect=0x0000
|
||||
OP_Taunt=0x5064
|
||||
OP_CombatAbility=0xbf
|
||||
OP_SenseTraps=0x579c
|
||||
OP_PickPocket=0x53d1
|
||||
OP_DisarmTraps=0x21bf
|
||||
OP_Disarm=0x31e9
|
||||
OP_Sneak=0x78a7
|
||||
OP_Fishing=0x57cc
|
||||
OP_InstillDoubt=0x57cc
|
||||
OP_FeignDeath=0x14b8
|
||||
OP_Mend=0x6b8
|
||||
OP_Bind_Wound=0x650e
|
||||
OP_LDoNOpen=0x448
|
||||
OP_LDoNPickLock=0x61c8
|
||||
OP_LDoNInspect=0xc1c
|
||||
|
||||
# Task packets
|
||||
OP_TaskDescription=0x0000
|
||||
@ -693,38 +692,8 @@ OP_PetitionRefresh=0x0000
|
||||
OP_PetitionCheckout2=0x0000
|
||||
OP_PetitionViewPetition=0x0000
|
||||
|
||||
# Login opcodes
|
||||
OP_SessionReady=0x0000
|
||||
OP_Login=0x0000
|
||||
OP_ServerListRequest=0x0000
|
||||
OP_PlayEverquestRequest=0x0000
|
||||
OP_PlayEverquestResponse=0x0000
|
||||
OP_ChatMessage=0x0000
|
||||
OP_LoginAccepted=0x0000
|
||||
OP_ServerListResponse=0x0000
|
||||
OP_Poll=0x0000
|
||||
OP_EnterChat=0x0000
|
||||
OP_PollResponse=0x0000
|
||||
|
||||
# raw opcodes
|
||||
OP_RAWSessionRequest=0x0000
|
||||
OP_RAWSessionResponse=0x0000
|
||||
OP_RAWCombined=0x0000
|
||||
OP_RAWSessionDisconnect=0x0000
|
||||
OP_RAWKeepAlive=0x0000
|
||||
OP_RAWSessionStatRequest=0x0000
|
||||
OP_RAWSessionStatResponse=0x0000
|
||||
OP_RAWPacket=0x0000
|
||||
OP_RAWFragment=0x0000
|
||||
OP_RAWOutOfOrderAck=0x0000
|
||||
OP_RAWAck=0x0000
|
||||
OP_RAWAppCombined=0x0000
|
||||
OP_RAWOutOfSession=0x0000
|
||||
|
||||
# we need to document the differences between these packets to make identifying them easier
|
||||
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
|
||||
OP_InitialHPUpdate=0x0000
|
||||
|
||||
#aura related
|
||||
OP_UpdateAura=0x0000
|
||||
OP_RemoveTrap=0x0000
|
||||
|
||||
OP_Fingerprint=0x7a5b
|
||||
Loading…
x
Reference in New Issue
Block a user