$NPCInfo = Zones::GetNPCInfo($BossInfo['entry']); switch (str_replace('.frag', '', $_REQUEST['datatype'])) { case 'loot': $BossLoot = array(); $BossLoot['dungortenman'] = Zones::GetBossLoot($NPCInfo['lootid']); $LootAmount = count($BossLoot['dungortenman']); for ($i = 1; $i <= 3; $i++) { if ($NPCInfo['difficulty_entry_' . $i] != 0) { if ($i == 1) { $BossLoot['dungheroicortenman'] = Zones::GetBossLoot($NPCInfo['difficulty_entry_' . $i]['lootid']); $LootAmount = $LootAmount + count($BossLoot['dungheroicortenman']); } elseif ($i == 2) { $BossLoot['twentyfive'] = Zones::GetBossLoot($NPCInfo['difficulty_entry_' . $i]['lootid']); $LootAmount = $LootAmount + count($BossLoot['twentyfive']); } elseif ($i == 2) { $BossLoot['twentyfiveheroic'] = Zones::GetBossLoot($NPCInfo['difficulty_entry_' . $i]['lootid']); $LootAmount = $LootAmount + count($BossLoot['twentyfiveheroic']); } } } $Smarty->assign('LootAmount', $LootAmount); $Smarty->assign('BossLoot', $BossLoot); break; case 'achievements': $Achievements = Zones::GetBossAchievements($NPCInfo['entry']); $Smarty->assign('AchievementsCount', count($Achievements)); $Smarty->assign('Achievements', $Achievements); break; } $Smarty->display('fragments/boss/' . str_replace('.frag', '', $_REQUEST['datatype'])); }