Account side Item stat names

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Account side Item stat names

Postby elcotek » Fri Sep 23, 2016 10:21 am

Hello dol community :wink:

I work on Languages for my Server,

but i think the actual dol source will need this change too. :!:

I have created an patch for the actual dol source to suppot dol and there Team!

This patch change the serverside language for item [stat names] to Account language [stat names], so your server will display players actual set Languages!

My idea was, to find a way, to display stat names for actual set language of a player, here is my first solution:

This Patch is for the lastest dol source Version: 11680

Sorry for my bad english, but i am very old man :mrgreen:
Attachments
Account Language stat names.patch
Chane the server side language for item stat names to account language.
(181.87 KiB) Downloaded 6 times
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 172
Joined: Mon May 12, 2008 9:28 pm
Location: Germany

Re: Account side Item stat names

Postby elcotek » Fri Sep 23, 2016 10:32 am

i can,t actual use github on my computer so i post this patch!

This patch is live on my server since today!
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 172
Joined: Mon May 12, 2008 9:28 pm
Location: Germany

Re: Account side Item stat names

Postby Graveen » Mon Sep 26, 2016 7:25 am

Yop Elco,
I think i see the point, and thank you for the proposal.
I also see the need of the many serverside language property names.

But honestly i don't think this should be handled as is, every new language is adding an extra dictionnary.
Perhaps best 'd be to add a new Dictionnary <lang, propertyname> instead.

I'll try to free time to help you about this.

For github, do you need help to use it / install it ?

/worship,
Grav'
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12613
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Account side Item stat names

Postby Blue » Mon Sep 26, 2016 2:46 pm

I propose instead saving the translation you can save the phrase key.
Instead:
Code: Select all
m_propertyNamesFR.Add(eProperty.StyleCostReduction, LanguageMgr.GetTranslation("FR", "SkillBase.RegisterPropertyNames.StyleCostReduction"));

Save the key:
Code: Select all
m_propertyNames.Add(eProperty.StyleCostReduction, "SkillBase.RegisterPropertyNames.StyleCostReduction");


Even more generic would be to determine the phrasekey on the fly like
Code: Select all
string key = "SkillBase.RegisterPropertyNames." + property;

Then you'll save to register each property one by one. The Translator itself cares about resolving the phrase key for a certain client language.

If you still want to register each property you can also iterate over all properties and solve it programmatic, so you don't have to write each and every property registration yourself:
Code: Select all
foreach (var property in Enum.GetValues(typeof(eProperty))) {
   ... register the property ...
}
ex DOL Lead Developer
User avatar
Blue
Uthgard Admin
 
Posts: 961
Joined: Wed Jan 21, 2004 11:07 pm

Re: Account side Item stat names

Postby elcotek » Tue Sep 27, 2016 11:33 am

Hello Blue, :)

The idea is good and i test your implementation, if i have more time.

As next step, we need to move all static txt files in code into db.
After that, we can easly implement new languages and add or edit them from there. :wink:
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 172
Joined: Mon May 12, 2008 9:28 pm
Location: Germany


Return to DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest