The first time you get either item, it fails to display them and shoves a bunch of errors in the server log. If you log out and back in again, it will show a single stack of the items and work fine from that point forward. I suspect what is happening is that it's trying to add six stacks of 10 into inventory at once rather than adding the first stack and increasing the count on it for the remaining five.
One mob dropping multiple stacks at once rather than one stack with a higher count is probably the issue here. Changing the ExclusivePriority from 0 to 1 didn't appear to change the behaviour at all. The mobs I'm testing on don't have either glass or scales in their loottemplate entries. They have dropcount set to 1 in mobxloottemplate.
Here is one of the clusters of errors, with the columns in the queries cut out for length. I'm seeing these in batches of five in under a second, so the first stack added doesn't seem to be leaving them.
- Code: Select all
2017-03-14 15:25:33,043 - [RegionTime2] - ERROR - DOL.Database.Handlers.MySQLObjectDatabase - ExecuteNonQueryImpl: Constraint Violation for raw query "INSERT INTO `ItemTemplate` (...) VALUES(...)" MySql.Data.MySqlClient.MySqlException (0x80004005): Duplicate entry 'atlanteanglass' for key 'PRIMARY' at MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId) at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at DOL.Database.Handlers.MySQLObjectDatabase.ExecuteNonQueryImpl(String SQLCommand, IEnumerable`1 parameters) at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at DOL.Database.Handlers.MySQLObjectDatabase.ExecuteNonQueryImpl(String SQLCommand, IEnumerable`1 parameters) at DOL.Database.SQLObjectDatabase.AddObjectImpl(DataTableHandler tableHandler, IEnumerable`1 dataObjects) at DOL.Database.ObjectDatabase.SaveObjectRelations(DataTableHandler tableHandler, IEnumerable`1 dataObjects) at DOL.Database.ObjectDatabase.AddObject(IEnumerable`1 dataObjects) at DOL.Database.ObjectDatabase.AddObject(DataObject dataObject) at DOL.GS.GamePlayerInventory.AddItem(eInventorySlot slot, InventoryItem item, Boolean addObject) at DOL.GS.GamePlayerInventory.AddItem(eInventorySlot slot, InventoryItem item) at DOL.GS.GameLivingInventory.AddTemplate(InventoryItem sourceItem, Int32 count, eInventorySlot minSlot, eInventorySlot maxSlot) at DOL.GS.GamePlayer.PickupObject(GameObject floorObject, Boolean checkRange) at DOL.GS.GameNPC.DropLoot(GameObject killer) at DOL.GS.GameNPC.Die(GameObject killer) at DOL.GS.GameLiving.TakeDamage(GameObject source, eDamageType damageType, Int32 damageAmount, Int32 criticalAmount) at DOL.GS.GameObject.TakeDamage(AttackData ad) at DOL.GS.GameLiving.DealDamage(AttackData ad) at DOL.GS.Spells.SpellHandler.DamageTarget(AttackData ad, Boolean showEffectAnimation, Int32 attackResult) at DOL.GS.Spells.SpellHandler.DamageTarget(AttackData ad, Boolean showEffectAnimation) at DOL.GS.Spells.DirectDamageSpellHandler.DealDamage(GameLiving target, Double effectiveness) at DOL.GS.Spells.DirectDamageSpellHandler.OnDirectEffect(GameLiving target, Double effectiveness) at DOL.GS.Spells.SpellHandler.ApplyEffectOnTarget(GameLiving target, Double effectiveness) at DOL.GS.Spells.SpellHandler.StartSpell(GameLiving target) at DOL.GS.Spells.SpellHandler.FinishSpellCast(GameLiving target) at DOL.GS.Spells.DirectDamageSpellHandler.FinishSpellCast(GameLiving target) at DOL.GS.Spells.SpellHandler.DelayedCastTimer.OnTick() at DOL.GS.GameTimer.TimeManager.TimeThread() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 2017-03-14 15:25:33,046 - [RegionTime2] - ERROR - DOL.Database.ObjectDatabase - Error adding data object into ItemTemplate Object = DataObject: ItemTemplate, ObjectId{f24b8562-fe9b-4193-8bc5-368a7200eb1f} Query = INSERT INTO `ItemTemplate` (...) VALUES(...) 2017-03-14 15:25:33,047 - [RegionTime2] - ERROR - DOL.Database.ObjectDatabase - SaveObjectRelations: Adding Relation (DOL.Database.ItemTemplate) of DataObject (DataObject: Inventory, ObjectId{fb2f7571-c09d-4bb7-9cfe-199bfbab84cb}, Name{Atlantean Glass}, OwnerID{fad99f32-3e4a-4a13-997b-aa369dc5ea7d}, SlotPosition{46}, Count{10}) failed for Object (DataObject: ItemTemplate, ObjectId{f24b8562-fe9b-4193-8bc5-368a7200eb1f}) 2017-03-14 15:25:33,048 - [RegionTime2] - ERROR - DOL.GS.GamePlayerInventory - Error adding item atlanteanglass:Atlantean Glass for player Vampiir into the database during AddItem!