- Error handling:

* replaced error-suppressions with proper checks
  * log php errors to db
  * use __callStatic() to access localization and thus handle erronous keys
- Setup:
  * fixed some erronous filenames when generating icons
  * increased alpha threshold for spawn maps (should improve spawn points)
- disentangled DB::Aowow and DB::World. Aowow should now be able to run
  with DB::World being on a different server
- added missing faction transfer pendants (title/quest/faction/..)
- fixed extended costs for specific vendors
This commit is contained in:
Sarjuuk
2015-02-03 01:22:12 +01:00
parent acbe969b8d
commit c7fe84b7e0
59 changed files with 926 additions and 592 deletions

View File

@@ -51,6 +51,7 @@ if (!defined('AOWOW_REVISION'))
$mapWidth = 1002;
$mapHeight = 668;
$threshold = 95; // alpha threshold to define subZones: set it too low and you have unspawnable areas inside a zone; set it too high and the border regions overlap
$runTime = ini_get('max_execution_time');
$locStr = null;
$dbcPath = FileGen::$srcDir.'%sDBFilesClient/';
@@ -69,10 +70,12 @@ if (!defined('AOWOW_REVISION'))
$bgColor = imagecolorallocatealpha($img, 0, 0, 0, 127);
imagefilledrectangle($img, 0, 0, imagesx($img) - 1, imagesy($img) - 1, $bgColor);
imagecolordeallocate($img, $bgColor);
imagecolortransparent($img, $bgColor);
imagealphablending($img, true);
imagecolordeallocate($img, $bgColor);
return $img;
};
@@ -161,7 +164,7 @@ if (!defined('AOWOW_REVISION'))
return $ok;
};
$createSpawnMap = function($img, $zoneId) use ($mapHeight, $mapWidth)
$createSpawnMap = function($img, $zoneId) use ($mapHeight, $mapWidth, $threshold)
{
FileGen::status(' - creating spawn map');
@@ -174,7 +177,7 @@ if (!defined('AOWOW_REVISION'))
for ($x = 0; $x < 1000; $x++)
{
$a = imagecolorat($img, ($x * $mapWidth) / 1000, ($y * $mapHeight) / 1000) >> 24;
imagesetpixel($tmp, $x, $y, $a < 30 ? $cfg : $cbg);
imagesetpixel($tmp, $x, $y, $a < $threshold ? $cfg : $cbg);
}
}
@@ -480,7 +483,7 @@ if (!defined('AOWOW_REVISION'))
for ($my = 0; $my < imagesy($img); $my++)
for ($mx = 0; $mx < imagesx($img); $mx++)
if ((imagecolorat($img, $mx, $my) >> 24) < 30)
if ((imagecolorat($img, $mx, $my) >> 24) < $threshold)
imagesetpixel($row['maskimage'], $x + $mx, $y + $my, $row['maskcolor']);
}
@@ -566,7 +569,6 @@ if (!defined('AOWOW_REVISION'))
if (!$multiLeveled)
{
imagecolortransparent($overlay, imagecolorat($overlay, imagesx($overlay)-1, imagesy($overlay)-1));
imagecopymerge($map, $overlay, 0, 0, 0, 0, imagesx($overlay), imagesy($overlay), 100);
imagedestroy($overlay);
}
@@ -635,7 +637,7 @@ if (!defined('AOWOW_REVISION'))
if ($modeMask & 0x08) // optional tidbits (not used by default)
{
if (FileGen::writeDir($destDir.'interface/Glues/Credits/'))
if (FileGen::writeDir($destDir.'Interface/Glues/Credits/'))
{
// tile ordering
$order = array(
@@ -692,7 +694,7 @@ if (!defined('AOWOW_REVISION'))
$sum++;
$done = ' - '.str_pad($sum.'/'.$total, 8).str_pad('('.number_format($sum * 100 / $total, 2).'%)', 9);
$name = $destDir.'interface/Glues/Credits/'.$file;
$name = $destDir.'Interface/Glues/Credits/'.$file;
if (!isset(FileGen::$cliOpts['force']) && file_exists($name.'.png'))
{

View File

@@ -95,13 +95,13 @@ if (!defined('AOWOW_REVISION'))
'ui-paperdoll-slot-waist' => 'inventoryslot_waist',
'ui-paperdoll-slot-wrists' => 'inventoryslot_wrists'
),
3 => array(
['race_human_male', 'race_dwarf_male', 'race_gnome_male', 'race_nightelf_male', 'race_draenai_male' ],
['race_tauren_male', 'race_undead_male', 'race_troll_male', 'race_orc_male', 'race_bloodelf_male' ],
['race_human_female', 'race_dwarf_female', 'race_gnome_female', 'race_nightelf_female', 'race_draenai_female' ],
['race_tauren_female', 'race_undead_female', 'race_troll_female', 'race_orc_female', 'race_bloodelf_female']
3 => array( // uses nameINT from ChrRaces.dbc
['race_human_male', 'race_dwarf_male', 'race_gnome_male', 'race_nightelf_male', 'race_draenei_male' ],
['race_tauren_male', 'race_scourge_male', 'race_troll_male', 'race_orc_male', 'race_bloodelf_male' ],
['race_human_female', 'race_dwarf_female', 'race_gnome_female', 'race_nightelf_female', 'race_draenei_female' ],
['race_tauren_female', 'race_scourge_female', 'race_troll_female', 'race_orc_female', 'race_bloodelf_female']
),
4 => array(
4 => array( // uses nameINT from ChrClasses.dbc
['class_warrior', 'class_mage', 'class_rogue', 'class_druid' ],
['class_hunter', 'class_shaman', 'class_priest', 'class_warlock'],
['class_paladin', 'class_deathknight' ]

View File

@@ -673,9 +673,9 @@ if (typeof $WowheadPower == "undefined") {
zoom: 3,
zoomable: false,
buttons: false
});
}, true);
}
arr[id].map.update(json.map);
arr[id].map.update(json.map, true);
delete json.map;
}