mmf (misc minor fixes)

- wrong static function calls in achievement
- quality-integer no longer displayed in opensearch
This commit is contained in:
Sarjuuk
2013-03-10 23:48:15 +01:00
parent 1ff2819de9
commit 84ba5012bc
4 changed files with 63 additions and 7 deletions

View File

@@ -189,18 +189,18 @@ class AchievementList extends BaseType
case ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL: case ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL:
case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2: case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2:
if (!$crtName) if (!$crtName)
$crtName = Spell::getName($crt['value1']); $crtName = SpellList::getName($crt['value1']);
break; break;
case ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM: case ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM:
case ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM: case ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM:
case ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM: case ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM:
case ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM: case ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM:
if (!$crtName) if (!$crtName)
$crtName = Util::getItemName($crt['value1']); $crtName = ItemList::getName($crt['value1']);
break; break;
case ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION: case ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION:
if (!$crtName) if (!$crtName)
$crtName = Faction::getName($crt['value1']); $crtName = FactionList::getName($crt['value1']);
$crtName .= ' ('.Lang::getReputationLevelForPoints($crt['value2']).')'; $crtName .= ' ('.Lang::getReputationLevelForPoints($crt['value2']).')';
break; break;
} }

View File

@@ -4,7 +4,7 @@ if (!defined('AOWOW_REVISION'))
die('illegal access'); die('illegal access');
class Faction class FactionList extends BaseType
{ {
public static function getName($id) public static function getName($id)
{ {
@@ -34,6 +34,11 @@ class Faction
*/ */
} }
public function getListviewData() { }
public function addGlobalsToJScript(&$refs) { }
public function addRewardsToJScript(&$refs) { }
public function renderTooltip() { }
} }
?> ?>

View File

@@ -995,7 +995,8 @@ class ItemList extends BaseType
{ {
$json = array( $json = array(
'id' => $this->id, 'id' => $this->id,
'name' => (ITEM_QUALITY_HEIRLOOM - $this->curTpl['Quality']).$this->names[$this->id], 'name' => $this->names[$this->id],
'quality' => ITEM_QUALITY_HEIRLOOM - $this->curTpl['Quality'],
'icon' => $this->curTpl['icon'], 'icon' => $this->curTpl['icon'],
'classs' => $this->curTpl['class'], 'classs' => $this->curTpl['class'],
'subclass' => $this->curTpl['subclass'], 'subclass' => $this->curTpl['subclass'],
@@ -1066,4 +1067,54 @@ class ItemList extends BaseType
public function addRewardsToJScript(&$ref) { } public function addRewardsToJScript(&$ref) { }
} }
/*
teaches
$teaches = array();
for($j=1;$j<=4;$j++)
if($Row['spellid_'.$j]==483)
$teaches[] = spellinfo($Row['spellid_'.($j+1)]);
if($teaches)
{
$item['teaches'] = $teaches;
unset($teaches);
unset($spellrow);
}
unlocks
$locks_row = $DB->selectCol('
SELECT lockID
FROM ?_lock
WHERE
(type1=1 AND lockproperties1=?d) OR
(type2=1 AND lockproperties2=?d) OR
(type3=1 AND lockproperties3=?d) OR
(type4=1 AND lockproperties4=?d) OR
(type5=1 AND lockproperties5=?d)
',
$item['entry'], $item['entry'], $item['entry'], $item['entry'], $item['entry']
);
if($locks_row)
{
// ??????? ??????? ? ????? ????? ?????:
$item['unlocks'] = $DB->select('
SELECT ?#
FROM gameobject_template
WHERE
(
((type IN (?a)) AND (data0 IN (?a)))
OR
((type IN (?a)) AND (data0 IN (?a)))
)
',
$object_cols[0],
array(GAMEOBJECT_TYPE_QUESTGIVER, GAMEOBJECT_TYPE_CHEST, GAMEOBJECT_TYPE_TRAP, GAMEOBJECT_TYPE_GOOBER, GAMEOBJECT_TYPE_CAMERA, GAMEOBJECT_TYPE_FLAGSTAND, GAMEOBJECT_TYPE_FLAGDROP),
$locks_row,
array(GAMEOBJECT_TYPE_DOOR, GAMEOBJECT_TYPE_BUTTON),
$locks_row
);
if(!$item['unlocks'])
unset($item['unlocks']);
*/
?> ?>

View File

@@ -16,7 +16,7 @@
data:[ data:[
{foreach name=i from=$data item=curr} {foreach name=i from=$data item=curr}
{ldelim} {ldelim}
name:'{$curr.name|escape:"quotes"}', name:'{$curr.quality}{$curr.name|escape:"quotes"}',
{if isset($curr.level)} {if isset($curr.level)}
level:{$curr.level}, level:{$curr.level},
{/if} {/if}