diff --git a/pages/item.php b/pages/item.php
index 42164e51..56db9ecc 100644
--- a/pages/item.php
+++ b/pages/item.php
@@ -875,7 +875,7 @@ class ItemPage extends genericPage
$this->lvTabs[] = ['item', $tabData];
- $this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF));
+ $this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
}
}
diff --git a/pages/spell.php b/pages/spell.php
index 3f3027ff..ea389c31 100644
--- a/pages/spell.php
+++ b/pages/spell.php
@@ -1636,12 +1636,12 @@ class SpellPage extends GenericPage
case 28: // Summon
case 90: // Kill Credit
case 134: // Kill Credit2
- $_ = Lang::game('npc').' #'.$effMV;
if ($summon = $this->subject->getModelInfo($this->typeId, $i))
- {
- $_ = $summon['typeId'] ? ' ('.$summon['displayName'].')' : ' (#0)';
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $summon['displayId']];
- }
+
+ $_ = Lang::game('npc').' #'.$effMV;
+ if ($n = CreatureList::getName($effMV))
+ $_ = ' ('.$n.')';
$foo['name'] .= $_;
break;
@@ -1689,12 +1689,12 @@ class SpellPage extends GenericPage
case 105: // Summon Object (slot 2)
case 106: // Summon Object (slot 3)
case 107: // Summon Object (slot 4)
- $_ = Util::ucFirst(Lang::game('object')).' #'.$effMV;
if ($summon = $this->subject->getModelInfo($this->typeId, $i))
- {
- $_ = $summon['typeId'] ? ' ('.$summon['displayName'].')' : ' (#0)';
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_OBJECT, 'displayId' => $summon['displayId']];
- }
+
+ $_ = Util::ucFirst(Lang::game('object')).' #'.$effMV;
+ if ($n = GameobjectList::getName($effMV))
+ $_ = ' ('.$n.')';
$foo['name'] .= $_;
break;