Skip to content

Commit

Permalink
[454] Another change related to [447] revision.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadez committed Jan 17, 2011
1 parent 42df9a6 commit fd7a832
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion includes/revision_nr.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
define('ARMORY_REVISION', 453);
define('ARMORY_REVISION', 454);
define('DB_VERSION', 'armory_r434');
define('CONFIG_VERSION', '2812201001');
?>
36 changes: 27 additions & 9 deletions item-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release 4.50
* @revision 450
* @revision 454
* @copyright (c) 2009-2011 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -146,22 +146,40 @@
if($creature_loot = $items->BuildLootTable($itemID, 'creature')) {
$xml->XMLWriter()->startElement('dropCreatures');
foreach($creature_loot as $creature_item) {
$xml->XMLWriter()->startElement('creature');
foreach($creature_item as $c_item_key => $c_item_value) {
$xml->XMLWriter()->writeAttribute($c_item_key, $c_item_value);
if(Utils::IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<creature ');
foreach($creature_item as $c_item_key => $c_item_value) {
$xml->XMLWriter()->writeRaw(sprintf(' %s="%s"', $c_item_key, (preg_match('/url/', strtolower($c_item_key))) ? str_replace('&', '&amp;', $c_item_value) : $c_item_value));
}
$xml->XMLWriter()->writeRaw(' />');
}
else {
$xml->XMLWriter()->startElement('creature');
foreach($creature_item as $c_item_key => $c_item_value) {
$xml->XMLWriter()->writeAttribute($c_item_key, $c_item_value);
}
$xml->XMLWriter()->endElement(); //creature
}
$xml->XMLWriter()->endElement(); //creature
}
$xml->XMLWriter()->endElement(); //dropCreatures
}
if($gameobject_loot = $items->BuildLootTable($itemID, 'gameobject')) {
$xml->XMLWriter()->startElement('containerObjects');
foreach($gameobject_loot as $gameobject_item) {
$xml->XMLWriter()->startElement('object');
foreach($gameobject_item as $gobject_key => $gobject_value) {
$xml->XMLWriter()->writeAttribute($gobject_key, $gobject_value);
if(Utils::IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<object ');
foreach($gameobject_item as $gobject_key => $gobject_value) {
$xml->XMLWriter()->writeRaw(sprintf('%s="%s" ', $gobject_key, (preg_match('/url/', strtolower($gobject_key))) ? str_replace('&', '&amp;', $gobject_value) : $gobject_value));
}
$xml->XMLWriter()->writeRaw(' />');
}
else {
$xml->XMLWriter()->startElement('object');
foreach($gameobject_item as $gobject_key => $gobject_value) {
$xml->XMLWriter()->writeAttribute($gobject_key, $gobject_value);
}
$xml->XMLWriter()->endElement(); //object
}
$xml->XMLWriter()->endElement(); //object
}
$xml->XMLWriter()->endElement(); //containerObjects
}
Expand Down

0 comments on commit fd7a832

Please sign in to comment.