[Professions 1.9.9.1562] - Level percentage

Posts from previous Beta sessions

[Professions 1.9.9.1562] - Level percentage

Postby Wyren » Mon Feb 11, 2008 4:20 pm

I didn't really like the way the level bars of each profession was calculated as a percentage of each characters current max skill level (75, 150, 225, 300, 375), as it meant a player with 225/225 skill would show with a full bar, while someone with 340/375 would show with a less than full bar, but higher on the table anyhow.

So I added a bit to index.php for the professions addon:
in /roster/addons/professions/guild/index.php at line 106 find:
Code: Select all
// Setup some user row data                 
$level_array explode (':',$row['skill_level']);
$levelpct $level_array[0] / 350 100 ;
settype$levelpct'integer' ); 


And change it to:
Code: Select all
// Setup some user row data                 
$level_array explode (':',$row['skill_level']);
if( 
$skill_name != 'Poisons' )
{
        
$levelpct $level_array[0] / 375 100 ;
}
else
{           
        
$levelpct $level_array[0] / 350 100 ;
}
settype$levelpct'integer' ); 
You might want to add some localization to the $skill_name != 'Poisons' bit, but I just did it the easy way :)

Example of how it looks now: http://roster.treehuggery.org/index.php ... ions&a=g:1
Wyren
WR.net Journeyman
WR.net Journeyman
 
Posts: 81
Joined: Wed Jul 26, 2006 3:07 pm

[Professions 1.9.9.1562] - Level percentage

Postby Subxero » Mon Feb 11, 2008 8:00 pm

You can use "ROSTER_MAXSKILLLEVEL" to get the 375 number ...

Problem.- racial skill increments ?

like BloodElf +10 enchanting not have 375 .. have 385 limit.

For Poisons translation use
$roster->locale->wordings[$row['clientLocale']]['Poisons']

Its not better go to beta forum part ?
Last edited by Subxero on Tue Feb 12, 2008 7:11 am, edited 1 time in total.
Subxero - Priest 70 Holy - Asphelt Knight Officer - Zul'jin Horde.
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

Re: [Professions 1.9.9.1562] - Level percentage

Postby Wyren » Tue Feb 12, 2008 10:02 pm

Subxero wrote:You can use "ROSTER_MAXSKILLLEVEL" to get the 375 number ...

Problem.- racial skill increments ?

like BloodElf +10 enchanting not have 375 .. have 385 limit.
Well, if I use 375 directly, anyone with racials (jc, engi, enchanting etc) will show as a 100% bar with 380/375 etc if maxed out.

Subxero wrote:For Poisons translation use
$roster->locale->wordings[$row['clientLocale']]['Poisons']
Thanks, I'll give that a go and see if it works.

Subxero wrote:Its not better go to beta forum part ?
I was looking for where to post, but didn't find any particular subforum/thread in the beta forum for the addons included in roster 2.0. Feel free to move this thread to the beta forum tho.
Wyren
WR.net Journeyman
WR.net Journeyman
 
Posts: 81
Joined: Wed Jul 26, 2006 3:07 pm

[Professions 1.9.9.1562] - Level percentage

Postby zanix » Wed Feb 13, 2008 1:33 pm

Moved to beta forum
Its an addon maintained by the devs and until there is a sub-forum for it, questions can go here
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Archived

Who is online

Users browsing this forum: No registered users and 1 guest

cron