예제 #1
0
void BattleInfo::battle(Battle const & battle)
{
    battleId_ = battle.id();

    setMapImage(battle);
    setHeaderText(battle);
}
예제 #2
0
void BattleInfo::userLeftBattle(User const & user, const Battle & battle)
{
    if (battle.id() == battleId_)
    {
        setHeaderText(battle);
    }
}
예제 #3
0
void BattleInfo::battleClosed(const Battle & battle)
{
    if (battle.id() == battleId_)
    {
        reset();
    }
}
예제 #4
0
void BattleInfo::battleChanged(const Battle & battle)
{
    if (battle.id() == battleId_)
    {
        if (currentMapImage_ != battle.mapName())
        {
            setMapImage(battle);
        }
        setHeaderText(battle);
    }
}
예제 #5
0
파일: roll.cpp 프로젝트: Zhanyin/taomee
bool set_player_roll_point(Player* p, uint32_t battle_id, uint32_t roll_id, int32_t roll_flag, int32_t& roll_point)
{
	Battle* btl = p->btl;
	if(btl->id() != battle_id){
		return false;
	}

	battle_roll_data *pdata = btl->get_battle_roll_data_by_roll_id(roll_id);
	if(pdata == NULL){
		return false;
	}
	
	bool ret = pdata->player_roll_point(roll_id, p->id, roll_point, roll_flag);
	if(ret == false){
		return false;
	}
	ret = pdata->is_roll_finish(roll_id);
	return pdata->check_delete();
}