[KT] Hỏi Về Phần Thưởng Tống Kim
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 2 của 2
  1. #1
    Thành Viên
    Ngày tham gia
    Jun 2009
    Bài viết
    386
    Thanks
    69
    Thanked 2 Times in 2 Posts

    Hỏi Về Phần Thưởng Tống Kim

    PHP Code:
    -----------------------------------------------------
    --
    文件名        :    battle_bouns.lua
    --创建者        :    zhouchenfei
    --创建时间        :    2007-10-23
    --功能描述        :    战场中的分值处理
    ------------------------------------------------------

    -- 
    重置积分
    function Battle:ResetBonus(pPlayernNowTime)
        
    pPlayer.Msg("Tích lũy bị trừ hết!");
        
    pPlayer.SetTask(self.TSKGIDself.TSK_BTPLAYER_TOTALBOUNS0);
        
    pPlayer.SetTask(self.TSKGIDself.TSK_BTPLAYER_LASTBOUNSTIMEnNowTime);
    end

    -- 重置使用积分上限
    function Battle:OnWeekEvent_ResetUseBouns()
        
    local nUseBouns     me.GetTask(self.TSKGIDself.TSK_BTPLAYER_USEBOUNS);
        
    Battle:DbgWrite(Dbg.LOG_INFO"OnWeekEvent_ResetUseBouns"self.TSKGIDself.TSK_BTPLAYER_USEBOUNS0);
        
    me.SetTask(self.TSKGIDself.TSK_BTPLAYER_USEBOUNS0);
    end

    -- 检查是否是新的一周
    function Battle:CheckNewWeek(pPlayernNowTime)
        
    local nLastTime              pPlayer.GetTask(self.TSKGIDself.TSK_BTPLAYER_LASTBOUNSTIME);
        
    local nLastDay             math.ceil(nLastTime / (3600 24));
        
    local nNowDay            math.ceil(nNowTime / (3600 24));
        
        if (
    nNowDay <= nLastDaythen
            
    return;
        
    end

        
    -- 从星期天开始算,为一个星期的第一天
        nLastDay             
    nLastDay 4;
        
    nNowDay                nNowDay 4;
        
    local nLastWeek        math.floor(nLastDay 7);
        
    local nNowWeek        math.floor(nNowDay 7);
        if (
    nNowWeek nLastWeekthen
            
    return 1;
        
    end
        
    return 0;
    end

    -- 处理连斩积分奖励
    function Battle:ProcessSeriesBouns(tbKillerBattleInfotbDeathBattleInfo)
        
    local nMeRank            tbDeathBattleInfo.nRank;
        
    local nPLRank            tbKillerBattleInfo.nRank;
        -- 
    符合连斩条件 计算有效连斩
        
    if (>= (nPLRank nMeRank)) then
            local nSeriesKill    
    tbKillerBattleInfo.nSeriesKill 1;
            
    tbKillerBattleInfo.nSeriesKill    nSeriesKill;

            if (
    math.fmod(nSeriesKill3) == 0then    
                tbKillerBattleInfo
    .nTriSeriesNum    tbKillerBattleInfo.nTriSeriesNum 1;
                
    self:AddShareBouns(tbKillerBattleInfoself.SERIESKILLBOUNS)
                
    tbKillerBattleInfo.pPlayer.Msg(string.format("Quân %s - %s %s liên tiếp đẩy lùi %d quân địch, nhận thưởng Liên Trảm %d điểm tích lũy."Battle.NAME_CAMP[tbKillerBattleInfo.tbCamp.nCampId], Battle.NAME_RANK[tbKillerBattleInfo.nRank], tbKillerBattleInfo.pPlayer.szNametbKillerBattleInfo.nSeriesKillself.SERIESKILLBOUNS));
            
    end

            
    if (tbKillerBattleInfo.nMaxSeriesKill nSeriesKillthen
                tbKillerBattleInfo
    .nMaxSeriesKill nSeriesKill;
            
    end
        end
        
        
    -- 计算连斩    
        local nSeriesKillNum    
    tbKillerBattleInfo.nSeriesKillNum 1;
        
    tbKillerBattleInfo.nSeriesKillNum    nSeriesKillNum;

        if (
    tbKillerBattleInfo.nMaxSeriesKillNum nSeriesKillNumthen
            tbKillerBattleInfo
    .nMaxSeriesKillNum nSeriesKillNum;
        
    end
        
    end

    -- 获得杀死玩家积分奖励
    function Battle:GiveKillerBouns(tbKillerBattleInfotbDeathBattleInfo)
        
    tbKillerBattleInfo.nKillPlayerNum    tbKillerBattleInfo.nKillPlayerNum 1;
        
        -- 
    要不要做安全性检测呢?
        local nMeRank        
    tbDeathBattleInfo.nRank;
        
    local nPLRank        tbKillerBattleInfo.nRank;
        
        
    local nRadioRank    1;
        
    nRadioRank            = (10 - (nPLRank nMeRank)) / 10;
        
    local nPoints        math.floor(Battle.tbBonusBase.KILLPLAYER nRadioRank);
        
    local nBounsDif        self:AddShareBouns(tbKillerBattleInfonPoints)
        if (
    nBounsDif 0then
            tbKillerBattleInfo
    .nKillPlayerBouns tbKillerBattleInfo.nKillPlayerBouns nPoints;
        
    end
    end

    -- 获得战旗积分奖励
    function Battle:GetTheFlagBouns(tbBattleInfo)
        
    local nCamp                tbBattleInfo.tbCamp.nCampId;
        
    local nBounsDif         self:AddShareBouns(tbBattleInfoBattle.tbBonusBase.SNAPFLAG)
        if (
    nBounsDif 0then
            tbBattleInfo
    .nFlagsBouns tbBattleInfo.nFlagsBouns Battle.tbBonusBase.SNAPFLAG;
        
    end
        tbBattleInfo
    .nFlagNum    tbBattleInfo.nFlagNum 1;
    end

    -- 获得珍宝积分奖励
    function Battle:GetTheTreasure(tbBattleInfo)
        
    local nCamp                tbBattleInfo.tbCamp.nCampId;
        
    local nBounsDif         self:AddShareBouns(tbBattleInfoBattle.tbBonusBase.GETITEM)
        if (
    nBounsDif 0then
            tbBattleInfo
    .nTreasureBouns tbBattleInfo.nTreasureBouns Battle.tbBonusBase.GETITEM;
        
    end
        tbBattleInfo
    .nTreasure    tbBattleInfo.nTreasure 1;
    end

    -- 积分换经验
    function Battle:BounsChangeExp(nLevelnBouns)
        
    local nExp 0;
        if (
    nLevel 40then
            
    return 0;
        
    end
        
        
    if (nLevel 120then
            nLevel 
    120;
        
    end
        
        nExp 
    math.floor(( 700 math.floor(( nLevel 40 ) / ) * 100 ) * 60 /3000 )    * nBouns -- 1个积分点的基础经验值
        
        local nKinId 
    me.dwKinId;
        
    local cKin KKin.GetKin(nKinId);
        if (
    cKinthen
            local nWeeklyTask 
    cKin.GetWeeklyTask();
            if (
    Kin.TASK_BATTLE == nWeeklyTaskthen
                nExp 
    math.floor(nExp 1.5);
            
    end
        end
        
    return nExp;
    end

    -- 战局结束时的声望按排名奖励
    function Battle:AwardFinalShengWang(tbPlayerList)
        
    local nNowShengWang 0;
        
    local nMaxRank        0;
        
    local nIndex        0;
        for 
    1#tbPlayerList do
            
    local tbBattleInfo     tbPlayerList[i];
            
    local nNowShengWang    0;
            
    local nRankSheng    0;
            
    local nBounsSheng    0;
            if (
    == ithen
                nRankSheng 
    Battle.tbRANKSHENGWANG[1];
            elseif (
    <= and >= ithen
                nRankSheng 
    Battle.tbRANKSHENGWANG[2];
            elseif (
    <= and 10 >= ithen
                nRankSheng 
    Battle.tbRANKSHENGWANG[3];
            elseif (
    11 <= and 20 >= ithen
                nRankSheng 
    Battle.tbRANKSHENGWANG[4];
            
    end
            
            
    for keytbRankBouns in ipairs(Battle.tbBOUNSSHENGWANG) do
                if (
    tbBattleInfo.nBouns >= tbRankBouns[1]) then
                    nBounsSheng 
    tbRankBouns[2];
                    break;
                
    end
            end
            nNowShengWang 
    nRankSheng;
            if (
    nBounsSheng nNowShengWangthen
                nNowShengWang 
    nBounsSheng;
            
    end
            local nCamp            
    tbBattleInfo.tbCamp.nCampId;
            
    tbBattleInfo.nShengWang     tbBattleInfo.nShengWang nNowShengWang;
            
    tbBattleInfo.pPlayer.Msg(string.format("Xếp hạng: <color=green>%d<color>, bạn nhận được <color=white>%d<color> điểm danh vọng chiến trường."itbBattleInfo.nShengWang));
        
    end
    end

    -- 战局结束时的声望按排名奖励
    function Battle:AwardFinalHonor(tbPlayerList)
        
    local nNowHonor 0;
        
    local nMaxRank        0;
        
    local nIndex        0;
        for 
    1#tbPlayerList do
            
    local tbBattleInfo     tbPlayerList[i];
            
    local nNowHonor    0;
            
    local nRankHonor    0;
            
    local nBounsHonor    0;
            if (
    == ithen
                nRankHonor 
    Battle.tbRANKHONOR[1];
            elseif (
    <= and >= ithen
                nRankHonor 
    Battle.tbRANKHONOR[2];
            elseif (
    <= and 10 >= ithen
                nRankHonor 
    Battle.tbRANKHONOR[3];
            elseif (
    11 <= and 20 >= ithen
                nRankHonor 
    Battle.tbRANKHONOR[4];
            
    end
            
            
    for keytbRankBouns in ipairs(Battle.tbBOUNSHONOR) do
                if (
    tbBattleInfo.nBouns >= tbRankBouns[1]) then
                    nBounsHonor 
    tbRankBouns[2];
                    break;
                
    end
            end
            nNowHonor 
    nRankHonor;
            if (
    nBounsHonor nNowHonorthen
                nNowHonor 
    nBounsHonor;
            
    end
            local nCamp            
    tbBattleInfo.tbCamp.nCampId;
            
    tbBattleInfo.nHonor tbBattleInfo.nHonor nNowHonor;
            
    tbBattleInfo.pPlayer.Msg(string.format("Xếp hạng: <color=green>%d<color>, bạn nhận được <color=white>%d<color> điểm vinh dự chiến trường."itbBattleInfo.nHonor));
        
    end
    end

    -- 战局结束时的功勋按排名奖励
    function Battle:AwardFinalGongXun(tbPlayerList)
    --    
    local nNowGongXun     0;
    --    
    local nMaxRank        0;
    --    
    local nIndex        0;
    --    for 
    1#tbPlayerList do
    --        if (nMaxRankthen
    --            nIndex nIndex 1;
    --            if (
    not self.tbGONGXUNRANK[nIndex]) then
    --        --        print("self.tbSHENGWANGRANK[nIndex] error (Battle:AwardFinalGongXun(tbPlayerList, tbBattleAwardSheng))");
    --            
    end
    --            nMaxRank        self.tbGONGXUNRANK[nIndex][1];
    --            
    nNowGongXun        self.tbGONGXUNRANK[nIndex][2];
    --        
    end
    --        local tbBattleInfo     tbPlayerList[i];
    --        
    local nGongXun         tbBattleInfo.nGongXun nNowGongXun;
    --        
    local nCamp            tbBattleInfo.tbCamp.nCampId;
    --        
    tbBattleInfo.pPlayer.Msg(string.format("排名为:<color=green>%d<color>,你获得了<color=white>%d<color>点战场功勋值奖励。"inGongXun));
    --        
    tbBattleInfo.nGongXun nGongXun;
    --    
    end
    end

    function Battle:AwardFinalWeiWang(tbPlayerListnBattleLevel)
        if (
    not tbPlayerListthen
            
    return;
        
    end
        local nFlag 
    0;
        
    local nOpenTime KGblTask.SCGetDbTaskInt(DBTASD_SERVER_SETMAXLEVEL99);
        if (
    nOpenTime <= 0then
            nFlag 
    1;
        else
            if (
    nBattleLevel >= 2then
                nFlag 
    1;
            
    end
        end
        
    for iv in ipairs(tbPlayerList) do
            if (
    self.tbWeiWangRank[1] == ithen
                self
    :AwardWeiWang(v1050);    -- 冠军有6点威望
            
    elseif (self.tbWeiWangRank[1] < and self.tbWeiWangRank[2] >= ithen
                self
    :AwardWeiWang(v840);
            elseif (
    self.tbWeiWangRank[2] and self.tbWeiWangRank[3] >= ithen
                self
    :AwardWeiWang(v630);
            else
                if (
    nFlag == 1then
                    local nBouns 
    v.nBouns;
                    if (
    4500 <= nBounsthen
                        self
    :AwardWeiWang(v5201);
                    elseif (
    3000 <= nBounsthen
                        self
    :AwardWeiWang(v4201);
                    elseif (
    1800 <= nBounsthen
                        self
    :AwardWeiWang(v3151);
                    elseif (
    1500 <= nBounsthen
                        self
    :AwardWeiWang(v2151);
                    elseif (
    1200 <= nBounsthen
                        self
    :AwardWeiWang(v2101);
                    elseif (
    800 <= nBounsthen
                        self
    :AwardWeiWang(v1101);
                    elseif (
    500 <= nBounsthen
                        self
    :AwardWeiWang(v0101);
                    
    end            
                end
            end
        end
    end

    function Battle:AwardFinalOffer(tbPlayerListnBattleLevel)
        if (
    not tbPlayerListthen
            
    return;
        
    end 
        local nStockBaseCount 
    0;
        for 
    iv in ipairs(tbPlayerList) do
            if (
    >= and <= 3then
                self
    :AwardOffer(v150);    -- 前3名有150的贡献度
                nStockBaseCount 
    100;
            elseif (
    <= and 10 >= ithen
                self
    :AwardOffer(v120);    -- 前10名有120的贡献度
                nStockBaseCount 
    80;
            elseif (
    >= 10 and 20 >= ithen
                self
    :AwardOffer(v100);    -- 前20名有100的贡献度
                nStockBaseCount 
    60;
            else
                
    local nBouns v.nBouns;
                if (
    5000 <= nBounsthen
                    self
    :AwardOffer(v80); -- 5000积分以上的有80的贡献度
                    nStockBaseCount 
    50;
                elseif (
    5000 nBouns and 4000 <= nBounsthen
                    self
    :AwardOffer(v60); -- 4000积分以上的有60的贡献度
                    nStockBaseCount 
    30;
                elseif (
    4000 nBouns and 3000 <= nBounsthen
                    self
    :AwardOffer(v40);    -- 3000积分以上的有40的贡献度
                    nStockBaseCount 
    20;
                elseif (
    3000 nBouns and 1500 <= nBounsthen
                    self
    :AwardOffer(v30);    -- 1500积分以上的有30的贡献度
                    nStockBaseCount 
    10;
                
    end
            end
            
    if and v.pPlayer then
                
    -- 增加建设资金和族长、个人的股份
                Tong
    :AddStockBaseCount_GS1(v.pPlayer.nIdnStockBaseCount0.750.20.0500WeeklyTask.GETOFFER_TYPE_BATTLE);
            
    end
            
            
    if (and <= 20 and nBattleLevel == 3then
                
    -- 成就:高级战场前20名
                Achievement
    :FinishAchievement(v.pPlayer.nIdAchievement.BATTLE_GAOJI_20);
            
    end
        end
    end

    function Battle:AwardOffer(tbBattleInfonOffer)
        
    local pPlayer tbBattleInfo.pPlayer;
        if (
    not pPlayerthen
            
    return 0;
        
    end
        pPlayer
    .AddOfferEntry(nOfferWeeklyTask.GETOFFER_TYPE_BATTLE);
    end

    function Battle:AwardWeiWang(tbBattleInfonWeiWangnGongXiannFlag)
        
    local pPlayer tbBattleInfo.pPlayer;
        if (
    not pPlayerthen
            
    return 0;
        
    end
        
        
    -- 加入帮会,并且帮会通过考验期 by zhangjinpin@kingsoft
        
    if nFlag == 1 then
            
    if not pPlayer.dwTongId or pPlayer.dwTongId == 0 then
                
    return 0;
            
    end
        
            local pTong 
    KTong.GetTong(pPlayer.dwTongId);
            if 
    not pTong or pTong.GetTestState() ~= 0 then
                
    return 0;
            
    end
        end
        
    -- end

        
    if tbBattleInfo.tbMission and tbBattleInfo.tbMission.nBattleLevel then
            
    if tbBattleInfo.tbMission.nBattleLevel == and TimeFrame:GetStateGS("OpenOneFengXiangBattle") == 1 then
                nWeiWang 
    math.floor(nWeiWang 2);
            
    end
            pPlayer
    .AddKinReputeEntry(nWeiWang"battle");
        
    end
    end

    function Battle:AwardFinalXinDe(tbPlayerList)
        if (
    not tbPlayerListthen
            
    return;
        
    end
        
    for 1#tbPlayerList do
            
    if (== ithen
                self
    :AwardXinDe(tbPlayerList[i].pPlayer300000);    -- 冠军由6点威望
            
    elseif (<= and 10 >= ithen
                self
    :AwardXinDe(tbPlayerList[i].pPlayer200000);
            else
                
    local nBouns tbPlayerList[i].nBouns;
                if (
    3000 nBounsthen
                    self
    :AwardXinDe(tbPlayerList[i].pPlayer150000);
                elseif (
    3000 >= nBouns and 500 <= nBounsthen
                    self
    :AwardXinDe(tbPlayerList[i].pPlayer100000);
                
    end
            end
        end    
    end

    function Battle:AwardXinDe(pPlayernXinDe)
        if (
    nXinDe <= 0then
            
    return;
        
    end
        Setting
    :SetGlobalObj(pPlayer);
        
    Task:AddInsight(nXinDe);
        
    Setting:RestoreGlobalObj();
    end

    -- 奖励积分大于3000的玩家可以获得物质奖励
    function Battle:AwardFinalGoods(tbPlayerListnBattleLevel)
        if (
    not tbPlayerListthen
            
    return;
        
    end
        
        local nItemId 
    self.tbPaiItemId[nBattleLevel];
        for 
    1#tbPlayerList do
            
    local nBouns    tbPlayerList[i].nBouns;
            
    local pPlayer    tbPlayerList[i].pPlayer;
            if (
    self.tbAWARDBOUNS[1] <= nBounsthen
                pPlayer
    .SetTask(self.TSKGIDself.TSK_BTPLAYER_ZHANCHANGLINGPAInItemId);
                
    pPlayer.SetTask(self.TSKGIDself.TSK_BTPLAYER_FUDAI ,2);
                
    Dialog:SendInfoBoardMsg(pPlayer"Gặp Hiệu Úy Mộ Binh ở Báo danh chiến trường nhận thưởng.");
            elseif (
    self.tbAWARDBOUNS[2] <= nBounsthen
                pPlayer
    .SetTask(self.TSKGIDself.TSK_BTPLAYER_FUDAI ,1);
                
    Dialog:SendInfoBoardMsg(pPlayer"Gặp Hiệu Úy Mộ Binh ở Báo danh chiến trường nhận thưởng.");
            
    end
            
    if (nBouns 0then
                pPlayer
    .SetTask(self.TSKGIDself.TSK_BTPLAYER_BOUNSFORWARD1);
            
    end
        end    
    end

    -- 师徒成就:战场
    function Battle:GetAchievement(tbPlayerListnBattleLevel)
        if (
    not tbPlayerListthen
            
    return;
        
    end
        
    -- nBattleLevel 1(初级 扬州),2(中级 凤翔),3(高级 襄阳)
        
    for 1#tbPlayerList do
            
    local pPlayer tbPlayerList[i].pPlayer;
            -- 
    目前成就系统里面只需要添加扬州战场成就,如果以后要添加其他的,可以在这里补充
            
    if (pPlayer and nBattleLevel == 1then
                Achievement
    :FinishAchievement(pPlayer.nIdAchievement.BATTLE_YANGZHOU);
            
    end
        end
    end

    -- 获得一个战场令牌
    function Battle:AwardGood(pPlayernItemIdnPaiCountnFuCountnBounsnBattleLevel)
        
    local nFreeCounttbExecute SpecialEvent.ExtendAward:DoCheck("Battle"pPlayernBounsnBattleLevel);
        
        if (
    pPlayer.CountFreeBagCell() < (nPaiCount nFuCount nFreeCount) * Battle.nTimes then
            
    return 0;
        
    end
        
    for 1Battle.nTimes do
            if (
    nPaiCount 0then
                pPlayer
    .AddItem(18,1,112,nItemId);
                
    self:WriteLog("AwardGood"string.format("Give player %s a zhanchanglingpai"pPlayer.szName));
                
    pPlayer.SetTask(self.TSKGIDself.TSK_BTPLAYER_ZHANCHANGLINGPAI0);
            
    end
            
    if (nFuCount 0then
                
    for i=1nFuCount do
                    
    local pItem pPlayer.AddItem(18,1,114,9);
                          
    pItem pPlayer.AddBindCoin(10000);
                    
    assert(pItem);
                    
    self:WriteLog("AwardGood"string.format("Give player %s a fudai"pPlayer.szName));
                    --
    local szDate os.date("%Y/%m/%d/%H/%M/%S"GetTime() + 3600 48);
                    --
    pPlayer.SetItemTimeout(pItemszDate);
                    --
    pItem.Sync();
                
    end
                pPlayer
    .SetTask(self.TSKGIDself.TSK_BTPLAYER_FUDAI0);
            
    end
            
    if (nBouns 0then
                local nMyUserBouns        
    self:GetMyUseBouns();
                
    local nFinalBouns        nBouns;
                if (
    nMyUserBouns nBouns self.BATTLES_POINT2EXP_MAXEXPthen
                    nFinalBouns 
    self.BATTLES_POINT2EXP_MAXEXP nMyUserBouns;
                
    end
                local nExp                 
    self:BounsChangeExp(pPlayer.nLevelnFinalBouns) * self.BOUNS2EXPMUL;
                if (
    nExp 0then
                    pPlayer
    .AddExp(nExp);
                
    end
                self
    :AddUseBouns(pPlayernFinalBounsnMyUserBouns);
                
    pPlayer.SetTask(Battle.TSKGIDBattle.TSK_BTPLAYER_TOTALBOUNS0);
            
    end
            SpecialEvent
    .ExtendAward:DoExecute(tbExecute);
        
    end
        
    return 1;
    end

    -- 更新每天玩家最大功勋值
    function Battle:UpdatePlayerHonorAndShengWang(tbPlayerList)
        for 
    _tbBattleInfo in pairs(tbPlayerList) do
            
    tbBattleInfo:SetPlayerHonor();
            
    tbBattleInfo:SetPlayerShengWang();
        
    end
    end

    -- 如果玩家的身份是未出师弟子,那么他的师徒任务当中的宋金战场次数加1
    function Battle:UpdateShiTuBattleCount(tbPlayerList)
        if (
    not tbPlayerListthen
            
    return;
        
    end
        local tbItem 
    Item:GetClass("teacher2student");
        for 
    iv in ipairs(tbPlayerList) do
            
    local pPlayer v.pPlayer;
            if (
    pPlayerthen
                
    if (pPlayer.GetTrainingTeacher()) then
                    local tbBattleInfo    
    Battle:GetPlayerData(pPlayer);
                    
    local nEnterBattleTime tbBattleInfo.nEnterBattleTime;
                    
    local nCurTime GetTime();
                    
    local nInBattleTime nCurTime nEnterBattleTime;
                    if (
    tbItem.BATTLE_VALID_TIME <= nInBattleTimethen
                        local nNeed_Battle 
    pPlayer.GetTask(Relation.TASK_GROUPRelation.TASK_ID_SHITU_BATTLE) + 1;
                        
    pPlayer.SetTask(Relation.TASK_GROUPRelation.TASK_ID_SHITU_BATTLEnNeed_Battle);
                    
    end
                end
            end
        end
    end

    -- 计算离上次更新时间过了多少天
    function Battle:CalculateDay(nLastTimenNowTime)
        
    local nLastDay     math.ceil(nLastTime / (3600 24));
        
    local nNowDay    math.ceil(nNowTime / (3600 24));
        
    local nDays        nNowDay nLastDay;
        if (
    nDays 0then
            nDays 
    0;
        
    end
        
    return nDays;
    end

    -- 清零
    function Battle:ClearBouns(pPlayer)
        
    self:SetTotalBouns(pPlayer0);
    end

    -- 个人玩家奖励
    function Battle:AwardPlayerList(tbPlayerReaultListnBattleLevel)
        
    self:AwardFinalHonor(tbPlayerReaultList);
        
    self:AwardFinalShengWang(tbPlayerReaultList);
        
    self:UpdatePlayerHonorAndShengWang(tbPlayerReaultList);
        
    self:UpdateShiTuBattleCount(tbPlayerReaultList);
        
    self:AwardFinalWeiWang(tbPlayerReaultListnBattleLevel);
        
    self:AwardFinalOffer(tbPlayerReaultListnBattleLevel);
        
    self:AwardFinalXinDe(tbPlayerReaultList);
        
    self:AwardFinalGoods(tbPlayerReaultListnBattleLevel);
        
    self:GetAchievement(tbPlayerReaultListnBattleLevel);
    end

    function Battle:_BTPrint(tbPlayerReaultList)
        print(
    "szName, nBouns, nGongXun, nShengWang");
        for 
    _tbBattleInfo in ipairs(tbPlayerReaultList) do
            print(
    tbBattleInfo.pPlayer.szNametbBattleInfo.nBounstbBattleInfo.nGongXuntbBattleInfo.nShengWang);
        
    end
    end

    -- 累加积分--TODO
    function Battle:AddUseBouns(pPlayernChangeBounsnMyUserBouns)
        if (
    == nChangeBounsthen
            
    return;
        
    end
        pPlayer
    .SetTask(Battle.TSKGIDBattle.TSK_BTPLAYER_USEBOUNSnChangeBouns nMyUserBouns);
    end

    -- 获得已用积分记录--TODO
    function Battle:GetMyUseBouns()
        
    local nMyBouns me.GetTask(Battle.TSKGIDBattle.TSK_BTPLAYER_USEBOUNS);
        return 
    nMyBouns;
    end

    function Battle:AddShareBouns(tbBattleInfonBouns)
        
    local tbShareTeamMember tbBattleInfo.pPlayer.GetTeamMemberList(1);
        if (
    not tbShareTeamMemberthen
            
    return tbBattleInfo:AddBounsWithCamp(nBouns);
        
    end
        
        local nResult    
    0;    
        
    local nCount    #tbShareTeamMember;
        
    if (nCountthen
            local nTimes    
    self.tbPOINT_TIMES_SHARETEAM[nCount];
            
    local nPoints    nBouns nTimes;
            
    nResult            tbBattleInfo:AddBounsWithCamp(nPoints);
        
    end

    -- 组队共享暂时不用
    --    for _pPlayer in pairs(tbShareTeamMember) do
    --        if (
    pPlayer.nId ~= tbBattleInfo.pPlayer.nIdthen
    --            local nFactionnRoutId self:GetFactionNumber(pPlayer);
    --            if (
    ~= nFactionthen
    --                local nTimes    self.tbPOINT_TIMES_SHAREFACTION[nFaction][nRoutId];
    --                
    local nPoints    nBouns nTimes;
    --                
    self:GetPlayerData(pPlayer):AddBounsWithCamp(nPoints);
    --            
    end
    --        end
    --    end
        
    return nResult;
    end

    function Battle:GetFactionNumber(pPlayer)
        
    local nFaction     pPlayer.nFaction;
        if (
    == nFactionthen
            Battle
    :DbgOut("GetFactionNumber"pPlayer.szName"Chưa gia nhập môn phái!");
            return 
    0;
        
    end
        local nRouteId    
    pPlayer.nRouteId;
        if (
    == nRouteIdthen
            Battle
    :DbgOut("GetFactionNumber"pPlayer.szName"Chưa chọn nhánh, không thể nhận Mật tịch môn phái!");
            return 
    0;
        
    end
        
    return nFactionnRouteId;
    end

    function Battle:OnWeekEvent_ResetBattleHonor()
        -- 
    TODO 排名
        local pPlayer 
    me;
        for 
    self.TSK_BTPLAYER_HONOR1self.TSK_BTPLAYER_HONOR4do
            
    pPlayer.SetTask(self.TSKGIDi0);
        
    end
    end

    function Battle:GetRemainJunXu()
        
    local nRemainJunXu me.GetTask(self.TSKGIDself.TSK_BTPLAYER_JUNXU);
        return 
    nRemainJunXu;
    end


    PlayerSchemeEvent
    :RegisterGlobalWeekEvent({Battle.OnWeekEvent_ResetUseBounsBattle});
    PlayerSchemeEvent:RegisterGlobalWeekEvent({Battle.OnWeekEvent_ResetBattleHonorBattle}); 

    Giờ mình muốn sủa cho xếp hạng từ 1-10 được nhận phần thưởng là huyền tinh thì phải sửa ở đâu ai biết xin chỉ giúp
    Khách viếng thăm hãy cùng dianguc.vn xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. #2
    Thành Viên
    Ngày tham gia
    Jun 2009
    Bài viết
    386
    Thanks
    69
    Thanked 2 Times in 2 Posts

    Ðề: Hỏi Về Phần Thưởng Tống Kim

    Uppppppppppppppppppppppppppppppppppppppppppppppppp pppppp
    Khách viếng thăm hãy cùng dianguc.vn xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 08:29 PM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.