Salvage Material

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Salvage Material

Postby Urza » Thu Sep 09, 2010 4:04 pm

Hi,
Salvage gives back material, which is used only in Albion and Midgard.
Hibernia material is not considered.

Greetings Urza
User avatar
Urza
Developer
 
Posts: 671
Joined: Sun Jan 23, 2005 11:15 am
Website: http://www.juwesch.eu
Location: Germany/Delitzsch

Re: Salvage Material

Postby Urza » Fri Sep 10, 2010 11:34 am

Hi,

suggested solution:

1. add column "Realm" to salvage table
2. change code in salvage.cs (public static int BeginWork(GamePlayer player, InventoryItem item))
old
Code: Select all
DBSalvage material = GameServer.Database.SelectObject<DBSalvage>("ObjectType ='"+item.Object_Type+"' AND SalvageLevel ='"+salvageLevel+"'");

new
Code: Select all
DBSalvage material = GameServer.Database.SelectObject<DBSalvage>("ObjectType ='" + item.Object_Type + "' AND SalvageLevel ='" + salvageLevel + "' AND Realm ='" + item.Realm + "'");

3. add entries for Midgard and Hibernia in salvage table

greetings
Urza
User avatar
Urza
Developer
 
Posts: 671
Joined: Sun Jan 23, 2005 11:15 am
Website: http://www.juwesch.eu
Location: Germany/Delitzsch

Re: Salvage Material

Postby Graveen » Fri Sep 10, 2010 12:08 pm

interesting idea - i think the best is to handle both: a realm 0 is suitable for every realm, while a realm > 0 is realm specific.

This means 2 queries in the code, the realm specific always overwriting the general one if existing, but you only have to enter hibernia materials, add not redo the whole table content (and avoiding the 3, or at least replacing with "add *specific* entries for hibernia")
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Salvage Material

Postby Urza » Sat Sep 11, 2010 6:11 am

Hi, I could choose from the file "serverproperty.cs" also set up.

use_salvage_per_realm(true/false), standard: false

false:
Code: Select all
DBSalvage material = GameServer.Database.SelectObject<DBSalvage>("ObjectType ='"+item.Object_Type+"' AND SalvageLevel ='"+salvageLevel+"'");

true:
Code: Select all
DBSalvage material = GameServer.Database.SelectObject<DBSalvage>("ObjectType ='" + item.Object_Type + "' AND SalvageLevel ='" + salvageLevel + "' AND Realm ='" + item.Realm + "'");


greetings
urza
User avatar
Urza
Developer
 
Posts: 671
Joined: Sun Jan 23, 2005 11:15 am
Website: http://www.juwesch.eu
Location: Germany/Delitzsch

Re: Salvage Material

Postby Sand » Sat Sep 11, 2010 7:10 pm

I see no need for a server property on this, an item should salvage to right mat based on the item, currently we aren't doing that, we are just salvaging to the common metals rather than the appropriate for hib.

So we do need a mechanism to handle reenforced and scale armor and hib weapons, as they need to salvage to strips or the hib version of the metal. I would expect the easiest way to do that is to do so is to check realm flag.

Realm 0 flag would not be on items that are salvagable as it is only armor and weapons that are and they should all have a realm flag on them.

For COOP/pvp, the method to allow other realms is to ignore the realm flag, not have the items be different, because on Gaheris there is still alb and mid chain for example items.
Sand
Server Team
 
Posts: 1375
Joined: Sat May 17, 2008 2:05 am


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest