mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
Updates (#65)
* Updates +Added missing images +Added report viewer as requested by icekis -Code cleanup if strict db, need to set spell to null run ALTER TABLE `myaac_spells` CHANGE `spell` `spell` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
This commit is contained in:
@@ -14,7 +14,23 @@ class Spells {
|
||||
private static $spellsList = null;
|
||||
private static $lastError = '';
|
||||
|
||||
public static function loadFromXML($show = false) {
|
||||
// 1 - attack, 2 - healing, 3 - summon, 4 - supply, 5 - support
|
||||
public static function loadGroup($tGroup) {
|
||||
switch ($tGroup) {
|
||||
case "attack":
|
||||
return 1;
|
||||
case "healing":
|
||||
return 2;
|
||||
case "summon":
|
||||
return 3;
|
||||
case "supply":
|
||||
return 4;
|
||||
case "support":
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
public static function loadFromXML($show = false) {
|
||||
global $config, $db;
|
||||
|
||||
try { $db->query('DELETE FROM `' . TABLE_PREFIX . 'spells`;'); } catch(PDOException $error) {}
|
||||
@@ -58,6 +74,8 @@ class Spells {
|
||||
'premium' => $spell->isPremium() ? 1 : 0,
|
||||
'vocations' => json_encode($spell->getVocations()),
|
||||
'conjure_count' => $spell->getConjureCount(),
|
||||
'conjure_id' => $spell->getConjureId(),
|
||||
'reagent' => $spell->getReagentId(),
|
||||
'hidden' => $spell->isEnabled() ? 0 : 1
|
||||
));
|
||||
|
||||
@@ -121,7 +139,7 @@ class Spells {
|
||||
foreach($runeslist as $spellname) {
|
||||
$spell = self::$spellsList->getRune($spellname);
|
||||
|
||||
$name = $spell->getName() . ' (rune)';
|
||||
$name = $spell->getName() . ' Rune';
|
||||
|
||||
try {
|
||||
$db->insert(TABLE_PREFIX . 'spells', array(
|
||||
|
Reference in New Issue
Block a user