Moderator: titan99
The jewelcrafting UI now has gems split up by color so it is easier to find gems of a specific color to create.
$Gem_info['enUS']['type']['blue']="Blue";
$Gem_info['enUS']['type']['red']="Red";
$Gem_info['enUS']['type']['yellow']="Yellow";
$Gem_info['enUS']['type']['meta']="meta";
$Gem_info['enUS']['type']['blue']="Blue";
$Gem_info['enUS']['type']['red']="Red";
$Gem_info['enUS']['type']['yellow']="Yellow";
$Gem_info['enUS']['type']['green']="Green";
$Gem_info['enUS']['type']['orange']="Orange";
$Gem_info['enUS']['type']['purple']="Purple";
$Gem_info['enUS']['type']['meta']="Meta";
function gemlookup($locales, $color)
{
global $wowdb,$Gem_info;
$query = "SELECT DISTINCT `recipe_name`, `reagents`, `recipe_type`, `recipe_tooltip`, `recipe_texture`, `item_color`
FROM `".ROSTER_RECIPESTABLE."`
WHERE (`recipe_type` = '".$Gem_info[$locales[0]]['type'][$color]."'
AND `skill_name` = '".$Gem_info[$locales[0]]['sill']."') ";
for ($i = 1; $i<count($locales); $i++)
{
if ($locales[$i] != '')
$query .= " OR (`recipe_type` = '".$Gem_info[$locales[$i]]['type'][$color]."'
AND `skill_name` = '".$Gem_info[$locales[$i]]['sill']."') ";
}
$query .= "ORDER BY `reagents`,`recipe_name` ";
$result = $wowdb->query($query) or die_quietly($wowdb->error(),'Database Error', basename(__FILE__),__LINE__,$query);
$count = 0;
$temp = array();
while($row = $wowdb->fetch_array($result))
{
$temp[$count]=$row;
$count++;
}
return $temp;
}
$query = "SELECT DISTINCT `recipe_name` , `reagents`, `recipe_tooltip`, `recipe_texture`, `item_color`
FROM `".ROSTER_RECIPESTABLE."`
WHERE (`recipe_type` = '".$Gem_info[$clientLocales[0]]['Gem']."'
AND `skill_name` = '".$Gem_info[$clientLocales[0]]['sill']."') ";
for ($i = 1; $i<count($clientLocales); $i++)
{
if ($clientLocales[$i] != '')
$query .= " OR (`recipe_type` = '".$Gem_info[$clientLocales[$i]]['Gem']."'
AND `skill_name` = '".$Gem_info[$clientLocales[$i]]['sill']."') ";
}
$query .= "ORDER BY `reagents` ASC";
$result = $wowdb->query($query) or die_quietly($wowdb->error(),'Database Error', basename(__FILE__),__LINE__,$query);
$type['bleu']=array();
$type['red']=array();
$type['yellow']=array();
$type['meta']=array();
$countR=$countB=$countY=$countM=0;
while($row = $wowdb->fetch_array($result))
{
$matchBlue=$matchRed=$matchYellow=$matchMeta=false;
for ($i = 0; $i<count($clientLocales); $i++)
{
if(ereg($Gem_info[$clientLocales[$i]]['type']['blue'], $row['recipe_tooltip']))
$matchBlue=true;
if(ereg($Gem_info[$clientLocales[$i]]['type']['red'], $row['recipe_tooltip']))
$matchRed=true;
if(ereg($Gem_info[$clientLocales[$i]]['type']['yellow'], $row['recipe_tooltip']))
$matchYellow=true;
if(ereg($Gem_info[$clientLocales[$i]]['type']['meta'], $row['recipe_tooltip']))
$matchMeta=true;
}
//first checking for a metagem, because it matches the other colors too ;-)
if ($matchMeta == true)
{
$type['meta'][$countM]=$row;
$countM++;
} else
{
if ($matchBlue == true)
{
$type['blue'][$countB]=$row;
$countB++;
}
if ($matchRed == true)
{
$type['red'][$countR]=$row;
$countR++;
}
if ($matchYellow == true)
{
$type['yellow'][$countY]=$row;
$countY++;
}
}
}
$type['blue']=gemlookup($clientLocales, 'blue');
$type['red']=gemlookup($clientLocales, 'red');
$type['yellow']=gemlookup($clientLocales, 'yellow');
$type['purple']=gemlookup($clientLocales, 'purple');
$type['green']=gemlookup($clientLocales, 'green');
$type['orange']=gemlookup($clientLocales, 'orange');
$type['meta']=gemlookup($clientLocales, 'meta');
$color['green']="#33CC33";
$color['orange']="#FF9900";
$color['purple']="#CC00FF";
Subxero wrote:Its not better only 3 color category ?
if (!empty($type['purple']))
{
$type['blue']= array_merge($type['blue'],$type['purple']);
$type['red']= array_merge($type['red'],$type['purple']);
}
if (!empty($type['green']))
{
$type['blue']= array_merge($type['blue'],$type['green']);
$type['yellow']= array_merge($type['yellow'],$type['green']);
}
if (!empty($type['orange']))
{
$type['yellow']= array_merge($type['yellow'],$type['orange']);
$type['red']= array_merge($type['red'],$type['orange']);
}
if (($keyColor == 'blue') || ($keyColor == 'red') || ($keyColor == 'yellow') || ($keyColor == 'meta'))
{
}
Tyradil wrote:
You want 3 color style? You get it. ;-)
//color
$Gem_info['deDE']['type']['blue']="Blau";
$Gem_info['deDE']['type']['red']="Rot";
$Gem_info['deDE']['type']['yellow']="Gelb";
$Gem_info['deDE']['type']['green']="Grün"; //Aufpassen mit der Codierung!
$Gem_info['deDE']['type']['orange']="Orange";
$Gem_info['deDE']['type']['purple']="Violett";
$Gem_info['deDE']['type']['meta']="Meta";
Tyradil wrote:Np, I attached my version. :-)
dallyn wrote:Bonjour tout le monde ,
Désolé mais je ne parle pas anglais
J'ai effectué la mise a jour mais les méta-gemmes n'apparaissent pas .
http://www.underworld-paradise.info/ros ... name=Gemme
Pourriez-vous me dire ou je me suis trompé .
Merci pour votre aide
$Gem_info['frFR']['type']['blue']="Bleue";
$Gem_info['frFR']['type']['red']="Rouge";
$Gem_info['frFR']['type']['yellow']="Jaune";
$Gem_info['frFR']['type']['green']="Verte";
$Gem_info['frFR']['type']['orange']="Orange";
$Gem_info['frFR']['type']['purple']="Violette";
$Gem_info['frFR']['type']['meta']="Méta";
//color
$Gem_info['enUS']['type']['blue']="Blue";
$Gem_info['enUS']['type']['red']="Red";
$Gem_info['enUS']['type']['yellow']="Yellow";
$Gem_info['enUS']['type']['meta']="meta";
//color
$Gem_info['enUS']['type']['blue']="Blue";
$Gem_info['enUS']['type']['red']="Red";
$Gem_info['enUS']['type']['yellow']="Yellow";
$Gem_info['enUS']['type']['green']="Green";
$Gem_info['enUS']['type']['orange']="Orange";
$Gem_info['enUS']['type']['purple']="Purple";
$Gem_info['enUS']['type']['meta']="meta";
Users browsing this forum: No registered users and 1 guest