private static function HandleMounts() { if (!self::$m_mounts) { self::LoadMounts(); } self::$m_mounts_count = array('collected' => 0, 'not_collected' => 0); foreach (self::$m_mounts as &$mount) { $type = -1; switch ($mount['source']) { case SOURCE_TYPE_QUEST: $type = 'quest'; break; case SOURCE_TYPE_DROP: $type = 'drop'; break; case SOURCE_TYPE_PROFESSION: $type = 'prof'; break; case SOURCE_TYPE_ACHIEVEMENT: $type = 'achv'; break; case SOURCE_TYPE_FACTION: $type = 'faction'; break; case SOURCE_TYPE_EVENT: $type = 'event'; break; case SOURCE_TYPE_PROMOTION: $type = 'promo'; break; case SOURCE_TYPE_PET_STORE: $type = 'store'; break; case SOURCE_TYPE_CARD_GAME: $type = 'tgc'; break; case SOURCE_TYPE_TRAINER: case SOURCE_TYPE_OTHER: $type = 'other'; break; case SOURCE_TYPE_VENDOR: $type = 'vendor'; break; } if ($type == -1) { continue; } $mount['source_type'] = $type; $mount['add_styles'] = $type; if ($mount['type'] == 1) { switch ($mount['mount_type']) { case 1: $mount['add_styles'] .= ' ground'; break; case 2: $mount['add_styles'] .= ' flying'; break; case 3: $mount['add_styles'] .= ' aquatic'; break; } } if (in_array($mount['spell'], self::$m_spells)) { ++self::$m_mounts_count['collected']; $mount['add_styles'] .= ' is-collected'; } else { ++self::$m_mounts_count['not_collected']; $mount['add_styles'] .= ' not-collected'; } } return true; }