feat: add ContainerId to MyWorldObject for inventory tracking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
725bbf473f
commit
ce0fae7d10
2 changed files with 3 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ namespace Mag.Shared
|
||||||
public int LastIdTime;
|
public int LastIdTime;
|
||||||
public int ObjectClass;
|
public int ObjectClass;
|
||||||
public int Icon;
|
public int Icon;
|
||||||
|
public int ContainerId;
|
||||||
|
|
||||||
public SerializableDictionary<int, bool> BoolValues = new SerializableDictionary<int, bool>();
|
public SerializableDictionary<int, bool> BoolValues = new SerializableDictionary<int, bool>();
|
||||||
public SerializableDictionary<int, double> DoubleValues = new SerializableDictionary<int, double>();
|
public SerializableDictionary<int, double> DoubleValues = new SerializableDictionary<int, double>();
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ namespace Mag.Shared
|
||||||
spells.Add(wo.Spell(i));
|
spells.Add(wo.Spell(i));
|
||||||
|
|
||||||
mwo.Init(wo.HasIdData, wo.Id, wo.LastIdTime, (int)wo.ObjectClass, wo.Icon, boolValues, doubleValues, intValues, stringValues, activeSpells, spells);
|
mwo.Init(wo.HasIdData, wo.Id, wo.LastIdTime, (int)wo.ObjectClass, wo.Icon, boolValues, doubleValues, intValues, stringValues, activeSpells, spells);
|
||||||
|
mwo.ContainerId = wo.Container;
|
||||||
|
|
||||||
return mwo;
|
return mwo;
|
||||||
}
|
}
|
||||||
|
|
@ -54,6 +55,7 @@ namespace Mag.Shared
|
||||||
MyWorldObject mwo = Create(newer);
|
MyWorldObject mwo = Create(newer);
|
||||||
|
|
||||||
older.AddTo(mwo.BoolValues, mwo.DoubleValues, mwo.IntValues, mwo.StringValues);
|
older.AddTo(mwo.BoolValues, mwo.DoubleValues, mwo.IntValues, mwo.StringValues);
|
||||||
|
older.ContainerId = newer.Container;
|
||||||
|
|
||||||
return older;
|
return older;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue