[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Item tooltips with Gem Sockets and Enchantment coloring

Moderator: ds

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby ds » Thu Mar 01, 2007 11:11 am

[Fixed] Debug logic (don't drink and write code).
[Fixed] Tooltips will now display correctly if no ItemID is passed.
Attachments
ds_tooltip_mod_v1.4.zip
More bug fixes.
(29.05 KiB) Downloaded 673 times
Image
ds
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 297
Joined: Sat Jul 08, 2006 9:58 am

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby Diska » Fri Mar 02, 2007 9:39 am

Working as intended, great stuff :)
User avatar
Diska
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 179
Joined: Tue Jul 04, 2006 2:05 pm

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby Subxero » Fri Mar 02, 2007 9:31 pm

I found a little problem

on tooltips from gems

"Matches a Yellow Socket." its show the yellow square same on
"Matches a Red Socket."
"Matches a Blue Socket."

But on

"Matches a Blue or Yellow Socket." only shows the yellow square not blue.
same with
"Matches a Yellow or Blue Socket."
"Matches a Red or Yellow Socket."
"Matches a Yellow or Red Socket."
"Matches a Red or Blue Socket."

And dont show nothing on
"Only fits in a meta gem slot."

Its licit show gem socket images on these comments ?
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: [1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby ds » Sat Mar 03, 2007 1:34 am

Subxero wrote:I found a little problem

on tooltips from gems

"Matches a Yellow Socket." its show the yellow square same on
"Matches a Red Socket."
"Matches a Blue Socket."

But on

"Matches a Blue or Yellow Socket." only shows the yellow square not blue.
same with
"Matches a Yellow or Blue Socket."
"Matches a Red or Yellow Socket."
"Matches a Yellow or Red Socket."
"Matches a Red or Blue Socket."

And dont show nothing on
"Only fits in a meta gem slot."

Its licit show gem socket images on these comments ?


Oooh.. good catch! To fix this bug edit the file:
lib/commonfunctions.lib.php
line ~591:
FIND
Code: Select all
                        elseif (preg_match('/(Yellow|Blue|Red|Meta)\sSocket/', $line))


CHANGE TO:
Code: Select all
                        elseif (preg_match('/^(Yellow|Blue|Red|Meta)\sSocket/', $line))
Image
ds
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 297
Joined: Sat Jul 08, 2006 9:58 am

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby SethDeBlade » Tue Mar 06, 2007 1:27 pm

as the german translation is in progress i found out that the socket image is not shown for german items if the socket is empty. I think this is because your mod is looking for "Red Socket" and not "Roter Sockel"

Therefor i changed the commonfunctions.lib.php a little bit but i think there is a better way to make that work.
find
Code: Select all
         elseif (preg_match('/^(Yellow|Blue|Red|Meta)\sSocket/', $line))
         {
            $tooltip_out[] = preg_replace('/(Yellow|Blue|Red|Meta)\sSocket/', '<img src="'.$roster_conf['interface_url'].'Interface/ItemSocketingFrame/UI-EmptySocket-$1.'.$roster_conf['img_suffix'].'">  $1 Socket', $line).'<br />';
         }


and after add
Code: Select all
         elseif (preg_match('/^(Gelber|Blauer|Roter|Meta)\sSockel/', $line))
         {
            $tooltip_out[] = preg_replace('/(Gelber|Blauer|Roter|Meta)\sSockel/', '<img src="'.$roster_conf['interface_url'].'Interface/ItemSocketingFrame/UI-EmptySocket-$1.'.$roster_conf['img_suffix'].'">  $1 Sockel', $line).'<br />';
         }


Now you have to copy the three images
UI-EmptySocket-Blue -> UI-EmptySocket-Blauer
UI-EmptySocket-Red -> UI-EmptySocket-Roter
UI-EmptySocket-Yellow -> UI-EmptySocket-Gelber
upload them and it works.

I really dont know much about php so i think that you might find a more elegant way to "fix" that ;)
User avatar
SethDeBlade
WR.net Expert
WR.net Expert
 
Posts: 192
Joined: Thu Jul 06, 2006 1:02 am
Location: Germany

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby Efryse » Tue Mar 06, 2007 2:41 pm

Your "hotfix" doesn't work with Meta Sockets in the german version, Sethdeblade. This is because the word is used is "Metasockel" and not "Meta Sockel". Just noticed because my Char has an empty metasocket (thanks Blizzard vor making the meta socket bought at Alleria's unique). I will see, what I can do about this, but could be a little more code than two lines ;).
Efryse
WR.net Apprentice
WR.net Apprentice
 
Posts: 35
Joined: Tue Jan 16, 2007 3:44 am

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby SethDeBlade » Tue Mar 06, 2007 2:47 pm

just make another elseif for metasockel ;)
User avatar
SethDeBlade
WR.net Expert
WR.net Expert
 
Posts: 192
Joined: Thu Jul 06, 2006 1:02 am
Location: Germany

Re: [1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby Efryse » Fri Mar 09, 2007 9:01 am

SethDeBlade wrote:just make another elseif for metasockel ;)


Hm, quite easy and it works:
Code: Select all
elseif (preg_match('/^Metasockel/'$line))        
{
    
$tooltip_out[] = preg_replace('/Metasockel/''<img src="'.$roster_conf['interface_url'].'Interface/ItemSocketingFrame/UI-EmptySocket-Meta.'.$roster_conf['img_suffix'].'">  Metasockel'$line).'<br />';
Efryse
WR.net Apprentice
WR.net Apprentice
 
Posts: 35
Joined: Tue Jan 16, 2007 3:44 am

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby spaceduke » Fri Mar 16, 2007 11:57 am

I'm missing some ID's:

gem id: 2741
gem id: 2835

Where can I add those?

btw... Great addon!! :)

