mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 20:51:29 +00:00
-Basic move item support.
-Update some Laurion limits to better support new item slots. -Camping on Laurion will now work like it does on live. -Fixed a few of the Laurion exp messages (this will need some work). Packet calc is still all fked up.
This commit is contained in:
parent
392998325b
commit
af8f85cfd9
@ -1178,7 +1178,7 @@ namespace Laurion
|
|||||||
|
|
||||||
//u32 claim_count;
|
//u32 claim_count;
|
||||||
out.WriteUInt32(0);
|
out.WriteUInt32(0);
|
||||||
//Claim claims[claim_count];
|
//Claim claims[claim_count];
|
||||||
|
|
||||||
//Tribute tribute;
|
//Tribute tribute;
|
||||||
/*
|
/*
|
||||||
@ -2657,6 +2657,20 @@ namespace Laurion
|
|||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_MoveItem)
|
||||||
|
{
|
||||||
|
ENCODE_LENGTH_EXACT(MoveItem_Struct);
|
||||||
|
SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
|
Log(Logs::Detail, Logs::Netcode, "Laurion::ENCODE(OP_MoveItem)");
|
||||||
|
|
||||||
|
eq->from_slot = ServerToLaurionSlot(emu->from_slot);
|
||||||
|
eq->to_slot = ServerToLaurionSlot(emu->to_slot);
|
||||||
|
OUT(number_in_stack);
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
// DECODE methods
|
// DECODE methods
|
||||||
|
|
||||||
DECODE(OP_EnterWorld)
|
DECODE(OP_EnterWorld)
|
||||||
@ -2831,6 +2845,20 @@ namespace Laurion
|
|||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECODE(OP_MoveItem)
|
||||||
|
{
|
||||||
|
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
|
||||||
|
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||||
|
|
||||||
|
Log(Logs::Detail, Logs::Netcode, "Laurion::DECODE(OP_MoveItem)");
|
||||||
|
|
||||||
|
emu->from_slot = LaurionToServerSlot(eq->from_slot);
|
||||||
|
emu->to_slot = LaurionToServerSlot(eq->to_slot);
|
||||||
|
IN(number_in_stack);
|
||||||
|
|
||||||
|
FINISH_DIRECT_DECODE();
|
||||||
|
}
|
||||||
|
|
||||||
//Naive version but should work well enough for now
|
//Naive version but should work well enough for now
|
||||||
int ExtractIDFile(const std::string& input) {
|
int ExtractIDFile(const std::string& input) {
|
||||||
std::string number;
|
std::string number;
|
||||||
|
|||||||
@ -170,6 +170,8 @@ namespace Laurion
|
|||||||
slotGeneral8,
|
slotGeneral8,
|
||||||
slotGeneral9,
|
slotGeneral9,
|
||||||
slotGeneral10,
|
slotGeneral10,
|
||||||
|
slotGeneral11,
|
||||||
|
slotGeneral12,
|
||||||
slotCursor
|
slotCursor
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -188,6 +190,7 @@ namespace Laurion
|
|||||||
const int16 EQUIPMENT_END = slotAmmo;
|
const int16 EQUIPMENT_END = slotAmmo;
|
||||||
const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN) + 1;
|
const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN) + 1;
|
||||||
|
|
||||||
|
//We support more if enabled but for now lets leave it at the 10 slots
|
||||||
const int16 GENERAL_BEGIN = slotGeneral1;
|
const int16 GENERAL_BEGIN = slotGeneral1;
|
||||||
const int16 GENERAL_END = slotGeneral10;
|
const int16 GENERAL_END = slotGeneral10;
|
||||||
const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN) + 1;
|
const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN) + 1;
|
||||||
@ -200,10 +203,10 @@ namespace Laurion
|
|||||||
const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor;
|
const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor;
|
||||||
|
|
||||||
const uint64 EQUIPMENT_BITMASK = 0x00000000007FFFFF;
|
const uint64 EQUIPMENT_BITMASK = 0x00000000007FFFFF;
|
||||||
const uint64 GENERAL_BITMASK = 0x00000001FF800000;
|
const uint64 GENERAL_BITMASK = 0x00000007FF800000;
|
||||||
const uint64 CURSOR_BITMASK = 0x0000000200000000;
|
const uint64 CURSOR_BITMASK = 0x0000000800000000;
|
||||||
const uint64 POSSESSIONS_BITMASK = (EQUIPMENT_BITMASK | GENERAL_BITMASK | CURSOR_BITMASK); // based on 34-slot count (RoF+)
|
const uint64 POSSESSIONS_BITMASK = (EQUIPMENT_BITMASK | GENERAL_BITMASK | CURSOR_BITMASK); // based on 36-slot count (Laurion+)
|
||||||
const uint64 CORPSE_BITMASK = (GENERAL_BITMASK | CURSOR_BITMASK | (EQUIPMENT_BITMASK << 34)); // based on 34-slot count (RoF+)
|
const uint64 CORPSE_BITMASK = (GENERAL_BITMASK | CURSOR_BITMASK | (EQUIPMENT_BITMASK << 36)); // based on 36-slot count (Laurion+)
|
||||||
|
|
||||||
|
|
||||||
const char* GetInvPossessionsSlotName(int16 inv_slot);
|
const char* GetInvPossessionsSlotName(int16 inv_slot);
|
||||||
|
|||||||
@ -30,6 +30,7 @@ E(OP_HPUpdate)
|
|||||||
E(OP_Damage)
|
E(OP_Damage)
|
||||||
E(OP_Animation)
|
E(OP_Animation)
|
||||||
E(OP_Death)
|
E(OP_Death)
|
||||||
|
E(OP_MoveItem)
|
||||||
//list of packets we need to decode on the way in:
|
//list of packets we need to decode on the way in:
|
||||||
D(OP_EnterWorld)
|
D(OP_EnterWorld)
|
||||||
D(OP_ZoneEntry)
|
D(OP_ZoneEntry)
|
||||||
@ -42,6 +43,7 @@ D(OP_Consider)
|
|||||||
D(OP_ConsiderCorpse)
|
D(OP_ConsiderCorpse)
|
||||||
D(OP_ClickDoor)
|
D(OP_ClickDoor)
|
||||||
D(OP_SpawnAppearance)
|
D(OP_SpawnAppearance)
|
||||||
|
D(OP_MoveItem)
|
||||||
|
|
||||||
#undef E
|
#undef E
|
||||||
#undef D
|
#undef D
|
||||||
|
|||||||
@ -587,6 +587,22 @@ namespace Laurion {
|
|||||||
/*040*/
|
/*040*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct DeleteItem_Struct
|
||||||
|
{
|
||||||
|
/*0000*/ InventorySlot_Struct from_slot;
|
||||||
|
/*0012*/ InventorySlot_Struct to_slot;
|
||||||
|
/*0024*/ uint32 number_in_stack;
|
||||||
|
/*0028*/
|
||||||
|
};
|
||||||
|
|
||||||
|
struct MoveItem_Struct
|
||||||
|
{
|
||||||
|
/*0000*/ InventorySlot_Struct from_slot;
|
||||||
|
/*0012*/ InventorySlot_Struct to_slot;
|
||||||
|
/*0024*/ uint32 number_in_stack;
|
||||||
|
/*0028*/
|
||||||
|
};
|
||||||
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
}; //end namespace structs
|
}; //end namespace structs
|
||||||
|
|||||||
@ -228,7 +228,7 @@ OP_WhoAllRequest=0x0000
|
|||||||
OP_WhoAllResponse=0x0000
|
OP_WhoAllResponse=0x0000
|
||||||
OP_FriendsWho=0x0000
|
OP_FriendsWho=0x0000
|
||||||
OP_ConfirmDelete=0x0000
|
OP_ConfirmDelete=0x0000
|
||||||
OP_Logout=0x0000
|
OP_Logout=0x771d
|
||||||
OP_Rewind=0x0000
|
OP_Rewind=0x0000
|
||||||
OP_TargetCommand=0x3b18
|
OP_TargetCommand=0x3b18
|
||||||
OP_Hide=0x0000
|
OP_Hide=0x0000
|
||||||
|
|||||||
@ -4317,13 +4317,23 @@ void Client::Handle_OP_Camp(const EQApplicationPacket *app)
|
|||||||
if (IsLFP())
|
if (IsLFP())
|
||||||
worldserver.StopLFP(CharacterID());
|
worldserver.StopLFP(CharacterID());
|
||||||
|
|
||||||
if (GetGM())
|
if (ClientVersion() >= EQ::versions::ClientVersion::Laurion) {
|
||||||
{
|
if (!GetGM()) {
|
||||||
OnDisconnect(true);
|
camp_timer.Start(29000, true);
|
||||||
return;
|
}
|
||||||
|
|
||||||
|
auto outapp = new EQApplicationPacket(OP_Camp, 1);
|
||||||
|
FastQueuePacket(&outapp);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (GetGM())
|
||||||
|
{
|
||||||
|
OnDisconnect(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
camp_timer.Start(29000, true);
|
||||||
}
|
}
|
||||||
camp_timer.Start(29000, true);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::Handle_OP_CancelTask(const EQApplicationPacket *app)
|
void Client::Handle_OP_CancelTask(const EQApplicationPacket *app)
|
||||||
|
|||||||
21
zone/exp.cpp
21
zone/exp.cpp
@ -657,7 +657,12 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
|
|||||||
} else if (zone->IsHotzone()) {
|
} else if (zone->IsHotzone()) {
|
||||||
Message(Chat::Experience, "You gain party experience (with a bonus)!");
|
Message(Chat::Experience, "You gain party experience (with a bonus)!");
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Experience, GAIN_GROUPXP);
|
if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) {
|
||||||
|
MessageString(Chat::Experience, GAIN_GROUPXP, exp_percent_message.c_str());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageString(Chat::Experience, GAIN_GROUPXP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (IsRaidGrouped()) {
|
} else if (IsRaidGrouped()) {
|
||||||
if (RuleI(Character, ShowExpValues) > 0) {
|
if (RuleI(Character, ShowExpValues) > 0) {
|
||||||
@ -665,7 +670,12 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
|
|||||||
} else if (zone->IsHotzone()) {
|
} else if (zone->IsHotzone()) {
|
||||||
Message(Chat::Experience, "You gained raid experience (with a bonus)!");
|
Message(Chat::Experience, "You gained raid experience (with a bonus)!");
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Experience, GAIN_RAIDEXP);
|
if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) {
|
||||||
|
MessageString(Chat::Experience, GAIN_RAIDEXP, exp_percent_message.c_str());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageString(Chat::Experience, GAIN_RAIDEXP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (RuleI(Character, ShowExpValues) > 0) {
|
if (RuleI(Character, ShowExpValues) > 0) {
|
||||||
@ -673,7 +683,12 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
|
|||||||
} else if (zone->IsHotzone()) {
|
} else if (zone->IsHotzone()) {
|
||||||
Message(Chat::Experience, "You gain experience (with a bonus)!");
|
Message(Chat::Experience, "You gain experience (with a bonus)!");
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Experience, GAIN_XP);
|
if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) {
|
||||||
|
MessageString(Chat::Experience, GAIN_XP, exp_percent_message.c_str());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageString(Chat::Experience, GAIN_XP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user