Fixed new positions after realignment not saving. Fixed Dealer info not clearing from the db sometimes.

This commit is contained in:
Filip Maj committed 2019-06-08 14:46:19 -04:00
1 parent e91960040c
commit a07aa12783
4 files changed
+67 -3

No files matched your search

@@ -271,6 +271,9 @@ namespace FFXIVClassic_Map_Server.dataobjects
public void SetNormal()
{
if (dealingMode != 0 || tags[0] == TAG_ATTACHED)
Database.ClearDealingInfo(this);
tags[0] = 0;
tagValues[0] = 0;
dealingVal = 0;
@@ -319,6 +322,18 @@ namespace FFXIVClassic_Map_Server.dataobjects
Database.SetDealingInfo(this);
}
public void UpdateOfferedSlot(ushort delta)
{
if (dealingMode == DEALINGMODE_REFERENCED)
{
ushort attachedItemPackage = (ushort)((dealingAttached1 >> 16) & 0xFF);
ushort attachedSlot = (ushort)(dealingAttached1 & 0xFF);
attachedSlot -= delta;
dealingAttached1 = ((attachedItemPackage << 16) | attachedSlot);
Database.SetDealingInfo(this);
}
}
protected void SetSeeking()
{
tags[0] = TAG_ATTACHED;