edit:

I found it: I added the following lines to WoW_IDs.php

Code: Select all
'2741' => array // added by Spacedrood
(
'name' => 'Royal Nightseye',
'txt'  => '+9 Healing Spells and +2 Mana every 5 seconds',
'img'  => 'INV_Jewelcrafting_Nightseye_03',
),
'2835' => array // added by Spacedrood
(
'name' => 'Insightful Earthstorm Diamond',
'txt'  => '+12 Intellect & Chance to restore mana on spellcast',
'img'  => 'INV_Misc_Gem_Diamond_06',
),
Last edited by spaceduke on Fri Mar 16, 2007 2:26 pm, edited 1 time in total.
spaceduke
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Tue Dec 19, 2006 3:49 pm

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby Subxero » Sat Mar 17, 2007 12:44 pm

spaceduke better follow the forms that ds001 use.

http://wowroster.net/Forums/viewtopic/t=2928.html
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby Woopaz » Fri Apr 20, 2007 2:20 am

i just uploaded this mod - it seems that shoulder enchants are colored, but still show up in white. (like the Aldor/Scryer enchants)
Woopaz
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Fri Apr 13, 2007 11:29 am

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby Subxero » Sun Apr 22, 2007 10:14 am

Woopaz: You have updated with last wow_id revision ?

like http://wowroster.net/Forums/viewtopic/t=3375.html

Ds001 i think get another bug.. on items with 3 slots and the first two emptys the gem from the last slot don't show correct image and color only "white text description". But the same gem_id in another item getting all slots full show fine ON SAME CHARACTER.

items are:

head: Evoker's Helmet of Second Sight
only last slot used with "Radiant Deep Peridot" id 2762 and the other slots free.

feet: Shattrath Jumpers
with 2 gems "Radiant Deep Peridot" id 2762

You can try to make the same "items" and slots config to debug ..

on html code dont show the image or color.. only plan text
Code: Select all
"<span style=\"color:#0070dd;font-size:12px;font-weight:bold;\">Evoker\'s Helmet of Second Sight<\/span><br \/><span style=\"color:#00bbff;\">Soulbound<\/span><br \/><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"overlib_maintext\">Head<\/td><td align=\"right\" class=\"overlib_maintext\">Cloth<\/td><\/tr><\/table>120 Armor<br \/>+12 Stamina<br \/>+15 Intellect<br \/>+8 Spirit<br \/><img src=\"../images/Interface/ItemSocketingFrame/UI-EmptySocket-Blue.jpg\">  Blue Socket<br \/><img src=\"../images/Interface/ItemSocketingFrame/UI-EmptySocket-Blue.jpg\">  Blue Socket<br \/>+3 Spell Critical Rating and +4 Spell Penetration<br \/>Socket Bonus: +5 Spell Damage<br \/>Durability 25 / 50<br \/><span style=\"color:#00ff00;\">Equip: Improves spell critical strike rating by 24.<\/span><br \/><span style=\"color:#00ff00;\">Equip: Increases damage and healing done by magical spells and effects by up to 39.<\/span><br \/><span style=\"color:#00ff00;\">Equip: Allows the bearer to see into the ghost world of Shadowmoon Valley. Only effective in Shadowmoon Valley.<\/span><br \/><br \/>";


correct tooltip from boots and same gems on same char
Code: Select all
"<span style=\"color:#0070dd;font-size:12px;font-weight:bold;\">Shattrath Jumpers<\/span><br \/><span style=\"color:#00bbff;\">Soulbound<\/span><br \/><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"overlib_maintext\">Feet<\/td><td align=\"right\" class=\"overlib_maintext\">Cloth<\/td><\/tr><\/table>107 Armor<br \/>+25 Stamina<br \/>+17 Intellect<br \/><img width=\"16px\" height=\"16px\" src=\"../images/Interface/Icons/INV_Misc_Gem_DeepPeridot_02.jpg\" alt=\"\" \/><span style=\"color:#00ff00;\">  +3 Spell Critical Rating and +4 Spell Penetration<\/span><br \/><img width=\"16px\" height=\"16px\" src=\"../images/Interface/Icons/INV_Misc_Gem_DeepPeridot_02.jpg\" alt=\"\" \/><span style=\"color:#00ff00;\">  +3 Spell Critical Rating and +4 Spell Penetration<\/span><br \/>Socket Bonus: +3 Intellect<br \/>Durability 18 / 40<br \/><span style=\"color:#00ff00;\">Equip: Increases damage and healing done by magical spells and effects by up to 29.<\/span><br \/><br \/>";
Last edited by Subxero on Sun Apr 22, 2007 10:20 am, edited 1 time in total.
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

[1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby Subxero » Mon Apr 23, 2007 4:43 am

Same with items with 3 slots and the first one empty ...

The parse stops on first empty and dont take care of nexts slots.

Sugestion to make more realistic :D
The color of socket bonus: green when its correct gems color and grey on not correct ?
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: [1.7.3] Roster Tooltip Mod for Gems and Enchants (v1.4)

Postby ds » Tue Apr 24, 2007 2:00 am

Subxero wrote:Same with items with 3 slots and the first one empty ...

The parse stops on first empty and dont take care of nexts slots.

Sugestion to make more realistic :D
The color of socket bonus: green when its correct gems color and grey on not correct ?


Fixed this issue in v1.5 of the Mod. Find the download in it's own thread here.

Locking this topic because it is now outdated.
Image
ds
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 297
Joined: Sat Jul 08, 2006 9:58 am


Return to Gem Sockets and Enchants (Roster Tooltip Mod)

Who is online

Users browsing this forum: No registered users and 0 guests

cron