Achievement:

* use (locales_)achievement_reward to display rewards
 * implemented display of reward mails
 * updated mail to display sender if possible

Spell:
 * fixed some issues with spell_loot
 * added aura 286 (Ability Periodic Crit) to affect-checks

- added more sources for future use
This commit is contained in:
Sarjuuk
2014-08-20 21:42:00 +02:00
parent cdfde74eb9
commit fa29276a91
15 changed files with 220 additions and 122 deletions

View File

@@ -14,14 +14,16 @@ class AchievementList extends BaseType
public $criteria = [];
public $tooltip = [];
protected $queryBase = 'SELECT `a`.*, `a`.`id` AS ARRAY_KEY FROM ?_achievement a';
protected $queryBase = 'SELECT `a`.*, `ar`.*, `lar`.*, `a`.`id` AS ARRAY_KEY FROM ?_achievement a';
protected $queryOpts = array(
'a' => ['o' => 'orderInGroup ASC'],
'ac' => ['j' => ['?_achievementcriteria AS `ac` ON `ac`.`refAchievementId` = `a`.`id`', true], 'g' => '`a`.`id`']
'a' => [['ar', 'lar'], 'o' => 'orderInGroup ASC'],
'ar' => ['j' => ['achievement_reward ar ON ar.entry = a.id', true]],
'lar' => ['j' => ['locales_achievement_reward lar ON lar.entry = a.id', true]],
'ac' => ['j' => ['?_achievementcriteria AS `ac` ON `ac`.`refAchievementId` = `a`.`id`', true], 'g' => '`a`.`id`']
);
/*
todo: evaluate TC custom-data-tables: a*_criteria_data should be merged on installation, a*_reward linked with mail_loot_template and achievement
todo: evaluate TC custom-data-tables: a*_criteria_data should be merged on installation
*/
public function __construct($conditions = [], $miscData = null)
@@ -32,19 +34,18 @@ class AchievementList extends BaseType
foreach ($this->iterate() as &$_curTpl)
{
//"rewards":[[11,137],[3,138]] [type, typeId]
$_curTpl['rewards'] = [TYPE_ITEM => [], TYPE_TITLE => []];
if (!empty($_curTpl['rewardIds']))
{
$rewIds = explode(" ", $_curTpl['rewardIds']);
foreach ($rewIds as $rewId)
{
if ($rewId > 0)
$_curTpl['rewards'][TYPE_ITEM][] = $rewId;
else if ($rewId < 0)
$_curTpl['rewards'][TYPE_TITLE][] = -$rewId;
}
}
$_curTpl['rewards'] = [];
if ($_ = $_curTpl['item'])
$_curTpl['rewards'][] = [TYPE_ITEM, $_];
if ($_ = $_curTpl['itemExtra'])
$_curTpl['rewards'][] = [TYPE_ITEM, $_];
if ($_ = $_curTpl['title_A'])
$_curTpl['rewards'][] = [TYPE_TITLE, $_];
if ($_ = $_curTpl['title_H'])
if ($_ != $_curTpl['title_A'])
$_curTpl['rewards'][] = [TYPE_TITLE, $_];
// icon
$_curTpl['iconString'] = $_curTpl['iconString'] ?: 'trade_engineering';
}
}
@@ -59,13 +60,8 @@ class AchievementList extends BaseType
$data[TYPE_ACHIEVEMENT][$this->id] = ['icon' => $this->curTpl['iconString'], 'name' => $this->getField('name', true)];
if ($addMask & GLOBALINFO_REWARDS)
{
foreach ($this->curTpl['rewards'][TYPE_ITEM] as $_)
$data[TYPE_ITEM][$_] = $_;
foreach ($this->curTpl['rewards'][TYPE_TITLE] as $_)
$data[TYPE_TITLE][$_] = $_;
}
foreach ($this->curTpl['rewards'] as $_)
$data[$_[0]][$_[1]] = $_[1];
}
return $data;
@@ -91,16 +87,11 @@ class AchievementList extends BaseType
$data[$this->id]['icon'] = $this->curTpl['iconString'];
// going out on a limb here: type = 1 if in level 3 of statistics tree, so, IF (statistic AND parentCat NOT statistic (1)) i guess
if ($this->curTpl['flags'] & ACHIEVEMENT_FLAG_COUNTER && $this->curTpl['parentCat'] != 1)
if ($this->curTpl['flags'] & ACHIEVEMENT_FLAG_COUNTER && $this->curTpl['parentCat'] != 1)
$data[$this->id]['type'] = 1;
$rewards = [];
foreach ($this->curTpl['rewards'] as $type => $rIds)
foreach ($rIds as $rId)
$rewards[] = [$type, $rId];
if ($rewards)
$data[$this->id]['rewards'] = $rewards;
if ($_ = $this->curTpl['rewards'])
$data[$this->id]['rewards'] = $_;
else if ($_ = $this->getField('reward', true))
$data[$this->id]['reward'] = $_;
}

