From a5f13325c0856f535cf6a7596b247874acab3875 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 3 Aug 2015 22:30:11 +0200 Subject: [PATCH] Enchantments * forgot notFound message * added Enchantments Tab to Spell Detail Page --- includes/types/item.class.php | 3 ++- localization/locale_dede.php | 1 + localization/locale_enus.php | 1 + localization/locale_eses.php | 1 + localization/locale_frfr.php | 1 + localization/locale_ruru.php | 1 + pages/enchantment.php | 7 ++++--- pages/spell.php | 19 +++++++++++++++++++ 8 files changed, 30 insertions(+), 4 deletions(-) diff --git a/includes/types/item.class.php b/includes/types/item.class.php index 50d079c6..c52f2e43 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -569,7 +569,8 @@ class ItemList extends BaseType $x .= ''; // Class - $x .= ''; + if ($_slot) + $x .= ''; // Subclass if ($_class == ITEM_CLASS_ARMOR && $_subClass > 0) diff --git a/localization/locale_dede.php b/localization/locale_dede.php index 12dbde58..23d5d8ce 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -394,6 +394,7 @@ $lang = array( 'enchantment' => array( 'details' => "Details", 'activation' => "Aktivierung", + 'notFound' => "Diese Verzauberung existiert nicht.", 'types' => array( 1 => "Zauber (Auslösung)", 3 => "Zauber (Anlegen)", 7 => "Zauber (Benutzen)", 8 => "Prismatischer Sockel", 5 => "Statistik", 2 => "Waffenschaden", 6 => "DPS", 4 => "Verteidigung" diff --git a/localization/locale_enus.php b/localization/locale_enus.php index f52e83ff..6fb4f55f 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -389,6 +389,7 @@ $lang = array( 'enchantment' => array( 'details' => "Details", 'activation' => "Activation", + 'notFound' => "This enchantment doesn't exist.", 'types' => array( 1 => "Proc Spell", 3 => "Equip Spell", 7 => "Use Spell", 8 => "Prismatic Socket", 5 => "Statistics", 2 => "Weapon Damage", 6 => "DPS", 4 => "Defense" diff --git a/localization/locale_eses.php b/localization/locale_eses.php index cc4ce2b3..c8a3b2c4 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -395,6 +395,7 @@ $lang = array( 'enchantment' => array( 'details' => "Detalles", 'activation' => "Activación", + 'notFound' => "Este encantamiento no existe.", 'types' => array( 1 => "[Proc Spell]", 3 => "[Equip Spell]", 7 => "[Use Spell]", 8 => "Ranura prismática", 5 => "Atributos", 2 => "Daño de arma", 6 => "DPS", 4 => "Defensa" diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index 406685f8..7953a2f2 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -394,6 +394,7 @@ $lang = array( 'enchantment' => array( 'details' => "En détail", 'activation' => "Activation", + 'notFound' => "Cet enchantement n'existe pas.", 'types' => array( 1 => "[Proc Spell]", 3 => "[Equip Spell]", 7 => "[Use Spell]", 8 => "Châsse prismatique", 5 => "Statistiques", 2 => "Dégâts d'arme", 6 => "DPS", 4 => "Défense" diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index 5441bbd8..b251b6e4 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -394,6 +394,7 @@ $lang = array( 'enchantment' => array( 'details' => "Подробности", 'activation' => "Активации", + 'notFound' => "Такой улучшение не существует.", 'types' => array( 1 => "[Proc Spell]", 3 => "[Equip Spell]", 7 => "[Use Spell]", 8 => "Бесцветное гнездо", 5 => "Характеристики", 2 => "Урон оружия", 6 => "УВС", 4 => "Защита" diff --git a/pages/enchantment.php b/pages/enchantment.php index f082a3b8..a964b57a 100644 --- a/pages/enchantment.php +++ b/pages/enchantment.php @@ -95,9 +95,10 @@ class EnchantmentPage extends GenericPage case 7: $sArr = $this->subject->getField('spells')[$i]; $spl = $this->subject->getRelSpell($sArr[0]); - $this->effects[$i]['name'] = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'Type: '.$_ty, Lang::item('trigger', $sArr[1])) : Lang::item('trigger', $sArr[1]); - $this->effects[$i]['proc'] = $sArr[3]; - $this->effects[$i]['icon'] = array( + $this->effects[$i]['name'] = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'Type: '.$_ty, Lang::item('trigger', $sArr[1])) : Lang::item('trigger', $sArr[1]); + $this->effects[$i]['proc'] = $sArr[3]; + $this->effects[$i]['value'] = $_qty ?: null; + $this->effects[$i]['icon'] = array( 'name' => !$spl ? Util::ucFirst(Lang::game('spell')).' #'.$sArr[0] : Util::localizedString($spl, 'name'), 'id' => $sArr[0], 'count' => $sArr[2] diff --git a/pages/spell.php b/pages/spell.php index ff2098e7..fb539289 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -1124,6 +1124,25 @@ class SpellPage extends GenericPage $this->extendGlobalData($tbItem->getJSGlobals(GLOBALINFO_SELF)); } + // tab: enchantments + $conditions = array( + 'OR', + ['AND', ['type1', [1, 3, 7]], ['object1', $this->typeId]], + ['AND', ['type2', [1, 3, 7]], ['object2', $this->typeId]], + ['AND', ['type3', [1, 3, 7]], ['object3', $this->typeId]] + ); + $enchList = new EnchantmentList($conditions); + if (!$enchList->error) + { + $this->lvTabs[] = array( + 'file' => 'enchantment', + 'data' => $enchList->getListviewData(), + 'params' => [] + ); + + $this->extendGlobalData($enchList->getJSGlobals()); + } + // find associated NPC, Item and merge results // taughtbypets (unused..?) // taughtbyquest (usually the spell casted as quest reward teaches something; exclude those seplls from taughtBySpell)
'.Lang::item('inventoryType', $_slot).''.Lang::item('inventoryType', $_slot).'