btl.h 777 Bytes
#pragma once

#include <common.h>
#include <common_msg.pb.h>

class user_t;

struct table_pet_t{
	PET_ID pet_id;
	PET_LV pet_lv;
	int shoot;
	table_pet_t(){
		this->pet_id = 0;
		this->pet_lv = 0;
		this->shoot = 0;
	}
};
class btl_mgr_t : public el::lib_timer_base_t
{
public:
	btl_mgr_t();
	virtual ~btl_mgr_t();
	user_t* user;
	el::lib_timer_t::lib_timer_sec_t* time_out_handle;
	bool is_btl;
	int shoot;
	std::vector<table_pet_t> table_pet_vec;
	std::vector<table_pet_t> pet_lv_vec;
	std::vector<table_pet_t> peer_pet_lv_vec;
	std::vector<uint32_t> win_vec;
	void begin();
	void end(bool win, uint32_t add_exp);

	//  [2018/9/26 Administrator]
	void cal();

	uint32_t cal_ret(table_pet_t tp_ai, table_pet_t tp_user);
	static int time_out(void* owen, void* data);

};