Example #1
0
 public function class_display_name()
 {
     return char_class_name($this->id());
 }
Example #2
0
     // Class Change Buy
     $class_change_error = null;
     if ($classChangeSequence == 2 && $current_class_untrusted == $userClass && $destination_class_identity) {
         // Class change requested, not a page refresh, and requested class is existant.
         if (!$class_change_requirement_error) {
             // Class change conditions are ok, so:
             // subtract the cost in turns
             // ...and change the class.
             $class_change_error = set_class($char_id, $destination_class_identity);
             if (!$class_change_error) {
                 $char->changeTurns(-1 * $class_change_cost);
             }
         }
     }
     $possibly_changed_class = char_class_identity($char_id);
     $possibly_changed_class_name = char_class_name($char_id);
     $possibly_changed_class_theme = class_theme($possibly_changed_class);
     $upgrade_requested = $in_upgrade && $in_upgrade == 1;
     $levelled = false;
     if ($upgrade_requested) {
         // Try to level up.
         $levelled = level_up_if_possible($char_id);
         $char = $player = new Player($char_id);
         $userLevel = $char->level();
         $char_data = $char->data();
         // Get the info for the next level, especially if that has changed.
         $nextLevel = min($userLevel + 1, $max_level);
         $userKills = char_kills($char_id);
         $required_kills = required_kills_to_level($userLevel);
     }
 }