Omit bank/shared-bank from selling at a merchant, additionally prevent weight calculation for banked items on players weight
This commit is contained in:
parent
061f0c157a
commit
428b73391c
@ -7032,6 +7032,8 @@ void Commands::Command_Inventory(Client* client, Seperator* sep, EQ2_RemoteComma
|
||||
if(outapp)
|
||||
client->QueuePacket(outapp);
|
||||
}
|
||||
|
||||
client->GetPlayer()->CalculateApplyWeight();
|
||||
}
|
||||
else if(sep->arg[1][0] && strncasecmp("equip", sep->arg[0], 5) == 0 && sep->IsNumber(1))
|
||||
{
|
||||
|
@ -3422,7 +3422,8 @@ int32 PlayerItemList::GetWeight(){
|
||||
for(int16 i = 0; i < indexed_items.size(); i++){
|
||||
Item* item = indexed_items[i];
|
||||
if (item) {
|
||||
ret += item->generic_info.weight;
|
||||
if(item->details.inv_slot_id != -3 && item->details.inv_slot_id != -4)
|
||||
ret += item->generic_info.weight;
|
||||
}
|
||||
}
|
||||
MPlayerItems.releasereadlock(__FUNCTION__, __LINE__);
|
||||
|
@ -1614,16 +1614,22 @@ void LuaInterface::DeletePendingSpells(bool all) {
|
||||
spell = *del_itr;
|
||||
|
||||
if(!all) {
|
||||
if (spell->caster && spell->caster->GetZone()) {
|
||||
spell->caster->GetZone()->GetSpellProcess()->DeleteActiveSpell(spell, true);
|
||||
if (spell->caster) {
|
||||
ZoneServer* curZone = spell->caster->GetZone();
|
||||
if(curZone)
|
||||
curZone->GetSpellProcess()->DeleteActiveSpell(spell, true);
|
||||
}
|
||||
else if(spell->targets.size() > 0 && spell->caster && spell->caster->GetZone()) {
|
||||
if(spell->targets.size() > 0) {
|
||||
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
||||
for (int8 i = 0; i < spell->targets.size(); i++) {
|
||||
Spawn* target = spell->caster->GetZone()->GetSpawnByID(spell->targets.at(i));
|
||||
if (!target || !target->IsEntity())
|
||||
continue;
|
||||
target->GetZone()->GetSpellProcess()->DeleteActiveSpell(spell, true);
|
||||
ZoneServer* targetZone = target->GetZone();
|
||||
if(!targetZone)
|
||||
continue;
|
||||
|
||||
targetZone->GetSpellProcess()->DeleteActiveSpell(spell, true);
|
||||
}
|
||||
spell->MSpellTargets.releasereadlock(__FUNCTION__, __LINE__);
|
||||
}
|
||||
|
@ -8842,6 +8842,10 @@ void Client::SendSellMerchantList(bool sell) {
|
||||
map<int32, Item*>::iterator test_itr;
|
||||
for (test_itr = items->begin(); test_itr != items->end(); test_itr++) {
|
||||
bool isbagwithitems = false;
|
||||
|
||||
if(test_itr->second && (test_itr->second->details.inv_slot_id == -3 || test_itr->second->details.inv_slot_id == -4))
|
||||
continue; // omit bank/shared-bank
|
||||
|
||||
if (test_itr->second && test_itr->second->IsBag() && (test_itr->second->details.num_slots - test_itr->second->details.num_free_slots != test_itr->second->details.num_slots))
|
||||
isbagwithitems = true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user