mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 13:34:38 +02:00
Added broadcast packet list to Player. Fixed bazaar flags not working. Added the seeking item trade code.
This commit is contained in:
parent
a9d4e621e3
commit
c0312079ef
2 changed files with 73 additions and 16 deletions
|
@ -1049,7 +1049,7 @@ namespace FFXIVClassic_Map_Server
|
|||
return Database.CreateItem(itemId, amount, quality, modifiers);
|
||||
}
|
||||
|
||||
public bool BazaarPurchaseOperation(Player bazaar, Player buyer, InventoryItem itemToBuy, int quantity, int cost)
|
||||
public bool BazaarBuyOperation(Player bazaar, Player buyer, InventoryItem itemToBuy, int quantity, int cost)
|
||||
{
|
||||
if (bazaar == null || buyer == null || itemToBuy == null)
|
||||
return false;
|
||||
|
@ -1075,6 +1075,30 @@ namespace FFXIVClassic_Map_Server
|
|||
return true;
|
||||
}
|
||||
|
||||
public bool BazaarSellOperation(Player bazaar, Player buyer, InventoryItem reward, int rewardQuantity, InventoryItem seek, int seekQuantity)
|
||||
{
|
||||
if (bazaar == null || buyer == null || reward == null || seek == null)
|
||||
return false;
|
||||
|
||||
if (rewardQuantity <= 0 || seekQuantity <= 0)
|
||||
return false;
|
||||
|
||||
if (reward.GetBazaarMode() == InventoryItem.TYPE_SEEK_ITEM)
|
||||
{
|
||||
bazaar.RemoveItem(reward, rewardQuantity);
|
||||
buyer.RemoveItem(seek, seekQuantity);
|
||||
|
||||
bazaar.AddItem(seek);
|
||||
bazaar.AddItem(reward);
|
||||
}
|
||||
|
||||
Database.ClearBazaarEntry(bazaar, reward);
|
||||
|
||||
bazaar.CheckBazaarFlags();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void AddToBazaar(Player player, InventoryItem reward, InventoryItem seek, int rewardAmount, int seekAmount, byte bazaarMode)
|
||||
{
|
||||
bool succ = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue