Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function write(data_base &$db, $data)
- {
- $is_won = $data["win_state"];
- $this->games++;
- $is_won === TRUE and $this->wins++;
- $this->gold += $data["gold"];
- $this->kills += $data["kills"];
- $this->deaths += $data["deaths"];
- $this->assists += $data["assists"];
- $this->last_hits += $data["last_hits"];
- $currentGames = $this->games + 1;
- if ($this->games > 2)
- {
- $this->gold_per_min = ($this->gold_per_min + $data["gold_per_min"]) / $currentGames;
- $this->xp_per_minute = ($this->xp_per_minute + $data["xp_per_minute"]) / $currentGames;
- $this->net_worth = ($this->net_worth + $data["net_worth"]) / $currentGamess;
- }
- $this->gold_spent += $data["gold_spent"];
- $this->hero_damage += $data["hero_damage"];
- $this->tower_damage += $data["tower_damage"];
- $this->hero_healing += $data["hero_healing"];
- $this->hero_pick_order = round($currentGames / 106, 2);
- $this->is_using_plus == 1 and $this->plus_status_verify($db);
- $this->update_game_rating($db, $data);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement