LootGenerator and aurulite

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

LootGenerator and aurulite

Postby bsnow16 » Sun Apr 30, 2017 3:31 am

i was wondering if some could help me....i put aurulite in the lootgenerator table and it drops but my character gets this error... Error adding item to database.item may be lost!

that happens when it drops aurulite...any suggestions?

Edit## i dunno what happened i restarted the server testing other things and now its in my inventory...:)
Last edited by bsnow16 on Tue May 09, 2017 2:49 am, edited 1 time in total.
User avatar
bsnow16
DOL Initiate
 
Posts: 23
Joined: Wed Mar 28, 2007 12:10 am
Location: Canada

Re: LootGenerator and aurulite[solved]

Postby PlanarChaosRvrtwo » Sun Apr 30, 2017 7:34 am

If you change something in db its not loaded into cach (forgot exactly typing of word) but that is something like an temporary DB created on server start to apply such changes to game you need reboot then it work.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: LootGenerator and aurulite

Postby bsnow16 » Tue May 09, 2017 2:51 am

I thought it was solved but it seems when a player first loots aurulite into inventory this error happens and nothing is in the inventory but if i log to character screen and back in then it appears in inventory

this is the error i get on gameserver console:
Code: Select all
2017-05-09 00:18:07,547 - [RegionTime2] - ERROR - DOL.Database.Handlers.MySQLObjectDatabase - ExecuteNonQueryImpl: Constraint Violation for raw query "INSERT INTO `ItemTemplate` (`Id_nb`, `TranslationId`, `Name`, `ExamineArticle`, `MessageArticle`, `Level`, `Durability`, `MaxDurability`, `IsNotLosingDur`, `Condition`, `MaxCondition`, `Quality`, `DPS_AF`, `SPD_ABS`, `Hand`, `Type_Damage`, `Object_Type`, `Item_Type`, `Color`, `Emblem`, `Effect`, `Weight`, `Model`, `Extension`, `Bonus`, `Bonus1`, `Bonus2`, `Bonus3`, `Bonus4`, `Bonus5`, `Bonus6`, `Bonus7`, `Bonus8`, `Bonus9`, `Bonus10`, `ExtraBonus`, `Bonus1Type`, `Bonus2Type`, `Bonus3Type`, `Bonus4Type`, `Bonus5Type`, `Bonus6Type`, `Bonus7Type`, `Bonus8Type`, `Bonus9Type`, `Bonus10Type`, `ExtraBonusType`, `CanUseEvery`, `SpellID`, `Charges`, `MaxCharges`, `SpellID1`, `Charges1`, `MaxCharges1`, `ProcChance`, `ProcSpellID`, `ProcSpellID1`, `PoisonSpellID`, `PoisonCharges`, `PoisonMaxCharges`, `IsPickable`, `IsDropable`, `CanDropAsLoot`, `IsTradable`, `Price`, `MaxCount`, `IsIndestructible`, `PackSize`, `Realm`, `AllowedClasses`, `Flags`, `BonusLevel`, `LevelRequirement`, `PackageID`, `Description`, `ClassType`, `SalvageYieldID`, `LastTimeRowUpdated`, `ItemTemplate_ID`) VALUES(@Id_nb, @TranslationId, @Name, @ExamineArticle, @MessageArticle, @Level, @Durability, @MaxDurability, @IsNotLosingDur, @Condition, @MaxCondition, @Quality, @DPS_AF, @SPD_ABS, @Hand, @Type_Damage, @Object_Type, @Item_Type, @Color, @Emblem, @Effect, @Weight, @Model, @Extension, @Bonus, @Bonus1, @Bonus2, @Bonus3, @Bonus4, @Bonus5, @Bonus6, @Bonus7, @Bonus8, @Bonus9, @Bonus10, @ExtraBonus, @Bonus1Type, @Bonus2Type, @Bonus3Type, @Bonus4Type, @Bonus5Type, @Bonus6Type, @Bonus7Type, @Bonus8Type, @Bonus9Type, @Bonus10Type, @ExtraBonusType, @CanUseEvery, @SpellID, @Charges, @MaxCharges, @SpellID1, @Charges1, @MaxCharges1, @ProcChance, @ProcSpellID, @ProcSpellID1, @PoisonSpellID, @PoisonCharges, @PoisonMaxCharges, @IsPickable, @IsDropable, @CanDropAsLoot, @IsTradable, @Price, @MaxCount, @IsIndestructible, @PackSize, @Realm, @AllowedClasses, @Flags, @BonusLevel, @LevelRequirement, @PackageID, @Description, @ClassType, @SalvageYieldID, @LastTimeRowUpdated, @ItemTemplate_ID)" MySql.Data.MySqlClient.MySqlException (0x80004005): Duplicate entry 'aurulite' 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) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\DOLDatabase\Handlers\MySQLObjectDatabase.cs:line 593 at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at DOL.Database.Handlers.MySQLObjectDatabase.ExecuteNonQueryImpl(String SQLCommand, IEnumerable`1 parameters) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\DOLDatabase\Handlers\MySQLObjectDatabase.cs:line 602 at DOL.Database.SQLObjectDatabase.AddObjectImpl(DataTableHandler tableHandler, IEnumerable`1 dataObjects) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\DOLDatabase\SQLObjectDatabase.cs:line 184 at DOL.Database.ObjectDatabase.SaveObjectRelations(DataTableHandler tableHandler, IEnumerable`1 dataObjects) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\DOLDatabase\ObjectDatabase.cs:line 370 at DOL.Database.ObjectDatabase.AddObject(IEnumerable`1 dataObjects) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\DOLDatabase\ObjectDatabase.cs:line 153 at DOL.Database.ObjectDatabase.AddObject(DataObject dataObject) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\DOLDatabase\ObjectDatabase.cs:line 103 at DOL.GS.GamePlayerInventory.AddItem(eInventorySlot slot, InventoryItem item, Boolean addObject) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameutils\GamePlayerInventory.cs:line 332 at DOL.GS.GamePlayerInventory.AddItem(eInventorySlot slot, InventoryItem item) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameutils\GamePlayerInventory.cs:line 303 at DOL.GS.GameLivingInventory.AddTemplate(InventoryItem sourceItem, Int32 count, eInventorySlot minSlot, eInventorySlot maxSlot) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameutils\GameLivingInventory.cs:line 1004 at DOL.GS.GamePlayer.PickupObject(GameObject floorObject, Boolean checkRange) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameobjects\GamePlayer.cs:line 11887 at DOL.GS.GameNPC.DropLoot(GameObject killer) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameobjects\GameNPC.cs:line 4645 at DOL.GS.GameNPC.Die(GameObject killer) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameobjects\GameNPC.cs:line 4015 at DOL.GS.GameLiving.TakeDamage(GameObject source, eDamageType damageType, Int32 damageAmount, Int32 criticalAmount) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameobjects\GameLiving.cs:line 4071 at DOL.GS.GameObject.TakeDamage(AttackData ad) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameobjects\GameObject.cs:line 1099 at DOL.GS.GameLiving.DealDamage(AttackData ad) in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameobjects\GameLiving.cs:line 4196 at DOL.GS.GameLiving.WeaponOnTargetAction.OnTick() in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameobjects\GameLiving.cs:line 2738 at DOL.GS.GameTimer.TimeManager.TimeThread() in C:\Users\Brian\Desktop\DOLSharp-1.9.7.3611\GameServer\gameutils\GameTimer.cs:line 883 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-05-09 00:18:07,563 - [RegionTime2] - ERROR - DOL.Database.ObjectDatabase - Error adding data object into ItemTemplate Object = DataObject: ItemTemplate, ObjectId{2b7a450a-4aa0-4734-8f61-ef3d1da2d66c} Query = INSERT INTO `ItemTemplate` (`Id_nb`, `TranslationId`, `Name`, `ExamineArticle`, `MessageArticle`, `Level`, `Durability`, `MaxDurability`, `IsNotLosingDur`, `Condition`, `MaxCondition`, `Quality`, `DPS_AF`, `SPD_ABS`, `Hand`, `Type_Damage`, `Object_Type`, `Item_Type`, `Color`, `Emblem`, `Effect`, `Weight`, `Model`, `Extension`, `Bonus`, `Bonus1`, `Bonus2`, `Bonus3`, `Bonus4`, `Bonus5`, `Bonus6`, `Bonus7`, `Bonus8`, `Bonus9`, `Bonus10`, `ExtraBonus`, `Bonus1Type`, `Bonus2Type`, `Bonus3Type`, `Bonus4Type`, `Bonus5Type`, `Bonus6Type`, `Bonus7Type`, `Bonus8Type`, `Bonus9Type`, `Bonus10Type`, `ExtraBonusType`, `CanUseEvery`, `SpellID`, `Charges`, `MaxCharges`, `SpellID1`, `Charges1`, `MaxCharges1`, `ProcChance`, `ProcSpellID`, `ProcSpellID1`, `PoisonSpellID`, `PoisonCharges`, `PoisonMaxCharges`, `IsPickable`, `IsDropable`, `CanDropAsLoot`, `IsTradable`, `Price`, `MaxCount`, `IsIndestructible`, `PackSize`, `Realm`, `AllowedClasses`, `Flags`, `BonusLevel`, `LevelRequirement`, `PackageID`, `Description`, `ClassType`, `SalvageYieldID`, `LastTimeRowUpdated`, `ItemTemplate_ID`) VALUES(@Id_nb, @TranslationId, @Name, @ExamineArticle, @MessageArticle, @Level, @Durability, @MaxDurability, @IsNotLosingDur, @Condition, @MaxCondition, @Quality, @DPS_AF, @SPD_ABS, @Hand, @Type_Damage, @Object_Type, @Item_Type, @Color, @Emblem, @Effect, @Weight, @Model, @Extension, @Bonus, @Bonus1, @Bonus2, @Bonus3, @Bonus4, @Bonus5, @Bonus6, @Bonus7, @Bonus8, @Bonus9, @Bonus10, @ExtraBonus, @Bonus1Type, @Bonus2Type, @Bonus3Type, @Bonus4Type, @Bonus5Type, @Bonus6Type, @Bonus7Type, @Bonus8Type, @Bonus9Type, @Bonus10Type, @ExtraBonusType, @CanUseEvery, @SpellID, @Charges, @MaxCharges, @SpellID1, @Charges1, @MaxCharges1, @ProcChance, @ProcSpellID, @ProcSpellID1, @PoisonSpellID, @PoisonCharges, @PoisonMaxCharges, @IsPickable, @IsDropable, @CanDropAsLoot, @IsTradable, @Price, @MaxCount, @IsIndestructible, @PackSize, @Realm, @AllowedClasses, @Flags, @BonusLevel, @LevelRequirement, @PackageID, @Description, @ClassType, @SalvageYieldID, @LastTimeRowUpdated, @ItemTemplate_ID) 2017-05-09 00:18:07,563 - [RegionTime2] - ERROR - DOL.Database.ObjectDatabase - SaveObjectRelations: Adding Relation (DOL.Database.ItemTemplate) of DataObject (DataObject: Inventory, ObjectId{3746cb27-0f24-438f-82c3-18802e5d17df}, Name{aurulite}, OwnerID{cc81635e-0c96-45fb-bd92-87433a49332d}, SlotPosition{42}, Count{1}) failed for Object (DataObject: ItemTemplate, ObjectId{2b7a450a-4aa0-4734-8f61-ef3d1da2d66c}) 2017-05-09 00:18:07,563 - [RegionTime2] - ERROR - DOL.GS.GamePlayerInventory - Error adding item aurulite:aurulite for player Dwarvenlove into the database during AddItem!
User avatar
bsnow16
DOL Initiate
 
Posts: 23
Joined: Wed Mar 28, 2007 12:10 am
Location: Canada

Re: LootGenerator and aurulite

Postby bsnow16 » Tue May 09, 2017 4:13 pm

I know the error is a primary duplicate key but how do i fix it?? Any suggestions?
User avatar
bsnow16
DOL Initiate
 
Posts: 23
Joined: Wed Mar 28, 2007 12:10 am
Location: Canada

Re: LootGenerator and aurulite

Postby PlanarChaosRvrtwo » Tue May 09, 2017 4:30 pm

search for the primary key aurulite and rename the primary key of one of both (ItemTemplate_ID)
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: LootGenerator and aurulite

Postby ontheDOL » Tue May 09, 2017 7:34 pm

no loot for Dwarvenlove!
search for the primary key aurulite and rename the primary key of one of both (ItemTemplate_ID)
I dont think renaming it will work because
Code: Select all
public static ItemTemplate m_aurulite = GameServer.Database.FindObjectByKey<ItemTemplate>("aurulite");
looks for in_db "aurulite"

This mySQL side of the code I don't know much about, but if I had to guess i'd say its because it's an old script that needs adjustments for the new SQL database handlers. Maybe its this line here
Code: Select all
ItemTemplate aurulite = new ItemTemplate(m_aurulite);
which it tries to create a new template with the stacksize listed below it, with the same In_db. :?: (maybe, i dunnno, just guessing)
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: LootGenerator and aurulite

Postby PlanarChaosRvrtwo » Tue May 09, 2017 7:44 pm

Oh you are right ontheDOL but i meant ether rename the insert script (In_db) or change the one in DB for that in_db.
But thanks you pointed one fact i overlooked i said ItemTemplate_ID and that is secondary key not pirmary key.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: LootGenerator and aurulite

Postby bsnow16 » Tue May 09, 2017 8:15 pm

You both gonna be online for acouple more hours i wanna try to fix this tonight?
User avatar
bsnow16
DOL Initiate
 
Posts: 23
Joined: Wed Mar 28, 2007 12:10 am
Location: Canada

Re: LootGenerator and aurulite

Postby PlanarChaosRvrtwo » Tue May 09, 2017 8:31 pm

sure and if you wanna we can even try to fix it via teamviewer^^
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: LootGenerator and aurulite

Postby bsnow16 » Tue May 09, 2017 8:34 pm

Sounds good i will be home in 2 hours :)
User avatar
bsnow16
DOL Initiate
 
Posts: 23
Joined: Wed Mar 28, 2007 12:10 am
Location: Canada

Re: LootGenerator and aurulite

Postby ontheDOL » Tue May 09, 2017 9:42 pm

try looking at other loot gens as well. There is some darkness falls loot gens somewhere here on the forum for example. They could have clues as to what you need to change
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: LootGenerator and aurulite

Postby PlanarChaosRvrtwo » Wed May 10, 2017 1:25 am

You were fully right we did the fix with deleting:
ItemTemplate aurulite = new ItemTemplate(m_aurulite);
line and also by rename:
public static ItemTemplate m_aurulite = GameServer.Database.FindObjectByKey<ItemTemplate>("aurulite");
to:
public static ItemTemplate aurulite = GameServer.Database.FindObjectByKey<ItemTemplate>("aurulite");
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest