mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Areatrigger/Names
* fix unnamed areatrigger after fetching them from DB and not clientside Mail/Names * fix unnamed mails after fetching them from DB and not clientside
This commit is contained in:
@@ -18,6 +18,15 @@ class AreaTriggerList extends BaseType
|
|||||||
's' => ['j' => ['?_spawns s ON s.type = 503 AND s.typeId = a.id', true], 's' => ', s.areaId']
|
's' => ['j' => ['?_spawns s ON s.type = 503 AND s.typeId = a.id', true], 's' => ', s.areaId']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public function __construct($conditions)
|
||||||
|
{
|
||||||
|
parent::__construct($conditions);
|
||||||
|
|
||||||
|
foreach ($this->iterate() as $id => &$_curTpl)
|
||||||
|
if (!$_curTpl['name'])
|
||||||
|
$_curTpl['name'] = 'Unnamed Areatrigger #' . $id;
|
||||||
|
}
|
||||||
|
|
||||||
public function getListviewData()
|
public function getListviewData()
|
||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|||||||
@@ -21,9 +21,14 @@ class MailList extends BaseType
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// post processing
|
// post processing
|
||||||
foreach ($this->iterate() as &$_curTpl)
|
foreach ($this->iterate() as $_id => &$_curTpl)
|
||||||
{
|
{
|
||||||
$_curTpl['name'] = Util::localizedString($_curTpl, 'subject', true);
|
$_curTpl['name'] = Util::localizedString($_curTpl, 'subject', true);
|
||||||
|
if (!$_curTpl['name'])
|
||||||
|
{
|
||||||
|
$_curTpl['name'] = sprintf(Lang::mail('untitled'), $_id);
|
||||||
|
$_curTpl['subject_loc0'] = $_curTpl['name'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1164,7 +1164,7 @@ $lang = array(
|
|||||||
'mailIn' => " nach %s",
|
'mailIn' => " nach %s",
|
||||||
'delay' => "Verzögerung",
|
'delay' => "Verzögerung",
|
||||||
'sender' => "Absender",
|
'sender' => "Absender",
|
||||||
'untitled' => "Unbetitelter Brief"
|
'untitled' => "Unbetitelter Brief #%d"
|
||||||
),
|
),
|
||||||
'pet' => array(
|
'pet' => array(
|
||||||
'notFound' => "Diese Tierart existiert nicht.",
|
'notFound' => "Diese Tierart existiert nicht.",
|
||||||
|
|||||||
@@ -1164,7 +1164,7 @@ $lang = array(
|
|||||||
'mailIn' => " after %s",
|
'mailIn' => " after %s",
|
||||||
'delay' => "Delay",
|
'delay' => "Delay",
|
||||||
'sender' => "Sender",
|
'sender' => "Sender",
|
||||||
'untitled' => "Untitled Mail"
|
'untitled' => "Untitled Mail #%d"
|
||||||
),
|
),
|
||||||
'pet' => array(
|
'pet' => array(
|
||||||
'notFound' => "This pet family doesn't exist.",
|
'notFound' => "This pet family doesn't exist.",
|
||||||
|
|||||||
@@ -1164,7 +1164,7 @@ $lang = array(
|
|||||||
'mailIn' => " después de %s",
|
'mailIn' => " después de %s",
|
||||||
'delay' => "Delay",
|
'delay' => "Delay",
|
||||||
'sender' => "Sender",
|
'sender' => "Sender",
|
||||||
'untitled' => "Untitled Mail"
|
'untitled' => "Untitled Mail #%d"
|
||||||
),
|
),
|
||||||
'pet' => array(
|
'pet' => array(
|
||||||
'notFound' => "Esta familia de mascotas no existe.",
|
'notFound' => "Esta familia de mascotas no existe.",
|
||||||
|
|||||||
@@ -1164,7 +1164,7 @@ $lang = array(
|
|||||||
'mailIn' => " après %s",
|
'mailIn' => " après %s",
|
||||||
'delay' => "Delay",
|
'delay' => "Delay",
|
||||||
'sender' => "Sender",
|
'sender' => "Sender",
|
||||||
'untitled' => "Untitled Mail"
|
'untitled' => "Untitled Mail #%d"
|
||||||
),
|
),
|
||||||
'pet' => array(
|
'pet' => array(
|
||||||
'notFound' => "Cette famille de familiers n'existe pas.",
|
'notFound' => "Cette famille de familiers n'existe pas.",
|
||||||
|
|||||||
@@ -1164,7 +1164,7 @@ $lang = array(
|
|||||||
'mailIn' => " через %s",
|
'mailIn' => " через %s",
|
||||||
'delay' => "Delay",
|
'delay' => "Delay",
|
||||||
'sender' => "Sender",
|
'sender' => "Sender",
|
||||||
'untitled' => "Untitled Mail"
|
'untitled' => "Untitled Mail #%d"
|
||||||
),
|
),
|
||||||
'pet' => array(
|
'pet' => array(
|
||||||
'notFound' => "Такой породы питомцев не существует.",
|
'notFound' => "Такой породы питомцев не существует.",
|
||||||
|
|||||||
@@ -1164,7 +1164,7 @@ $lang = array(
|
|||||||
'mailIn' => " after %s",
|
'mailIn' => " after %s",
|
||||||
'delay' => "Delay",
|
'delay' => "Delay",
|
||||||
'sender' => "Sender",
|
'sender' => "Sender",
|
||||||
'untitled' => "Untitled Mail"
|
'untitled' => "Untitled Mail #%d"
|
||||||
),
|
),
|
||||||
'pet' => array(
|
'pet' => array(
|
||||||
'notFound' => "这个宠物家族不存在。",
|
'notFound' => "这个宠物家族不存在。",
|
||||||
|
|||||||
@@ -30,9 +30,7 @@ class MailPage extends GenericPage
|
|||||||
|
|
||||||
$this->extendGlobalData($this->subject->getJSGlobals());
|
$this->extendGlobalData($this->subject->getJSGlobals());
|
||||||
|
|
||||||
$this->name = Util::ucFirst($this->subject->getField('subject', true));
|
$this->name = Util::ucFirst($this->subject->getField('name', true));
|
||||||
if (!$this->name)
|
|
||||||
$this->name = Lang::mail('untitled');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function generateContent()
|
protected function generateContent()
|
||||||
|
|||||||
@@ -384,12 +384,10 @@ class ZonePage extends GenericPage
|
|||||||
if (!$tpl)
|
if (!$tpl)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$n = Util::localizedString($tpl, 'name');
|
|
||||||
|
|
||||||
$addToSOM('areatrigger', array(
|
$addToSOM('areatrigger', array(
|
||||||
'coords' => [[$spawn['posX'], $spawn['posY']]],
|
'coords' => [[$spawn['posX'], $spawn['posY']]],
|
||||||
'level' => $spawn['floor'],
|
'level' => $spawn['floor'],
|
||||||
'name' => $tpl['name'] ?: 'Unnamed AT #'.$spawn['typeId'],
|
'name' => Util::localizedString($tpl, 'name', true, true),
|
||||||
'type' => TYPE_AREATRIGGER,
|
'type' => TYPE_AREATRIGGER,
|
||||||
'id' => $spawn['typeId'],
|
'id' => $spawn['typeId'],
|
||||||
'description' => 'Type: '.Lang::areatrigger('types', $tpl['type'])
|
'description' => 'Type: '.Lang::areatrigger('types', $tpl['type'])
|
||||||
|
|||||||
@@ -27,10 +27,6 @@ Listview.templates.areatrigger = {
|
|||||||
var a = $WH.ce('a');
|
var a = $WH.ce('a');
|
||||||
a.style.fontFamily = 'Verdana, sans-serif';
|
a.style.fontFamily = 'Verdana, sans-serif';
|
||||||
a.href = this.getItemLink(areatrigger);
|
a.href = this.getItemLink(areatrigger);
|
||||||
if (!areatrigger.name){
|
|
||||||
areatrigger.name = 'Unnamed Areatrigger'
|
|
||||||
a.className = 'q0';
|
|
||||||
}
|
|
||||||
|
|
||||||
$WH.ae(a, $WH.ct(areatrigger.name));
|
$WH.ae(a, $WH.ct(areatrigger.name));
|
||||||
$WH.ae(wrapper, a);
|
$WH.ae(wrapper, a);
|
||||||
|
|||||||
@@ -27,10 +27,6 @@ Listview.templates.mail = {
|
|||||||
var a = $WH.ce('a');
|
var a = $WH.ce('a');
|
||||||
a.style.fontFamily = 'Verdana, sans-serif';
|
a.style.fontFamily = 'Verdana, sans-serif';
|
||||||
a.href = this.getItemLink(mail);
|
a.href = this.getItemLink(mail);
|
||||||
if (!mail.subject){
|
|
||||||
mail.subject = 'Untitled Mail'
|
|
||||||
a.className = 'q0';
|
|
||||||
}
|
|
||||||
|
|
||||||
$WH.ae(a, $WH.ct(mail.subject));
|
$WH.ae(a, $WH.ct(mail.subject));
|
||||||
$WH.ae(wrapper, a);
|
$WH.ae(wrapper, a);
|
||||||
|
|||||||
Reference in New Issue
Block a user