View File

@@ -299,13 +299,13 @@ abstract class BaseType
return null;
}
public function getField($field, $localized = false)
public function getField($field, $localized = false, $silent = false)
{
if (!$this->curTpl || (!$localized && !isset($this->curTpl[$field])))
return '';
if ($localized)
return Util::localizedString($this->curTpl, $field);
return Util::localizedString($this->curTpl, $field, $silent);
$value = $this->curTpl[$field];
if (Util::checkNumeric($value))
@@ -612,7 +612,7 @@ abstract class Filter
if (strpos($term, $c.'=') === 0)
{
$$c = explode(':', explode('=', $term)[1]);
$this->formData['setCriteria'][$c] = json_encode($$c, JSON_NUMERIC_CHECK); // todo (high): move to checks
$this->formData['setCriteria'][$c] = $$c; // todo (high): move to checks
unset($tmp[$i]);
}
}
@@ -725,7 +725,10 @@ abstract class Filter
switch ($name)
{
case 'setCriteria':
$form[$name] = $raw ? $data : 'fi_setCriteria('.(empty($data['cr']) ? '[]' : $data['cr']).', '.(empty($data['crs']) ? '[]' : $data['crs']).', '.(empty($data['crv']) ? '[]' : $data['crv']).');';
if ($data || $raw)
$form[$name] = $raw ? $data : 'fi_setCriteria('.json_encode($data['cr'], JSON_NUMERIC_CHECK).', '.json_encode($data['crs'], JSON_NUMERIC_CHECK).', '.json_encode($data['crv'], JSON_NUMERIC_CHECK).');';
else
$form[$name] = 'fi_setCriteria([], [], []);';
break;
case 'extraCols':
$form[$name] = $raw ? $data : 'fi_extraCols = '.json_encode(array_unique($data), JSON_NUMERIC_CHECK).';';

View File

@@ -206,9 +206,11 @@ $lang = array(
'expansions' => ["Classic", "The Burning Crusade", "Wrath of the Lich King"],
'stats' => ["Stärke", "Beweglichkeit", "Ausdauer", "Intelligenz", "Willenskraft"],
'sources' => array(
null, "Hergestellt", "Drop", "PvP", "Quest", "Händler",
"Unbekannt", "Hergestellt", "Drop", "PvP", "Quest", "Händler",
"Lehrer", "Entdeckung", "Einlösung", "Talent", "Startausrüstung", "Ereignis",
"Erfolg"
"Erfolg", null, "Schwarzmarkt", "Entzaubert", "Geangelt", "Gesammelt",
"Gemahlen", "Abgebaut", "Sondiert", "Aus Taschendiebstahl", "Geborgen", "Gehäutet",
"In-Game-Store"
),
'languages' => array(
1 => "Orcisch", 2 => "Darnassisch", 3 => "Taurisch", 6 => "Zwergisch", 7 => "Gemeinsprache", 8 => "Dämonisch",
@@ -466,8 +468,9 @@ $lang = array(
'enabledByQDesc'=> "Ihr könnt diese Quest nur annehmen, wenn eins der nachfolgenden Quests aktiv ist",
'gainsDesc' => "Bei Abschluss dieser Quest erhaltet Ihr",
'theTitle' => 'den Titel "%s"',
'mailDelivery' => "Ihr werdet diesen Brief %serhalten",
'mailIn' => "nach %s ",
'mailDelivery' => "Ihr werdet diesen Brief%s%s erhalten",
'mailBy' => ' von <a href="?npc=%d">%s</a>',
'mailIn' => " nach %s",
'unavailable' => "Diese Quest wurde als nicht genutzt markiert und kann weder erhalten noch vollendet werden.",
'experience' => "Erfahrung",
'expConvert' => "(oder %s, wenn auf Stufe %d vollendet)",

View File

@@ -201,9 +201,11 @@ $lang = array(
'expansions' => ["Classic", "The Burning Crusade", "Wrath of the Lich King"],
'stats' => ["Strength", "Agility", "Stamina", "Intellect", "Spirit"],
'sources' => array(
null, "Crafted", "Drop", "PvP", "Quest", "Vendor",
"Unknown", "Crafted", "Drop", "PvP", "Quest", "Vendor",
"Trainer", "Discovery", "Redemption", "Talent", "Starter", "Event",
"Achievement"
"Achievement", null, "Black Market", "Disenchanted", "Fished", "Gathered",
"Milled", "Mined", "Prospected", "Pickpocketed", "Salvaged", "Skinned",
"In-Game Store"
),
'languages' => array(
1 => "Orcish", 2 => "Darnassian", 3 => "Taurahe", 6 => "Dwarvish", 7 => "Common", 8 => "Demonic",
@@ -461,8 +463,9 @@ $lang = array(
'enabledByQDesc'=> "This quest is available only, when one of these quests are active",
'gainsDesc' => "Upon completion of this quest you will gain",
'theTitle' => 'the title "%s"',
'mailDelivery' => "You will receive this letter %s",
'mailIn' => "after %s",
'mailDelivery' => "You will receive this letter%s%s",
'mailBy' => ' by <a href="?npc=%d">%s</a>',
'mailIn' => " after %s",
'unavailable' => "This quest was marked obsolete and cannot be obtained or completed.",
'experience' => "experience",
'expConvert' => "(or %s if completed at level %d)",

View File

@@ -206,12 +206,16 @@ $lang = array(
'expansions' => ["World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"],
'stats' => ["Fuerza", "Agilidad", "Aguante", "Intelecto", "Espíritu"],
'sources' => array(
null, "Creado", "Encontrado", "JcJ", "Misión", "Vendedor", "Entrenador", "Descubierto",
"Redención", "Talento", "Habilidad Inicial", "Evento", "Logro"
"Desconocido", "Creado", "Encontrado", "JcJ", "Misión", "Vendedor",
"Entrenador", "Descubierto", "Redención", "Talento", "Habilidad Inicial", "Evento",
"Logro", null, "Mercado negro", "Desencantado", "Pescado", "Recolectado",
"Molido", "Minado", "Prospectar", "Robado", "Rescatado", "Despellejado",
"Tienda del juego"
),
'languages' => array(
1 => "Orco", 2 => "Darnassiano", 3 => "Taurahe", 6 => "Enánico", 7 => "Lengua común", 8 => "Demoníaco", 9 => "Titánico", 10 => "Thalassiano",
11 => "Dracónico", 12 => "Kalimag", 13 => "Gnomótico", 14 => "Trol", 33 => "Viscerálico", 35 => "Draenei", 36 => "Zombie", 37 => "Binario gnomo", 38 => "Binario goblin"
1 => "Orco", 2 => "Darnassiano", 3 => "Taurahe", 6 => "Enánico", 7 => "Lengua común", 8 => "Demoníaco",
9 => "Titánico", 10 => "Thalassiano", 11 => "Dracónico", 12 => "Kalimag", 13 => "Gnomótico", 14 => "Trol",
33 => "Viscerálico", 35 => "Draenei", 36 => "Zombie", 37 => "Binario gnomo", 38 => "Binario goblin"
),
'gl' => [null, "Sublime", "Menor"],
'si' => [1 => "Alianza", -1 => "Alianza solamente", 2 => "Horda", -2 => "Horda solamente", 3 => "Ambos"],
@@ -222,36 +226,40 @@ $lang = array(
'ra' => [-2 => "Horda", -1 => "Alianza", "Ambos", "Humano", "Orco", "Enano", "Elfo de la noche", "No-muerto", "Tauren", "Gnomo", "Trol ", null, "Blood Elf", "Elfo de sangre"],
'rep' => ["Odiado", "Hostil", "Adverso", "Neutral", "Amistoso", "Honorable", "Reverenciado", "Exaltado"],
'st' => array(
"Defecto", "Forma felina", "Árbol de vida", "Forma de viaje", "Forma acuática",
"Forma de oso", null, null, "Forma de oso temible", null,
null, null, null, "Danza de las Sombras", null,
null, "Lobo fantasmal", "Actitud de batalla", "Actitud defensiva", "Actitud rabiosa",
null, null, "Metamorfosis", null, null,
null, null, "Forma de vuelo presto", "Forma de las Sombras", "Forma de vuelo",
"Sigilo", "Forma de lechúcico lunar", "Espíritu redentor"
"Defecto", "Forma felina", "Árbol de vida", "Forma de viaje", "Forma acuática", "Forma de oso",
null, null, "Forma de oso temible", null, null, null,
null, "Danza de las Sombras", null, null, "Lobo fantasmal", "Actitud de batalla",
"Actitud defensiva", "Actitud rabiosa", null, null, "Metamorfosis", null,
null, null, null, "Forma de vuelo presto", "Forma de las Sombras", "Forma de vuelo",
"Sigilo", "Forma de lechúcico lunar", "Espíritu redentor"
),
'me' => array(
null, "Embelesado", "Desorientado", "Desarmado", "Distraído", "Huyendo", "Agarrado", "Enraizado",
"Pacificado", "Silenciado", "Dormido", "Frenado", "Aturdido", "Congelado", "Incapacitado", "Sangrando",
"Sanacíon", "Polimorfado", "Desterrado", "Protegido", "Aprisionado", "Montado", "Seducido", "Girado",
"Horrorizado", "Invulnerable", "Interrumpido", "Atontado", "Descubierto", "Invulnerable", "Aporreado", "Iracundo"
null, "Embelesado", "Desorientado", "Desarmado", "Distraído", "Huyendo",
"Agarrado", "Enraizado", "Pacificado", "Silenciado", "Dormido", "Frenado",
"Aturdido", "Congelado", "Incapacitado", "Sangrando", "Sanacíon", "Polimorfado",
"Desterrado", "Protegido", "Aprisionado", "Montado", "Seducido", "Girado",
"Horrorizado", "Invulnerable", "Interrumpido", "Atontado", "Descubierto", "Invulnerable",
"Aporreado", "Iracundo"
),
'ct' => array(
"Sin categoría", "Bestia", "Dragonante", "Demonio", "Elemental", "Gigante", "No-muerto", "Humanoide",
"Alimaña", "Mecánico", "Sin especificar", "Tótem", "Mascota mansa", "Nube de gas"
"Sin categoría", "Bestia", "Dragonante", "Demonio", "Elemental", "Gigante",
"No-muerto", "Humanoide", "Alimaña", "Mecánico", "Sin especificar", "Tótem",
"Mascota mansa", "Nube de gas"
),
'fa' => array(
1 => "Lobo", 2 => "Felino", 3 => "Araña", 4 => "Oso", 5 => "Jabalí", 6 => "Crocolisco", 7 => "Carroñero", 8 => "Cangrejo",
9 => "Gorila", 11 => "Raptor", 12 => "Zancaalta", 20 => "Escórpido", 21 => "Tortuga", 24 => "Murciélago", 25 => "Hiena", 26 => "Ave rapaz",
27 => "Serpiente alada", 30 => "Dracohalcón", 31 => "Devastador", 32 => "Acechador deformado",33 => "Esporiélago", 34 => "Raya abisal", 35 => "Serpiente", 37 => "Palomilla",
38 => "Quimera", 39 => "Demosaurio", 41 => "Silítido", 42 => "Gusano", 43 => "Rinoceronte", 44 => "Avispa", 45 => "Can del Núcleo", 46 => "Bestia espíritu"
1 => "Lobo", 2 => "Felino", 3 => "Araña", 4 => "Oso", 5 => "Jabalí", 6 => "Crocolisco",
7 => "Carroñero", 8 => "Cangrejo", 9 => "Gorila", 11 => "Raptor", 12 => "Zancaalta", 20 => "Escórpido",
21 => "Tortuga", 24 => "Murciélago", 25 => "Hiena", 26 => "Ave rapaz", 27 => "Serpiente alada", 30 => "Dracohalcón",
31 => "Devastador", 32 => "Acechador deformado", 33 => "Esporiélago", 34 => "Raya abisal", 35 => "Serpiente", 37 => "Palomilla",
38 => "Quimera", 39 => "Demosaurio", 41 => "Silítido", 42 => "Gusano", 43 => "Rinoceronte", 44 => "Avispa",
45 => "Can del Núcleo", 46 => "Bestia espíritu"
),
'pvpRank' => array(
null, "Private / Scout", "Corporal / Grunt",
"Sergeant / Sergeant", "Master Sergeant / Senior Sergeant", "Sergeant Major / First Sergeant",
"Knight / Stone Guard", "Knight-Lieutenant / Blood Guard", "Knight-Captain / Legionnare",
"Knight-Champion / Centurion", "Lieutenant Commander / Champion", "Commander / Lieutenant General",
"Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord"
null, "Private / Scout", "Corporal / Grunt",
"Sergeant / Sergeant", "Master Sergeant / Senior Sergeant", "Sergeant Major / First Sergeant",
"Knight / Stone Guard", "Knight-Lieutenant / Blood Guard", "Knight-Captain / Legionnare",
"Knight-Champion / Centurion", "Lieutenant Commander / Champion", "Commander / Lieutenant General",
"Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord"
),
),
'account' => array(
@@ -458,8 +466,9 @@ $lang = array(
'enabledByQDesc'=> "Para aceptar esta misión debes haber tener activa alguna de estas misiones",
'gainsDesc' => "Cuando completes esta misión ganarás",
'theTitle' => 'el título "%s"',
'mailDelivery' => "Usted recibirá esta carta %s",
'mailIn' => "después de %s",
'mailDelivery' => "Usted recibirá esta carta%s%s",
'mailBy' => ' del <a href="?npc=%d">%s</a>',
'mailIn' => " después de %s",
'unavailable' => "Esta misión fue marcada como obsoleta y no puede ser obtenida o completada.",
'experience' => "experiencia",
'expConvert' => "(o %s si se completa al nivel %d)",

View File

@@ -206,12 +206,16 @@ $lang = array(
'expansions' => ["Classique", "The Burning Crusade", "Wrath of the Lich King"],
'stats' => ["Force", "Agilité", "Endurance", "Intelligence", "Esprit"],
'sources' => array(
null, "Fabriqué", "Butin", "JcJ", "Quête", "Vendeur", "Maître", "Découverte",
"Échange d'un code", "Talent", "Débutant", "Événement", "Haut fait"
"Inconnu", "Fabriqué", "Butin", "JcJ", "Quête", "Vendeur",
"Maître", "Découverte", "Échange d'un code", "Talent", "Débutant", "Événement",
"Haut fait", null, "Marché Noir", "Désenchanté", "Pêché", "Cueilli",
"Moulu", "Miné", "Prospecté", "Subtilisé (pickpocket)", "Ferraillé", "Dépecé",
"Boutique en jeu"
),
'languages' => array(
1 => "Orc", 2 => "Darnassien", 3 => "Taurahe", 6 => "Nain", 7 => "Commun", 8 => "Démoniaque", 9 => "Titan", 10 => "Thalassien",
11 => "Draconique", 12 => "Kalimag", 13 => "Gnome", 14 => "Troll", 33 => "Bas-parler", 35 => "Draeneï", 36 => "Zombie", 37 => "Binaire gnome", 38 => "Binaire gobelin"
1 => "Orc", 2 => "Darnassien", 3 => "Taurahe", 6 => "Nain", 7 => "Commun", 8 => "Démoniaque",
9 => "Titan", 10 => "Thalassien", 11 => "Draconique", 12 => "Kalimag", 13 => "Gnome", 14 => "Troll",
33 => "Bas-parler", 35 => "Draeneï", 36 => "Zombie", 37 => "Binaire gnome", 38 => "Binaire gobelin"
),
'gl' => [null, "Majeur", "Mineur"],
'si' => [1 => "Alliance", -1 => "Alliance seulement", 2 => "Horde", -2 => "Horde seulement", 3 => "Les deux"],
@@ -222,36 +226,40 @@ $lang = array(
'ra' => [-2 => "Horde", -1 => "Alliance", "Les deux", "Humain", "Orc", "Nain", "Elfe de la nuit", "Mort-vivant", "Tauren", "Gnome", "Troll", null, "Elfe de sang", "Draeneï"],
'rep' => ["Détesté", "Hostile", "Inamical", "Neutre", "Amical", "Honoré", "Révéré", "Exalté"],
'st' => array(
"Défaut", "Forme de félin", "Arbre de vie", "Forme de voyage", "Aquatic Form",
"Forme d'ours", null, null, "Forme d'ours redoutable", null,
null, null, null, "Danse de l'ombre", null,
null, "Ghostwolf", "Posture de combat", "Posture défensive", "Posture berserker",
null, null, "Métamorphe", null, null,
null, null, "Forme de vol rapide", "Forme d'Ombre", "Forme de vol",
"Camouflage", "Forme de sélénien", "Esprit de rédemption"
"Défaut", "Forme de félin", "Arbre de vie", "Forme de voyage", "Forme aquatique", "Forme d'ours",
null, null, "Forme d'ours redoutable", null, null, null,
null, "Danse de l'ombre", null, null, "Loup fantôme", "Posture de combat",
"Posture défensive", "Posture berserker", null, null, "Métamorphe", null,
null, null, null, "Forme de vol rapide", "Forme d'Ombre", "Forme de vol",
"Camouflage", "Forme de sélénien", "Esprit de rédemption"
),
'me' => array(
null, "Charmé", "Désorienté", "Désarmé", "Distrait", "En fuite", "Maladroit", "Immobilisé",
"Pacifié", "Réduit au silence", "Endormi", "Pris au piège", "Étourdi", "Gelé", "Stupéfié", "Sanguinolent",
"Soins", "Métamorphosé", "Banni", "Protégé", "Entravé", "Monté", "Séduit", "Repous",
"Horrifié", "Invulnérable", "Interrompu", "Hébété", "Découverte", "Invulnérable", "Assommé", "Enragé"
null, "Charmé", "Désorienté", "Désarmé", "Distrait", "En fuite",
"Maladroit", "Immobilisé", "Pacifié", "Réduit au silence", "Endormi", "Pris au piège",
"Étourdi", "Gelé", "Stupéfié", "Sanguinolent", "Soins", "Métamorpho",
"Banni", "Protégé", "Entravé", "Monté", "Séduit", "Repoussé",
"Horrifié", "Invulnérable", "Interrompu", "Hébété", "Découverte", "Invulnérable",
"Assommé", "Enragé"
),
'ct' => array(
"Non classés", "Bête", "Draconien", "Démon", "Élémentaire", "Géant", "Mort-vivant", "Humanoïde",
"Bestiole", "Mécanique", "Non spécifié", "Totem", "Familier pacifique", "Nuage de gaz"
"Non classés", "Bête", "Draconien", "Démon", "Élémentaire", "ant",
"Mort-vivant", "Humanoïde", "Bestiole", "Mécanique", "Non spécifié", "Totem",
"Familier pacifique", "Nuage de gaz"
),
'fa' => array(
1 => "Loup", 2 => "Félin", 3 => "Araignée", 4 => "Ours", 5 => "Sanglier", 6 => "Crocilisque", 7 => "Charognard", 8 => "Crabe",
9 => "Gorille", 11 => "Raptor", 12 => "Haut-trotteur", 20 => "Scorpide", 21 => "Tortue", 24 => "Chauve-souris", 25 => "Hyène", 26 => "Oiseau de proie",
27 => "Serpent des vents", 30 => "Faucon-dragon", 31 => "Ravageur", 32 => "Traqueur dim.", 33 => "Sporoptère", 34 => "Raie du Néant", 35 => "Serpent", 37 => "Phalène",
38 => "Chimère", 39 => "Diablosaure", 41 => "Silithide", 42 => "Ver", 43 => "Rhinocéros", 44 => "Guêpe", 45 => "Chien du Magma", 46 => "Esprit de bête"
1 => "Loup", 2 => "Félin", 3 => "Araignée", 4 => "Ours", 5 => "Sanglier", 6 => "Crocilisque",
7 => "Charognard", 8 => "Crabe", 9 => "Gorille", 11 => "Raptor", 12 => "Haut-trotteur", 20 => "Scorpide",
21 => "Tortue", 24 => "Chauve-souris", 25 => "Hyène", 26 => "Oiseau de proie", 27 => "Serpent des vents", 30 => "Faucon-dragon",
31 => "Ravageur", 32 => "Traqueur dim.", 33 => "Sporoptère", 34 => "Raie du Néant", 35 => "Serpent", 37 => "Phalène",
38 => "Chimère", 39 => "Diablosaure", 41 => "Silithide", 42 => "Ver", 43 => "Rhinocéros", 44 => "Guêpe",
45 => "Chien du Magma", 46 => "Esprit de bête"
),
'pvpRank' => array(
null, "Private / Scout", "Corporal / Grunt",
"Sergeant / Sergeant", "Master Sergeant / Senior Sergeant", "Sergeant Major / First Sergeant",
"Knight / Stone Guard", "Knight-Lieutenant / Blood Guard", "Knight-Captain / Legionnare",
"Knight-Champion / Centurion", "Lieutenant Commander / Champion", "Commander / Lieutenant General",
"Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord"
null, "Private / Scout", "Corporal / Grunt",
"Sergeant / Sergeant", "Master Sergeant / Senior Sergeant", "Sergeant Major / First Sergeant",
"Knight / Stone Guard", "Knight-Lieutenant / Blood Guard", "Knight-Captain / Legionnare",
"Knight-Champion / Centurion", "Lieutenant Commander / Champion", "Commander / Lieutenant General",
"Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord"
),
),
'account' => array(
@@ -457,8 +465,9 @@ $lang = array(
'enabledByQDesc'=> "Vous pouvez faire cette quête seulement quand cette quête est active",
'gainsDesc' => "Lors de l'achèvement de cette quête vous gagnerez",
'theTitle' => '"%s"', // empty on purpose!
'mailDelivery' => "Vous recevrez cette lettre %s",
'mailIn' => "après %s",
'mailDelivery' => "Vous recevrez cette lettre%s%s",
'mailBy' => ' de <a href="?npc=%d">%s</a>',
'mailIn' => " après %s",
'unavailable' => "Cette quête est marquée comme obsolète et ne peut être obtenue ou accomplie.",
'experience' => "points d'expérience",
'expConvert' => "(ou %s si completé au niveau %d)",

View File

@@ -206,9 +206,11 @@ $lang = array(
'expansions' => array("World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"),
'stats' => array("к силе", "к ловкости", "к выносливости", "к интеллекту", "к духу"),
'sources' => array(
null, "Ремесло", "Добыча", "PvP", "Задание", "Продавец",
"Неизвестно", "Ремесло", "Добыча", "PvP", "Задание", "Продавец",
"Тренер", "Открытие", "Рекламная акция", "Талант", "Начальное заклинание", "Мероприятие",
"Достижение"
"Достижение", null, "Черный Рынок", "Распылено", "Вылавливается", "Собрано",
"[Milled]", "Выкапывается", "Просеивается", "Можно украсть", "Разобрано", "Собирается при снятии шкуры",
"Внутриигровой магазин"
),
'languages' => array(
1 => "орочий", 2 => "дарнасский", 3 => "таурахэ", 6 => "дворфийский", 7 => "всеобщий", 8 => "язык демонов",
@@ -463,8 +465,9 @@ $lang = array(
'enabledByQDesc'=> "Вы можете получить это задание, только когда эти задания доступны",
'gainsDesc' => "По завершении этого задания, вы получите",
'theTitle' => '"%s"', // empty on purpose!
'mailDelivery' => "[Вы получите это письмо %s]",
'mailIn' => "[через %s]",
'mailDelivery' => "Вы получите это письмо%s%s",
'mailBy' => ' от <a href="?npc=%d">%s</a>',
'mailIn' => " через %s",
'unavailable' => "пометили это задание как устаревшее — его нельзя получить или выполнить.",
'experience' => "опыта",
'expConvert' => "(или %s на %d-м уровне)",

View File

@@ -132,6 +132,7 @@ class AchievementPage extends GenericPage
/* Main Content */
/****************/
$this->mail = $this->createMail($reqBook);
$this->headIcons = [$this->subject->getField('iconString')];
$this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null;
$this->series = $series ? [[$series, null]] : null;
@@ -146,9 +147,16 @@ class AchievementPage extends GenericPage
'data' => []
);
if ($reqBook)
$this->addCss(['path' => 'Book.css']);
// create rewards
if ($foo = $this->subject->getField('rewards')[TYPE_ITEM])
if ($foo = $this->subject->getField('rewards'))
{
array_walk($foo, function(&$item) {
$item = $item[0] != TYPE_ITEM ? null : $item[1];
});
$bar = new ItemList(array(['i.id', $foo]));
foreach ($bar->iterate() as $id => $__)
{
@@ -162,8 +170,12 @@ class AchievementPage extends GenericPage
}
}
if ($foo = $this->subject->getField('rewards')[TYPE_TITLE])
if ($foo = $this->subject->getField('rewards'))
{
array_walk($foo, function(&$item) {
$item = $item[0] != TYPE_TITLE ? null : $item[1];
});
$bar = new TitleList(array(['id', $foo]));
foreach ($bar->iterate() as $__)
$this->rewards['title'][] = sprintf(Lang::$achievement['titleReward'], $bar->id, trim(str_replace('%s', '', $bar->getField('male', true))));
@@ -432,6 +444,41 @@ class AchievementPage extends GenericPage
echo $this->generateTooltip(true);
exit();
}
private function createMail(&$reqCss = false)
{
$mail = [];
if ($_ = $this->subject->getField('mailTemplate'))
{
$letter = DB::Aowow()->selectRow('SELECT * FROM ?_mailtemplate WHERE id = ?d', $_);
if (!$letter)
return [];
$reqCss = true;
$mail = array(
'delay' => null,
'sender' => null,
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject', true)),
'text' => Util::parseHtmlText(Util::localizedString($letter, 'text', true))
);
}
else if ($_ = Util::parseHtmlText($this->subject->getField('text', true, true)))
{
$reqCss = true;
$mail = array(
'delay' => null,
'sender' => null,
'subject' => Util::parseHtmlText($this->subject->getField('subject', true, true)),
'text' => $_
);
}
if ($_ = CreatureList::getName($this->subject->getField('sender')))
$mail['sender'] = sprintf(Lang::$quest['mailBy'], $this->subject->getField('sender'), $_);
return $mail;
}
}
?>

View File

@@ -532,7 +532,7 @@ class QuestPage extends GenericPage
/****************/
$this->gains = $this->createGains();
$this->mail = $this->createMail($maTab);
$this->mail = $this->createMail($maTab, $startEnd);
$this->rewards = $this->createRewards();
$this->objectives = $this->subject->parseText('objectives', false);
$this->details = $this->subject->parseText('details', false);
@@ -800,7 +800,7 @@ class QuestPage extends GenericPage
return $rewards;
}
private function createMail(&$attachmentTab)
private function createMail(&$attachmentTab, $startEnd)
{
$mail = [];
@@ -811,10 +811,23 @@ class QuestPage extends GenericPage
$mail = array(
'delay' => $delay ? sprintf(Lang::$quest['mailIn'], Util::formatTime($delay * 1000)) : null,
'sender' => null,
'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null,
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject'))
);
foreach ($startEnd as $se)
{
if (!($se['method'] & 0x2) || $se['type'] != TYPE_NPC)
continue;
if ($_ = CreatureList::getName($se['typeId']))
{
$mail['sender'] = sprintf(Lang::$quest['mailBy'], $se['typeId'], $_);
break;
}
}
$extraCols = ['Listview.extraCols.percent'];
$mailLoot = new Loot();

View File

@@ -304,7 +304,7 @@ class SpellPage extends GenericPage
for ($i = 1; $i < 4; $i++)
{
// Flat Mods (107), Pct Mods (108), No Reagent Use (256) .. include dummy..? (4)
if (!in_array($this->subject->getField('effect'.$i.'AuraId'), [107, 108, 256 /*, 4*/]))
if (!in_array($this->subject->getField('effect'.$i.'AuraId'), [107, 108, 256, 286 /*, 4*/]))
continue;
$m1 = $this->subject->getField('effect1SpellClassMask'.$j[$i]);
@@ -360,7 +360,7 @@ class SpellPage extends GenericPage
$sub[] = array(
'AND',
['s.effect'.$i.'AuraId', [107, 108, 256 /*, 4*/]],
['s.effect'.$i.'AuraId', [107, 108, 256, 286 /*, 4*/]],
[
'OR',
['s.effect1SpellClassMask'.$j[$i], $m1, '&'],
@@ -555,6 +555,8 @@ class SpellPage extends GenericPage
if ($spellLoot->getByContainer(LOOT_SPELL, $this->subject->id) || $extraItem)
{
$this->extendGlobalData($spellLoot->jsGlobals);
$lv = $spellLoot->getResult();
$extraCols = $spellLoot->extraCols;
$extraCols[] = 'Listview.extraCols.percent';
@@ -591,7 +593,7 @@ class SpellPage extends GenericPage
'name' => '$LANG.tab_contains',
'id' => 'contains',
'hiddenCols' => "$['side', 'slot', 'source', 'reqlevel']",
'extraCols' => '$'.json_encode($extraCols, JSON_NUMERIC_CHECk)
'extraCols' => '$['.implode(', ', $extraCols).']'
)
);
}

View File

@@ -382,6 +382,11 @@ class SpellsPage extends GenericPage
if ($this->filterObj->error)
$tab['params']['_errors'] = '$1';
// add source to cols if explicitly searching for it
if ($_ = $this->filterObj->getForm('setCriteria', true))
if (in_array(9, $_['cr']) && !in_array('source', $visibleCols))
$visibleCols[] = 'source';
$mask = $spells->hasSetFields(['reagent1', 'skillLines', 'trainingCost']);
if ($mask & 0x1)
$visibleCols[] = 'reagents';

View File

@@ -0,0 +1,3 @@
ALTER TABLE `aowow_achievement` CHANGE COLUMN `rewardIds` `itemExtra` MEDIUMINT(8) UNSIGNED NOT NULL AFTER `refAchievement`;
UPDATE `aowow_achievement` SET `itemExtra` = 0;
UPDATE `aowow_achievement` SET `itemExtra` = 44738 WHERE `id` = 1956;

View File

@@ -0,0 +1,13 @@
<?php
if ($m = $this->mail):
echo ' <h3>'.sprintf(Lang::$quest['mailDelivery'], $m['sender'], $m['delay'])."</h3>\n";
if ($m['subject']):
echo ' <div class="book"><div class="page">'.$m['subject']."</div></div>\n";
endif;
if ($m['text']):
echo ' <div class="book"><div class="page">'.$m['text']."</div></div>\n";
endif;
endif;
?>

View File

@@ -80,7 +80,7 @@ endforeach;
if ($r = $this->rewards):
if (!empty($r['item'])):
echo '<h3>'.Lang::$main['rewards']."</h3>\n";
$this->brick('rewards', ['rewards' => $this->rewards['item']]);
$this->brick('rewards', ['rewards' => $r['item'], 'rewTitle' => null]);
endif;
if (!empty($r['title'])):
@@ -93,9 +93,12 @@ if ($r = $this->rewards):
if (empty($r['title']) && empty($r['item']) && $r['text']):
echo '<h3>'.Lang::$main['rewards']."</h3>\n" .
'<ul><li><div><'.$r['text']."</div></li></ul>\n";
'<ul><li><div>'.$r['text']."</div></li></ul>\n";
endif;
endif;
$this->brick('mail');
?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>

View File

@@ -205,17 +205,8 @@ if ($g = $this->gains):
echo " </ul>\n";
endif;
if ($m = $this->mail):
echo ' <h3>'.sprintf(Lang::$quest['mailDelivery'], $m['delay'])."</h3>\n";
$this->brick('mail');
if ($m['subject']):
echo ' <div class="book"><div class="page">'.$m['subject']."</div></div>\n";
endif;
if ($m['text']):
echo ' <div class="book"><div class="page">'.$m['text']."</div></div>\n";
endif;
endif;
?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
</div>