NPCs/DetailPage

* added item to infobox when npc is a spirit (only visible when dead)
This commit is contained in:
Sarjuuk
2024-07-05 18:01:49 +02:00
parent 8b46607c29
commit a4bcb33ba4
7 changed files with 11 additions and 1 deletions

View File

@@ -174,7 +174,7 @@ class NpcPage extends GenericPage
// Tameable
if ($_typeFlags & 0x1)
if ($_ = $this->subject->getField('family'))
$infobox[] = sprintf(Lang::npc('tameable'), '[url=pet='.$_.']'.Lang::game('fa', $_).'[/url]');
$infobox[] = Lang::npc('tameable', ['[url=pet='.$_.']'.Lang::game('fa', $_).'[/url]']);
// Wealth
if ($_ = intVal(($this->subject->getField('minGold') + $this->subject->getField('maxGold')) / 2))
@@ -184,6 +184,10 @@ class NpcPage extends GenericPage
if ($this->subject->getField('vehicleId'))
$infobox[] = Lang::npc('vehicle');
// is visible as ghost
if ($this->subject->getField('npcflag') & (NPC_FLAG_SPIRIT_HEALER | NPC_FLAG_SPIRIT_GUIDE))
$infobox[] = Lang::npc('spirit');
if (User::isInGroup(U_GROUP_EMPLOYEE))
{
// AI