mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
[Items] Allow any bag type 51 to be used for Trader (#1392)
* Allow any bag type 51 to be used for Trader Most commonly this would allow the different color satchels to be used in Trader mode. PEQ database has 1 item (Yellow Trader's Satchel Token - 35037) marked as type 51, but otherwise only the proper bags are already set. Bonus of removing the hard-coded ID from source. * Updated Fixed where I missed it in a couple more spots too. * Update bonuses.cpp
This commit is contained in:
parent
bcb0e43d13
commit
45eea666a1
@ -3382,7 +3382,7 @@ bool Client::CalcItemScale(uint32 slot_x, uint32 slot_y) {
|
|||||||
if (Trader)
|
if (Trader)
|
||||||
if (i >= EQ::invbag::GENERAL_BAGS_BEGIN && i <= EQ::invbag::GENERAL_BAGS_END) {
|
if (i >= EQ::invbag::GENERAL_BAGS_BEGIN && i <= EQ::invbag::GENERAL_BAGS_END) {
|
||||||
EQ::ItemInstance* parent_item = m_inv.GetItem(EQ::InventoryProfile::CalcSlotId(i));
|
EQ::ItemInstance* parent_item = m_inv.GetItem(EQ::InventoryProfile::CalcSlotId(i));
|
||||||
if (parent_item && parent_item->GetItem()->ID == 17899) // trader satchel
|
if (parent_item && parent_item->GetItem()->BagType == EQ::item::BagTypeTradersSatchel)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3468,7 +3468,7 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) {
|
|||||||
if (Trader)
|
if (Trader)
|
||||||
if (i >= EQ::invbag::GENERAL_BAGS_BEGIN && i <= EQ::invbag::GENERAL_BAGS_END) {
|
if (i >= EQ::invbag::GENERAL_BAGS_BEGIN && i <= EQ::invbag::GENERAL_BAGS_END) {
|
||||||
EQ::ItemInstance* parent_item = m_inv.GetItem(EQ::InventoryProfile::CalcSlotId(i));
|
EQ::ItemInstance* parent_item = m_inv.GetItem(EQ::InventoryProfile::CalcSlotId(i));
|
||||||
if (parent_item && parent_item->GetItem()->ID == 17899) // trader satchel
|
if (parent_item && parent_item->GetItem()->BagType == EQ::item::BagTypeTradersSatchel)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1266,7 +1266,7 @@ uint32 Client::FindTraderItemSerialNumber(int32 ItemID) {
|
|||||||
uint16 SlotID = 0;
|
uint16 SlotID = 0;
|
||||||
for (int i = EQ::invslot::GENERAL_BEGIN; i <= EQ::invslot::GENERAL_END; i++){
|
for (int i = EQ::invslot::GENERAL_BEGIN; i <= EQ::invslot::GENERAL_END; i++){
|
||||||
item = this->GetInv().GetItem(i);
|
item = this->GetInv().GetItem(i);
|
||||||
if (item && item->GetItem()->ID == 17899){ //Traders Satchel
|
if (item && item->GetItem()->BagType == EQ::item::BagTypeTradersSatchel){
|
||||||
for (int x = EQ::invbag::SLOT_BEGIN; x <= EQ::invbag::SLOT_END; x++) {
|
for (int x = EQ::invbag::SLOT_BEGIN; x <= EQ::invbag::SLOT_END; x++) {
|
||||||
// we already have the parent bag and a contents iterator..why not just iterate the bag!??
|
// we already have the parent bag and a contents iterator..why not just iterate the bag!??
|
||||||
SlotID = EQ::InventoryProfile::CalcSlotId(i, x);
|
SlotID = EQ::InventoryProfile::CalcSlotId(i, x);
|
||||||
@ -1289,7 +1289,7 @@ EQ::ItemInstance* Client::FindTraderItemBySerialNumber(int32 SerialNumber){
|
|||||||
uint16 SlotID = 0;
|
uint16 SlotID = 0;
|
||||||
for (int i = EQ::invslot::GENERAL_BEGIN; i <= EQ::invslot::GENERAL_END; i++){
|
for (int i = EQ::invslot::GENERAL_BEGIN; i <= EQ::invslot::GENERAL_END; i++){
|
||||||
item = this->GetInv().GetItem(i);
|
item = this->GetInv().GetItem(i);
|
||||||
if(item && item->GetItem()->ID == 17899){ //Traders Satchel
|
if (item && item->GetItem()->BagType == EQ::item::BagTypeTradersSatchel){
|
||||||
for (int x = EQ::invbag::SLOT_BEGIN; x <= EQ::invbag::SLOT_END; x++) {
|
for (int x = EQ::invbag::SLOT_BEGIN; x <= EQ::invbag::SLOT_END; x++) {
|
||||||
// we already have the parent bag and a contents iterator..why not just iterate the bag!??
|
// we already have the parent bag and a contents iterator..why not just iterate the bag!??
|
||||||
SlotID = EQ::InventoryProfile::CalcSlotId(i, x);
|
SlotID = EQ::InventoryProfile::CalcSlotId(i, x);
|
||||||
@ -1322,7 +1322,7 @@ GetItems_Struct* Client::GetTraderItems(){
|
|||||||
if (ndx >= 80)
|
if (ndx >= 80)
|
||||||
break;
|
break;
|
||||||
item = this->GetInv().GetItem(i);
|
item = this->GetInv().GetItem(i);
|
||||||
if(item && item->GetItem()->ID == 17899){ //Traders Satchel
|
if (item && item->GetItem()->BagType == EQ::item::BagTypeTradersSatchel){
|
||||||
for (int x = EQ::invbag::SLOT_BEGIN; x <= EQ::invbag::SLOT_END; x++) {
|
for (int x = EQ::invbag::SLOT_BEGIN; x <= EQ::invbag::SLOT_END; x++) {
|
||||||
if (ndx >= 80)
|
if (ndx >= 80)
|
||||||
break;
|
break;
|
||||||
@ -1349,7 +1349,7 @@ uint16 Client::FindTraderItem(int32 SerialNumber, uint16 Quantity){
|
|||||||
uint16 SlotID = 0;
|
uint16 SlotID = 0;
|
||||||
for (int i = EQ::invslot::GENERAL_BEGIN; i <= EQ::invslot::GENERAL_END; i++) {
|
for (int i = EQ::invslot::GENERAL_BEGIN; i <= EQ::invslot::GENERAL_END; i++) {
|
||||||
item = this->GetInv().GetItem(i);
|
item = this->GetInv().GetItem(i);
|
||||||
if(item && item->GetItem()->ID == 17899){ //Traders Satchel
|
if (item && item->GetItem()->BagType == EQ::item::BagTypeTradersSatchel){
|
||||||
for (int x = EQ::invbag::SLOT_BEGIN; x <= EQ::invbag::SLOT_END; x++){
|
for (int x = EQ::invbag::SLOT_BEGIN; x <= EQ::invbag::SLOT_END; x++){
|
||||||
SlotID = EQ::InventoryProfile::CalcSlotId(i, x);
|
SlotID = EQ::InventoryProfile::CalcSlotId(i, x);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user