[9957] Alow sell item for money and extanded coset without momey in same time.

npc_vendor.ExtandedCost can be negative now that meaning:
price excluded default item BuyPrice and use only abs(ExtandedCost) items).
For example expected used for item 36908.
This commit is contained in:
VladimirMangos 2010-05-22 19:38:11 +04:00
parent 94f7a7709d
commit 67b8ca03b5
13 changed files with 51 additions and 31 deletions

View file

@ -760,7 +760,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
++count;
// reputation discount
uint32 price = uint32(floor(pProto->BuyPrice * discountMod));
uint32 price = crItem->IsExcludeMoneyPrice() ? 0 : uint32(floor(pProto->BuyPrice * discountMod));
data << uint32(vendorslot +1); // client size expected counting from 1
data << uint32(crItem->item);
@ -769,7 +769,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
data << uint32(price);
data << uint32(pProto->MaxDurability);
data << uint32(pProto->BuyCount);
data << uint32(crItem->ExtendedCost);
data << uint32(crItem->GetExtendedCostId());
}
}
}