mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 13:34:38 +02:00
Merge branch 'develop' of https://bitbucket.org/Ioncannon/ffxiv-classic-server into develop
Fix Excruciate removign status from enemy rather than caster
This commit is contained in:
commit
f2e34174c4
272 changed files with 8223 additions and 2425 deletions
|
@ -1,30 +1,23 @@
|
|||
using FFXIVClassic_Map_Server;
|
||||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic_Map_Server.actors.area;
|
||||
using FFXIVClassic_Map_Server.actors.chara.npc;
|
||||
using FFXIVClassic_Map_Server.Actors;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.dataobjects.chara;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using FFXIVClassic_Map_Server.packets.send.login;
|
||||
using MySql.Data.MySqlClient;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using FFXIVClassic_Map_Server.actors.group;
|
||||
using FFXIVClassic_Map_Server.packets.send.group;
|
||||
using FFXIVClassic_Map_Server.packets.WorldPackets.Receive;
|
||||
using FFXIVClassic_Map_Server.packets.WorldPackets.Send.Group;
|
||||
using System.Threading;
|
||||
using System.Diagnostics;
|
||||
using FFXIVClassic_Map_Server.actors.director;
|
||||
using FFXIVClassic_Map_Server.actors.chara.ai;
|
||||
using FFXIVClassic_Map_Server.actors.chara;
|
||||
using FFXIVClassic_Map_Server.Actors.Chara;
|
||||
using FFXIVClassic_Map_Server.actors.chara.player;
|
||||
|
||||
namespace FFXIVClassic_Map_Server
|
||||
{
|
||||
|
@ -51,9 +44,12 @@ namespace FFXIVClassic_Map_Server
|
|||
private const int MILIS_LOOPTIME = 333;
|
||||
private Timer mZoneTimer;
|
||||
|
||||
//Content Groups
|
||||
//Zone Server Groups
|
||||
public Dictionary<ulong, Group> mContentGroups = new Dictionary<ulong, Group>();
|
||||
public Dictionary<ulong, RelationGroup> mRelationGroups = new Dictionary<ulong, RelationGroup>();
|
||||
public Dictionary<ulong, TradeGroup> mTradeGroups = new Dictionary<ulong, TradeGroup>();
|
||||
private Object groupLock = new Object();
|
||||
private Object tradeLock = new Object();
|
||||
public ulong groupIndexId = 1;
|
||||
|
||||
public WorldManager(Server server)
|
||||
|
@ -1032,9 +1028,7 @@ namespace FFXIVClassic_Map_Server
|
|||
player.SendInstanceUpdate();
|
||||
|
||||
player.playerSession.LockUpdates(false);
|
||||
|
||||
|
||||
|
||||
|
||||
LuaEngine.GetInstance().CallLuaFunction(player, contentArea, "onZoneIn", true);
|
||||
}
|
||||
|
||||
|
@ -1185,6 +1179,484 @@ namespace FFXIVClassic_Map_Server
|
|||
}
|
||||
}
|
||||
|
||||
public RelationGroup CreateRelationGroup(Actor inviter, Actor invitee, ulong groupType)
|
||||
{
|
||||
lock (groupLock)
|
||||
{
|
||||
groupIndexId = groupIndexId | 0x0000000000000000;
|
||||
|
||||
RelationGroup group = new RelationGroup(groupIndexId, inviter.actorId, invitee.actorId, 0, groupType);
|
||||
mRelationGroups.Add(groupIndexId, group);
|
||||
groupIndexId++;
|
||||
|
||||
group.SendGroupPacketsAll(inviter.actorId, invitee.actorId);
|
||||
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
public RelationGroup GetRelationGroup(uint actorId)
|
||||
{
|
||||
lock (groupLock)
|
||||
{
|
||||
foreach (RelationGroup relation in mRelationGroups.Values)
|
||||
{
|
||||
if (relation.GetHost() == actorId || relation.GetOther() == actorId)
|
||||
return relation;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteRelationGroup(ulong groupid)
|
||||
{
|
||||
lock (groupLock)
|
||||
{
|
||||
if (mRelationGroups.ContainsKey(groupid))
|
||||
mRelationGroups.Remove(groupid);
|
||||
}
|
||||
}
|
||||
|
||||
public TradeGroup CreateTradeGroup(Player inviter, Player invitee)
|
||||
{
|
||||
//Sanity Checks
|
||||
if (inviter.Equals(invitee))
|
||||
{
|
||||
inviter.SendGameMessage(GetActor(), 25043, 0x20, (object)invitee); //You cannot trade with yourself.
|
||||
return null;
|
||||
}
|
||||
else if (GetTradeGroup(inviter.actorId) != null)
|
||||
{
|
||||
inviter.SendGameMessage(GetActor(), 25045, 0x20, (object)invitee); //You may only trade with one person at a time.
|
||||
return null;
|
||||
}
|
||||
else if (GetTradeGroup(invitee.actorId) != null)
|
||||
{
|
||||
inviter.SendGameMessage(GetActor(), 25044, 0x20, (object)invitee); //Your target is unable to trade.
|
||||
return null;
|
||||
}
|
||||
|
||||
//Create a trade group between these two players
|
||||
lock (groupLock)
|
||||
{
|
||||
groupIndexId = groupIndexId | 0x0000000000000000;
|
||||
|
||||
TradeGroup group = new TradeGroup(groupIndexId, inviter.actorId, invitee.actorId);
|
||||
mTradeGroups.Add(groupIndexId, group);
|
||||
groupIndexId++;
|
||||
|
||||
group.SendGroupPacketsAll(inviter.actorId, invitee.actorId);
|
||||
|
||||
inviter.SendGameMessage(GetActor(), 25101, 0x20, (object)invitee); //You request to trade with X
|
||||
invitee.SendGameMessage(GetActor(), 25037, 0x20, (object)inviter); //X wishes to trade with you
|
||||
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
public TradeGroup GetTradeGroup(uint actorId)
|
||||
{
|
||||
lock (groupLock)
|
||||
{
|
||||
foreach (TradeGroup group in mTradeGroups.Values)
|
||||
{
|
||||
if (group.GetHost() == actorId || group.GetOther() == actorId)
|
||||
return (TradeGroup)group;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteTradeGroup(ulong groupid)
|
||||
{
|
||||
lock (groupLock)
|
||||
{
|
||||
if (mTradeGroups.ContainsKey(groupid))
|
||||
{
|
||||
TradeGroup group = mTradeGroups[groupid];
|
||||
group.SendDeletePackets(group.GetHost(), group.GetOther());
|
||||
mTradeGroups.Remove(groupid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TradeTEST(Player player)
|
||||
{
|
||||
player.KickEventSpecial(Server.GetStaticActors("TradeExecuteCommand"), 0, "commandContent", null, null, null, 16, null, null, null, null, null);
|
||||
}
|
||||
|
||||
public void AcceptTrade(Player invitee)
|
||||
{
|
||||
TradeGroup group = GetTradeGroup(invitee.actorId);
|
||||
|
||||
if (group == null)
|
||||
{
|
||||
invitee.SendMessage(0x20, "", "MASSIVE ERROR: No tradegroup found!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
Player inviter = (Player)invitee.GetZone().FindActorInArea(group.GetHost());
|
||||
|
||||
//DeleteTradeGroup(group.groupIndex);
|
||||
|
||||
inviter.StartTradeTransaction(invitee);
|
||||
invitee.StartTradeTransaction(inviter);
|
||||
|
||||
inviter.KickEventSpecial(Server.GetStaticActors("TradeExecuteCommand"), 0, "commandContent", null, null, null, 16, null, null, null, null, null);
|
||||
invitee.KickEventSpecial(Server.GetStaticActors("TradeExecuteCommand"), 0, "commandContent", null, null, null, 16, null, null, null, null, null);
|
||||
}
|
||||
|
||||
public void CancelTradeTooFar(Player inviter)
|
||||
{
|
||||
TradeGroup group = GetTradeGroup(inviter.actorId);
|
||||
|
||||
if (group == null)
|
||||
{
|
||||
inviter.SendMessage(0x20, "", "MASSIVE ERROR: No tradegroup found!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
Player invitee = (Player)inviter.GetZone().FindActorInArea(group.GetOther());
|
||||
|
||||
inviter.SendGameMessage(GetActor(), 25042, 0x20); //You cancel the trade.
|
||||
if (invitee != null)
|
||||
invitee.SendGameMessage(GetActor(), 25042, 0x20); //The trade has been canceled.
|
||||
|
||||
DeleteTradeGroup(group.groupIndex);
|
||||
}
|
||||
|
||||
public void CancelTrade(Player inviter)
|
||||
{
|
||||
TradeGroup group = GetTradeGroup(inviter.actorId);
|
||||
|
||||
if (group == null)
|
||||
{
|
||||
inviter.SendMessage(0x20, "", "MASSIVE ERROR: No tradegroup found!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
Player invitee = (Player)inviter.GetZone().FindActorInArea(group.GetOther());
|
||||
|
||||
inviter.SendGameMessage(GetActor(), 25041, 0x20); //You cancel the trade.
|
||||
if (invitee != null)
|
||||
invitee.SendGameMessage(GetActor(), 25040, 0x20); //The trade has been canceled.
|
||||
|
||||
DeleteTradeGroup(group.groupIndex);
|
||||
}
|
||||
|
||||
public void RefuseTrade(Player invitee)
|
||||
{
|
||||
TradeGroup group = GetTradeGroup(invitee.actorId);
|
||||
|
||||
if (group == null)
|
||||
{
|
||||
invitee.SendMessage(0x20, "", "MASSIVE ERROR: No tradegroup found!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
Player inviter = (Player)invitee.GetZone().FindActorInArea(group.GetHost());
|
||||
|
||||
if (inviter != null)
|
||||
inviter.SendGameMessage(GetActor(), 25038, 0x20); //Your trade request fails
|
||||
|
||||
DeleteTradeGroup(group.groupIndex);
|
||||
}
|
||||
|
||||
public void CompleteTrade(Player p1, Player p2)
|
||||
{
|
||||
if (!p1.IsTradeAccepted() || !p2.IsTradeAccepted())
|
||||
return;
|
||||
|
||||
TradeGroup group = GetTradeGroup(p1.actorId);
|
||||
|
||||
if (group == null)
|
||||
{
|
||||
p1.SendMessage(0x20, "", "MASSIVE ERROR: No tradegroup found!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
ReferencedItemPackage p1Offer = p1.GetTradeOfferings();
|
||||
ReferencedItemPackage p2Offer = p2.GetTradeOfferings();
|
||||
|
||||
int failCode = 0;
|
||||
Player failurePlayerOffer = null;
|
||||
Player failureCauser = null;
|
||||
|
||||
//TODO Add full inventory check
|
||||
|
||||
//Check items. If there is a failcode abort and set.
|
||||
for (ushort i = 0; i < p1Offer.GetCapacity(); i++)
|
||||
{
|
||||
InventoryItem p1ItemToP2 = p1Offer.GetItemAtSlot(i);
|
||||
InventoryItem p2ItemToP1 = p2Offer.GetItemAtSlot(i);
|
||||
|
||||
int failCodeP1 = CheckIfCanTrade(p1, p2, p1ItemToP2); //P2's inv caused a failcode for P1
|
||||
int failCodeP2 = CheckIfCanTrade(p2, p1, p2ItemToP1); //P1's inv caused a failcode for P2
|
||||
|
||||
if (failCodeP1 != 0)
|
||||
{
|
||||
failCode = failCodeP1;
|
||||
failurePlayerOffer = p1;
|
||||
failureCauser = p2;
|
||||
break;
|
||||
}
|
||||
|
||||
if (failCodeP2 != 0)
|
||||
{
|
||||
failCode = failCodeP2;
|
||||
failurePlayerOffer = p2;
|
||||
failureCauser = p1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Do we have a failcode?
|
||||
switch (failCode)
|
||||
{
|
||||
case 1:
|
||||
failurePlayerOffer.SendGameMessage(GetActor(), 25100, 0x20, (object)failureCauser); //Transaction failed. X inventory is either full or X can only hold one of the selected items.
|
||||
failureCauser.SendGameMessage(GetActor(), 25100, 0x20, (object)failureCauser); //Transaction failed. X inventory is either full or X can only hold one of the selected items.
|
||||
break;
|
||||
case 2:
|
||||
failurePlayerOffer.SendGameMessage(GetActor(), 25100, 0x20, (object)failureCauser); //Transaction failed. X inventory is either full or X can only hold one of the selected items.
|
||||
failureCauser.SendGameMessage(GetActor(), 25103, 0x20); //Unable to complete transaction. You can only hold one of the selected items.
|
||||
break;
|
||||
case 3:
|
||||
failurePlayerOffer.SendGameMessage(GetActor(), 25099, 0x20); //Unable to complete transaction.
|
||||
failureCauser.SendGameMessage(GetActor(), 25104, 0x20); //Unable to complete transaction. You cannot receive the incoming payment.
|
||||
break;
|
||||
}
|
||||
|
||||
//If all good, perform the swap.
|
||||
if (failCode == 0)
|
||||
{
|
||||
lock (tradeLock)
|
||||
{
|
||||
for (ushort i = 0; i < p1Offer.GetCapacity(); i++)
|
||||
{
|
||||
InventoryItem p1ItemToP2 = p1Offer.GetItemAtSlot(i);
|
||||
InventoryItem p2ItemToP1 = p2Offer.GetItemAtSlot(i);
|
||||
|
||||
|
||||
//Transfer P1 -> P2
|
||||
if (p1ItemToP2 != null)
|
||||
{
|
||||
/*
|
||||
if (p1ItemToP2.GetItemData().maxStack > 1)
|
||||
{
|
||||
p1.GetItemPackage(p1ItemToP2.itemPackage).RemoveItem(p1ItemToP2.itemId, p1ItemToP2.GetTradeQuantity(), p1ItemToP2.quality);
|
||||
p2.GetItemPackage(p1ItemToP2.itemPackage).AddItem(p1ItemToP2.itemId, p1ItemToP2.GetTradeQuantity(), p1ItemToP2.quality);
|
||||
}
|
||||
else
|
||||
{
|
||||
p1.GetItemPackage(p1ItemToP2.itemPackage).RemoveItem(p1ItemToP2);
|
||||
p2.GetItemPackage(p1ItemToP2.itemPackage).AddItem(p1ItemToP2);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//Transfer P2 -> P1
|
||||
if (p2ItemToP1 != null)
|
||||
{
|
||||
|
||||
/*
|
||||
if (p2ItemToP1.GetItemData().maxStack > 1)
|
||||
{
|
||||
p2.GetItemPackage(p2ItemToP1.itemPackage).RemoveItem(p2ItemToP1.itemId, p2ItemToP1.GetTradeQuantity(), p2ItemToP1.quality);
|
||||
p1.GetItemPackage(p2ItemToP1.itemPackage).AddItem(p2ItemToP1.itemId, p2ItemToP1.GetTradeQuantity(), p2ItemToP1.quality);
|
||||
}
|
||||
else
|
||||
{
|
||||
p2.GetItemPackage(p2ItemToP1.itemPackage).RemoveItem(p2ItemToP1);
|
||||
p1.GetItemPackage(p2ItemToP1.itemPackage).AddItem(p2ItemToP1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
p1.SendGameMessage(GetActor(), 25039, 0x20); //The trade is complete.
|
||||
p2.SendGameMessage(GetActor(), 25039, 0x20); //The trade is complete.
|
||||
}
|
||||
|
||||
//Cleanup the trade and delete the tradegroup.
|
||||
p1.FinishTradeTransaction();
|
||||
p2.FinishTradeTransaction();
|
||||
DeleteTradeGroup(group.groupIndex);
|
||||
}
|
||||
|
||||
private int CheckIfCanTrade(Player itemOwner, Player itemReceiver, InventoryItem item)
|
||||
{
|
||||
if (item == null)
|
||||
return 0;
|
||||
|
||||
//Check if their inventory can't hold all these things
|
||||
if (false)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//Check if they already have a unique
|
||||
else if (item.GetItemData().isRare && itemReceiver.HasItem(item.itemId))
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
//Check if gil is max
|
||||
else if (item.itemId == 100001 && item.dealingAttached3 + itemReceiver.GetCurrentGil() > item.GetItemData().maxStack)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public InventoryItem CreateItem(uint itemId, int amount, byte quality = 1, InventoryItem.ItemModifier modifiers = null)
|
||||
{
|
||||
return Database.CreateItem(itemId, amount, quality, modifiers);
|
||||
}
|
||||
|
||||
public bool BazaarBuyOperation(Player bazaar, Player buyer, InventoryItem itemToBuy, int quantity, int cost)
|
||||
{
|
||||
if (bazaar == null || buyer == null || itemToBuy == null)
|
||||
return false;
|
||||
|
||||
if (quantity <= 0)
|
||||
return false;
|
||||
|
||||
if (cost < 0)
|
||||
return false;
|
||||
|
||||
if (itemToBuy.GetBazaarMode() == InventoryItem.TYPE_SINGLE || itemToBuy.GetBazaarMode() == InventoryItem.TYPE_MULTI || itemToBuy.GetBazaarMode() == InventoryItem.TYPE_STACK)
|
||||
{
|
||||
itemToBuy.ChangeQuantity(-quantity);
|
||||
buyer.AddItem(itemToBuy.itemId, quantity, itemToBuy.quality);
|
||||
buyer.GetItemPackage(ItemPackage.CURRENCY_CRYSTALS).RemoveItem(1000001, cost);
|
||||
}
|
||||
|
||||
if (itemToBuy.quantity == 0)
|
||||
Database.ClearBazaarEntry(bazaar, itemToBuy);
|
||||
|
||||
bazaar.CheckBazaarFlags();
|
||||
|
||||
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)
|
||||
{
|
||||
InventoryItem seekBazaar = bazaar.GetItemPackage(ItemPackage.BAZAAR).GetItemAttachedTo(reward);
|
||||
bazaar.RemoveItem(reward, rewardQuantity);
|
||||
bazaar.RemoveItem(seekBazaar, seekQuantity);
|
||||
bazaar.AddItem(seekBazaar);
|
||||
bazaar.AddItem(seek.itemId, seekQuantity, seek.quality);
|
||||
|
||||
buyer.RemoveItem(seek, seekQuantity);
|
||||
buyer.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;
|
||||
|
||||
if (bazaarMode == InventoryItem.TYPE_SINGLE || bazaarMode == InventoryItem.TYPE_MULTI || bazaarMode == InventoryItem.TYPE_STACK)
|
||||
succ = Database.CreateBazaarEntry(player, reward, seek, rewardAmount, 0, bazaarMode, seekAmount);
|
||||
else
|
||||
succ = Database.CreateBazaarEntry(player, reward, seek, rewardAmount, seekAmount, bazaarMode);
|
||||
|
||||
if (succ)
|
||||
{
|
||||
if (bazaarMode != InventoryItem.TYPE_SINGLE && bazaarMode != InventoryItem.TYPE_MULTI && bazaarMode != InventoryItem.TYPE_STACK)
|
||||
{
|
||||
reward.SetDealingAttached(bazaarMode, seek.uniqueId);
|
||||
seek.SetHasAttached(true);
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).StartSendUpdate();
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).AddItem(reward);
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).AddItem(seek);
|
||||
reward.SetAttachedIndex(ItemPackage.BAZAAR, seek.slot);
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).DoneSendUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
reward.SetDealing(bazaarMode, seekAmount);
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).StartSendUpdate();
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).AddItem(reward);
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).DoneSendUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
player.CheckBazaarFlags();
|
||||
}
|
||||
|
||||
|
||||
public void RemoveFromBazaar(Player player, InventoryItem rewardRef)
|
||||
{
|
||||
ushort attachedItemPackage = (ushort)((rewardRef.dealingAttached1 >> 16) & 0xFF);
|
||||
ushort attachedSlot = (ushort) (rewardRef.dealingAttached1 & 0xFF);
|
||||
|
||||
InventoryItem seekRef = rewardRef.IsSelling() ? null : player.GetItemPackage(attachedItemPackage).GetItemAtSlot(attachedSlot);
|
||||
|
||||
Database.ClearBazaarEntry(player, rewardRef);
|
||||
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).RemoveItem(rewardRef);
|
||||
|
||||
bool isSelling = rewardRef.IsSelling();
|
||||
rewardRef.SetNormal();
|
||||
|
||||
if (seekRef != null)
|
||||
player.GetItemPackage(ItemPackage.BAZAAR).RemoveItem(seekRef);
|
||||
|
||||
player.AddItem(rewardRef);
|
||||
|
||||
if (!isSelling)
|
||||
{
|
||||
seekRef.SetNormal();
|
||||
player.AddItem(seekRef);
|
||||
}
|
||||
|
||||
player.CheckBazaarFlags();
|
||||
}
|
||||
/*
|
||||
public void TransactionBazaar(Player owner, Player other, InventoryItem reward, InventoryItem seek, int rewardAmount, int seekAmount)
|
||||
{
|
||||
Database.ClearBazaarEntry(owner, reward, seek);
|
||||
|
||||
//Remove Bazaar Items from owner
|
||||
owner.GetInventory(Inventory.BAZAAR).RemoveItem(reward);
|
||||
owner.GetInventory(Inventory.BAZAAR).RemoveItem(seek);
|
||||
|
||||
//Remove Seek item from other
|
||||
if (seek.GetItemData().IsMoney())
|
||||
other.GetInventory(Inventory.CURRENCY_CRYSTALS).RemoveItem(seek.itemId, seekAmount);
|
||||
else
|
||||
other.GetInventory(Inventory.NORMAL).RemoveItem(seek.itemId, seekAmount);
|
||||
|
||||
//Add reward to other, seek to owner
|
||||
if (reward.GetItemData().IsMoney())
|
||||
other.GetInventory(Inventory.CURRENCY_CRYSTALS).AddItem(reward.itemId, rewardAmount);
|
||||
else
|
||||
other.GetInventory(Inventory.NORMAL).AddItem(reward);
|
||||
|
||||
if (seek.GetItemData().IsMoney())
|
||||
owner.GetInventory(Inventory.CURRENCY_CRYSTALS).AddItem(seek.itemId, seekAmount);
|
||||
else
|
||||
other.GetInventory(Inventory.NORMAL).AddItem(seek);
|
||||
}*/
|
||||
|
||||
public bool SendGroupInit(Session session, ulong groupId)
|
||||
{
|
||||
if (mContentGroups.ContainsKey(groupId))
|
||||
|
@ -1192,6 +1664,11 @@ namespace FFXIVClassic_Map_Server
|
|||
mContentGroups[groupId].SendInitWorkValues(session);
|
||||
return true;
|
||||
}
|
||||
else if (mTradeGroups.ContainsKey(groupId))
|
||||
{
|
||||
mTradeGroups[groupId].SendInitWorkValues(session);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue