mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Updated #peekinv to display item links properly in RoF clients
This commit is contained in:
parent
3f056462d6
commit
69a124e11f
@ -1,5 +1,8 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 10/19/2014 ==
|
||||||
|
Uleat: Updated command #peekinv to display item links properly in RoF clients
|
||||||
|
|
||||||
== 10/18/2014==
|
== 10/18/2014==
|
||||||
demonstar55: Implement group mentor, sharing leadership exp (SoF+ only)
|
demonstar55: Implement group mentor, sharing leadership exp (SoF+ only)
|
||||||
demonstar55: Add gaining of group leadership while in raids
|
demonstar55: Add gaining of group leadership while in raids
|
||||||
|
|||||||
266
zone/command.cpp
266
zone/command.cpp
@ -2780,6 +2780,21 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// linkcore_# indicates the number of consecutive 0's..not the actual length
|
||||||
|
const std::string linkcore_49 = "%c%06X0000000000000000000000000000000000000000000000000%s%c"; // RoF+
|
||||||
|
const std::string linkcore_44 = "%c%06X00000000000000000000000000000000000000000000%s%c"; // SoF->UF
|
||||||
|
const std::string linkcore_39 = "%c%06X000000000000000000000000000000000000000%s%c"; // 6.2->Ti
|
||||||
|
const char* linkcore = nullptr;
|
||||||
|
std::string linkbase = "";
|
||||||
|
|
||||||
|
// consider pushing 'linkcores' to EQLimits
|
||||||
|
if (c->GetClientVersion() >= EQClientRoF)
|
||||||
|
linkcore = linkcore_49.c_str();
|
||||||
|
else if (c->GetClientVersion() >= EQClientSoF)
|
||||||
|
linkcore = linkcore_44.c_str();
|
||||||
|
else
|
||||||
|
linkcore = linkcore_39.c_str();
|
||||||
|
|
||||||
bool bAll = (strcasecmp(sep->arg[1], "all") == 0);
|
bool bAll = (strcasecmp(sep->arg[1], "all") == 0);
|
||||||
bool bFound = false;
|
bool bFound = false;
|
||||||
Client* client = c->GetTarget()->CastToClient();
|
Client* client = c->GetTarget()->CastToClient();
|
||||||
@ -2792,64 +2807,32 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
for (int16 i = EmuConstants::EQUIPMENT_BEGIN; i <= EmuConstants::EQUIPMENT_END; i++) {
|
for (int16 i = EmuConstants::EQUIPMENT_BEGIN; i <= EmuConstants::EQUIPMENT_END; i++) {
|
||||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||||
item = (inst) ? inst->GetItem() : nullptr;
|
item = (inst) ? inst->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
// this kind of stuff needs to be pushed to the client translators
|
c->Message((item == 0), "WornSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
c->Message((item==0), "WornSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
i, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), "WornSlot: %i, Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bAll || (strcasecmp(sep->arg[1], "inv")==0)) {
|
if (bAll || (strcasecmp(sep->arg[1], "inv")==0)) {
|
||||||
// Personal inventory items
|
// Personal inventory items
|
||||||
bFound = true;
|
bFound = true;
|
||||||
for (int16 i = EmuConstants::GENERAL_BEGIN; i <= EmuConstants::GENERAL_END; i++) {
|
for (int16 i = EmuConstants::GENERAL_BEGIN; i <= EmuConstants::GENERAL_END; i++) {
|
||||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||||
item = (inst) ? inst->GetItem() : nullptr;
|
item = (inst) ? inst->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), "InvSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
c->Message((item == 0), "InvSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
i, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), "InvSlot: %i, Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inst && inst->IsType(ItemClassContainer)) {
|
if (inst && inst->IsType(ItemClassContainer)) {
|
||||||
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
||||||
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
||||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), " InvBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
c->Message((item == 0), " InvBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(i, j),
|
Inventory::CalcSlotId(i, j), i, j, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
i, j, ((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:instbag->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), " InvBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i",
|
|
||||||
Inventory::CalcSlotId(i, j),
|
|
||||||
i, j, ((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:instbag->GetCharges()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2857,10 +2840,10 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
const ItemInst* inst = client->GetInv().GetItem(MainPowerSource);
|
const ItemInst* inst = client->GetInv().GetItem(MainPowerSource);
|
||||||
item = (inst) ? inst->GetItem() : nullptr;
|
item = (inst) ? inst->GetItem() : nullptr;
|
||||||
c->Message((item==0), "InvSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", MainPowerSource,
|
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
((item==0)?"null":item->Name), 0x12,
|
c->Message((item == 0), "WornSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
((item==0)?0:inst->GetCharges()));
|
MainPowerSource, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2870,59 +2853,30 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
// Personal inventory items
|
// Personal inventory items
|
||||||
bFound = true;
|
bFound = true;
|
||||||
iter_queue it;
|
iter_queue it;
|
||||||
int i=0;
|
int i = 0;
|
||||||
|
|
||||||
if(client->GetInv().CursorEmpty()) { // Display 'front' cursor slot even if 'empty' (item(30[0]) == null)
|
if(client->GetInv().CursorEmpty()) { // Display 'front' cursor slot even if 'empty' (item(30[0]) == null)
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
linkbase = StringFormat(linkcore, 0x12, 0, "null", 0x12);
|
||||||
{
|
c->Message((item == 0), "CursorSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
c->Message((item == 0), "CursorSlot: %i, Depth: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", MainCursor, i,
|
MainCursor, 0, linkbase.c_str(), 0);
|
||||||
0, 0x12, 0, "null", 0x12, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item == 0), "CursorSlot: %i, Depth: %i, Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i", MainCursor, i,
|
|
||||||
0, 0x12, 0, "null", 0x12, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for(it=client->GetInv().cursor_begin();it!=client->GetInv().cursor_end();++it,i++) {
|
for(it=client->GetInv().cursor_begin();it!=client->GetInv().cursor_end();++it,i++) {
|
||||||
const ItemInst* inst = *it;
|
const ItemInst* inst = *it;
|
||||||
item = (inst) ? inst->GetItem() : nullptr;
|
item = (inst) ? inst->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item == 0), "CursorSlot: %i, Depth: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", MainCursor, i,
|
c->Message((item == 0), "CursorSlot: %i, Depth: %i, Item: %i (%s), Charges: %i",
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
MainPowerSource, i, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item == 0), "CursorSlot: %i, Depth: %i, Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i", MainCursor, i,
|
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inst && inst->IsType(ItemClassContainer) && i==0) { // 'CSD 1' - only display contents of slot 30[0] container..higher ones don't exist
|
if (inst && inst->IsType(ItemClassContainer) && i==0) { // 'CSD 1' - only display contents of slot 30[0] container..higher ones don't exist
|
||||||
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
||||||
const ItemInst* instbag = client->GetInv().GetItem(MainCursor, j);
|
const ItemInst* instbag = client->GetInv().GetItem(MainCursor, j);
|
||||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), " CursorBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
c->Message((item == 0), " CursorBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(MainCursor, j),
|
Inventory::CalcSlotId(i, j), i, j, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
MainCursor, j, ((item == 0) ? 0 : item->ID), 0x12, ((item == 0) ? 0 : item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:instbag->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), " CursorBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i",
|
|
||||||
Inventory::CalcSlotId(MainCursor, j),
|
|
||||||
MainCursor, j, ((item == 0) ? 0 : item->ID), 0x12, ((item == 0) ? 0 : item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:instbag->GetCharges()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2935,20 +2889,10 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
for (int16 i = EmuConstants::TRIBUTE_BEGIN; i <= EmuConstants::TRIBUTE_END; i++) {
|
for (int16 i = EmuConstants::TRIBUTE_BEGIN; i <= EmuConstants::TRIBUTE_END; i++) {
|
||||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||||
item = (inst) ? inst->GetItem() : nullptr;
|
item = (inst) ? inst->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), "TributeSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
c->Message((item == 0), "TributeSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
i, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), "TributeSlot: %i, Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2959,128 +2903,62 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
for (i = EmuConstants::BANK_BEGIN; i <= EmuConstants::BANK_END; i++) {
|
for (i = EmuConstants::BANK_BEGIN; i <= EmuConstants::BANK_END; i++) {
|
||||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||||
item = (inst) ? inst->GetItem() : nullptr;
|
item = (inst) ? inst->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), "BankSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
c->Message((item == 0), "BankSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
i, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), "BankSlot: %i, Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inst && inst->IsType(ItemClassContainer)) {
|
if (inst && inst->IsType(ItemClassContainer)) {
|
||||||
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
||||||
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
||||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), " BankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
c->Message((item == 0), " BankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(i, j),
|
Inventory::CalcSlotId(i, j), i, j, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
i, j, ((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), " BankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i",
|
|
||||||
Inventory::CalcSlotId(i, j),
|
|
||||||
i, j, ((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = EmuConstants::SHARED_BANK_BEGIN; i <= EmuConstants::SHARED_BANK_END; i++) {
|
for (i = EmuConstants::SHARED_BANK_BEGIN; i <= EmuConstants::SHARED_BANK_END; i++) {
|
||||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||||
item = (inst) ? inst->GetItem() : nullptr;
|
item = (inst) ? inst->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), "ShBankSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
c->Message((item == 0), "SharedBankSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
i, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), "ShBankSlot: %i, Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inst && inst->IsType(ItemClassContainer)) {
|
if (inst && inst->IsType(ItemClassContainer)) {
|
||||||
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
||||||
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
||||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), " ShBankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
c->Message((item == 0), " SharedBankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(i, j),
|
Inventory::CalcSlotId(i, j), i, j, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
i, j, ((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), " ShBankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i",
|
|
||||||
Inventory::CalcSlotId(i, j),
|
|
||||||
i, j, ((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bAll || (strcasecmp(sep->arg[1], "trade")==0)) {
|
if (bAll || (strcasecmp(sep->arg[1], "trade")==0)) {
|
||||||
// Items in trade window (current trader only, not the other trader)
|
// Items in trade window (current trader only, not the other trader)
|
||||||
bFound = true;
|
bFound = true;
|
||||||
for (int16 i = EmuConstants::TRADE_BEGIN; i <= EmuConstants::TRADE_END; i++) {
|
for (int16 i = EmuConstants::TRADE_BEGIN; i <= EmuConstants::TRADE_END; i++) {
|
||||||
const ItemInst* inst = client->GetInv().GetItem(i);
|
const ItemInst* inst = client->GetInv().GetItem(i);
|
||||||
item = (inst) ? inst->GetItem() : nullptr;
|
item = (inst) ? inst->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
c->Message((item==0), "TradeSlot: %i, Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
c->Message((item == 0), "TradeSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
i, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), "TradeSlot: %i, Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i", i,
|
|
||||||
((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inst && inst->IsType(ItemClassContainer)) {
|
if (inst && inst->IsType(ItemClassContainer)) {
|
||||||
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
||||||
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
const ItemInst* instbag = client->GetInv().GetItem(i, j);
|
||||||
item = (instbag) ? instbag->GetItem() : nullptr;
|
item = (instbag) ? instbag->GetItem() : nullptr;
|
||||||
if (c->GetClientVersion() >= EQClientSoF)
|
|
||||||
{
|
|
||||||
c->Message((item==0), " TradeBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X00000000000000000000000000000000000000000000%s%c), Charges: %i",
|
|
||||||
Inventory::CalcSlotId(i, j),
|
|
||||||
i, j, ((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
c->Message((item==0), " TradeBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%c%06X000000000000000000000000000000000000000%s%c), Charges: %i",
|
|
||||||
Inventory::CalcSlotId(i, j),
|
|
||||||
i, j, ((item==0)?0:item->ID),0x12, ((item==0)?0:item->ID),
|
|
||||||
((item==0)?"null":item->Name), 0x12,
|
|
||||||
((item==0)?0:inst->GetCharges()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
linkbase = StringFormat(linkcore, 0x12, ((item == 0) ? 0 : item->ID), ((item == 0) ? "null" : item->Name), 0x12);
|
||||||
|
c->Message((item == 0), " TradeBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
|
Inventory::CalcSlotId(i, j), i, j, ((item == 0) ? 0 : item->ID), linkbase.c_str(), ((item == 0) ? 0 : inst->GetCharges()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user