Allow to sell item for: money, extendedCost or money+extendedCost.

The new method (money+extende) can be used by using negative values on npc_vendor.ExtendedCost.
This one goes dedicated to ZxBiohazardZx.
Tnx also to VladimirMangos.

--HG--
branch : trunk
This commit is contained in:
John Holiver
2010-06-09 19:38:15 -03:00
parent 410eb3d1b6
commit 5dff68e457
9 changed files with 45 additions and 34 deletions
@@ -766,7 +766,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
++count;
// reputation discount
int32 price = uint32(floor(pProto->BuyPrice * discountMod));
int32 price = crItem->IsExcludeMoneyPrice() ? 0 : uint32(floor(pProto->BuyPrice * discountMod));
data << uint32(vendorslot+1); // client expects counting to start at 1
data << uint32(crItem->item);
@@ -775,7 +775,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());
}
}
}