mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
DB/Emotes
* added emotes to DB .. why? just because! * also added to search * cross-linked achievements and emotes * data is generated via: php aowow --sql=emotes * setup requires GlobalStrings.lua (see README.md)
This commit is contained in:
42
includes/types/emote.class.php
Normal file
42
includes/types/emote.class.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
class EmoteList extends BaseType
|
||||
{
|
||||
use ListviewHelper;
|
||||
|
||||
public static $type = TYPE_EMOTE;
|
||||
public static $brickFile = 'emote';
|
||||
|
||||
protected $queryBase = 'SELECT *, e.id AS ARRAY_KEY FROM ?_emotes e';
|
||||
|
||||
public function getListviewData()
|
||||
{
|
||||
$data = [];
|
||||
|
||||
foreach ($this->iterate() as $__)
|
||||
{
|
||||
$data[$this->id] = array(
|
||||
'id' => $this->curTpl['id'],
|
||||
'name' => $this->curTpl['cmd'],
|
||||
'preview' => $this->getField('self', true) ?: ($this->getField('noTarget', true) ?: $this->getField('target', true))
|
||||
);
|
||||
|
||||
// [nyi] sounds
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getJSGlobals($addMask = GLOBALINFO_ANY)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function renderTooltip() { }
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user