mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
More 'dictionary' updates..added 'constants' files to client translators..started replacement of hard-coded inventory values.
This commit is contained in:
+17
-11
@@ -386,6 +386,7 @@ void MapOpcodes() {
|
||||
ConnectedOpcodes[OP_MercenaryTimerRequest] = &Client::Handle_OP_MercenaryTimerRequest;
|
||||
ConnectedOpcodes[OP_OpenInventory] = &Client::Handle_OP_OpenInventory;
|
||||
ConnectedOpcodes[OP_OpenContainer] = &Client::Handle_OP_OpenContainer;
|
||||
ConnectedOpcodes[OP_ClientTimeStamp] = &Client::Handle_OP_ClientTimeStamp;
|
||||
}
|
||||
|
||||
void ClearMappedOpcode(EmuOpcode op) {
|
||||
@@ -1629,7 +1630,7 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
|
||||
Shielding_Struct* shield = (Shielding_Struct*)app->pBuffer;
|
||||
shield_target = entity_list.GetMob(shield->target_id);
|
||||
bool ack = false;
|
||||
ItemInst* inst = GetInv().GetItem(14);
|
||||
ItemInst* inst = GetInv().GetItem(MainSecondary);
|
||||
if (!shield_target)
|
||||
return;
|
||||
if (inst)
|
||||
@@ -3259,7 +3260,7 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app)
|
||||
MoveItem_Struct* mi = (MoveItem_Struct*)app->pBuffer;
|
||||
if(spellend_timer.Enabled() && casting_spell_id && !IsBardSong(casting_spell_id))
|
||||
{
|
||||
if(mi->from_slot != mi->to_slot && (mi->from_slot < 30 || mi->from_slot > 39) && IsValidSlot(mi->from_slot) && IsValidSlot(mi->to_slot))
|
||||
if(mi->from_slot != mi->to_slot && (mi->from_slot <= EmuConstants::GENERAL_END || mi->from_slot > 39) && IsValidSlot(mi->from_slot) && IsValidSlot(mi->to_slot))
|
||||
{
|
||||
char *detect = nullptr;
|
||||
const ItemInst *itm_from = GetInv().GetItem(mi->from_slot);
|
||||
@@ -3280,8 +3281,8 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app)
|
||||
// Illegal bagslot useage checks. Currently, user only receives a message if this check is triggered.
|
||||
bool mi_hack = false;
|
||||
|
||||
if(mi->from_slot >= 251 && mi->from_slot <= 340) {
|
||||
if(mi->from_slot > 330) { mi_hack = true; }
|
||||
if(mi->from_slot >= EmuConstants::GENERAL_BAGS_BEGIN && mi->from_slot <= EmuConstants::CURSOR_BAG_END) {
|
||||
if(mi->from_slot >= EmuConstants::CURSOR_BAG_BEGIN) { mi_hack = true; }
|
||||
else {
|
||||
int16 from_parent = m_inv.CalcSlotId(mi->from_slot);
|
||||
if(!m_inv[from_parent]) { mi_hack = true; }
|
||||
@@ -3290,8 +3291,8 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
if(mi->to_slot >= 251 && mi->to_slot <= 340) {
|
||||
if(mi->to_slot > 330) { mi_hack = true; }
|
||||
if(mi->to_slot >= EmuConstants::GENERAL_BAGS_BEGIN && mi->to_slot <= EmuConstants::CURSOR_BAG_END) {
|
||||
if(mi->to_slot >= EmuConstants::CURSOR_BAG_BEGIN) { mi_hack = true; }
|
||||
else {
|
||||
int16 to_parent = m_inv.CalcSlotId(mi->to_slot);
|
||||
if(!m_inv[to_parent]) { mi_hack = true; }
|
||||
@@ -6782,7 +6783,7 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) {
|
||||
|
||||
for (int16 L = 0; L <= 20; L++) {
|
||||
const ItemInst* inst = GetInv().GetItem(L);
|
||||
item = inst ? inst->GetItem() : nullptr;
|
||||
item = inst ? inst->GetItem() : nullptr;
|
||||
|
||||
if(item) {
|
||||
strcpy(insr->itemnames[L], item->Name);
|
||||
@@ -6791,14 +6792,15 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) {
|
||||
else { insr->itemicons[L] = 0xFFFFFFFF; }
|
||||
}
|
||||
|
||||
const ItemInst* inst = GetInv().GetItem(21);
|
||||
const ItemInst* inst = GetInv().GetItem(MainAmmo);
|
||||
item = inst ? inst->GetItem() : nullptr;
|
||||
|
||||
if(item) {
|
||||
strcpy(insr->itemnames[22], item->Name);
|
||||
insr->itemicons[22] = item->Icon;
|
||||
// another one..I did these, didn't I!!?
|
||||
strcpy(insr->itemnames[SoF::slots::MainAmmo], item->Name);
|
||||
insr->itemicons[SoF::slots::MainAmmo] = item->Icon;
|
||||
}
|
||||
else { insr->itemicons[22] = 0xFFFFFFFF; }
|
||||
else { insr->itemicons[SoF::slots::MainAmmo] = 0xFFFFFFFF; }
|
||||
|
||||
InspectMessage_Struct* newmessage = (InspectMessage_Struct*) insr->text;
|
||||
InspectMessage_Struct& playermessage = this->GetInspectMessage();
|
||||
@@ -13866,3 +13868,7 @@ void Client::Handle_OP_OpenContainer(const EQApplicationPacket *app) {
|
||||
// SideNote: Watching the slot translations, Unknown1 is showing '141' as well on certain item swaps.
|
||||
// Manually looting a corpse results in a from '34' to '68' value for equipment items, '0' to '0' for inventory.
|
||||
}
|
||||
|
||||
void Client::Handle_OP_ClientTimeStamp(const EQApplicationPacket *app) {
|
||||
// handle as needed or ignore like we have been doing...
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user