Browse Source

fixed: 创建账号操作时未更新分区记录.

gwang 4 years ago
parent
commit
0a4b292b31
2 changed files with 3 additions and 1168 deletions
  1. 3 2
      Gameserver/Amfphp/process/UserProc.php
  2. 0 1166
      Gameserver/Amfphp/process/del_MissProc.php

+ 3 - 2
Gameserver/Amfphp/process/UserProc.php

@@ -207,6 +207,7 @@ class UserProc {
             $userinfo = self::createUser($req, $rolename, $gender, $profile_img);
             if (1 == self::regRole($req->zoneid, $userID, $rolename, $gender, $profile_img, $userinfo->getPlatStr())) {
                 $resp = Resp::ok($userinfo);
+                self::updtateUserZoneInfo($req);
             } else {
                 $resp = Resp::err(ErrCode::err_db);
             }
@@ -533,9 +534,9 @@ class UserProc {
 
     /**
      * 更新玩家分区记录
-     * @param Req $req
      */
-    public static function updtateUserZoneInfo($req) {
+    public static function updtateUserZoneInfo() {
+        $req = req();
         $userZoneInfo = self::getUserZoneInfo($req);                            # 取玩家分区记录
         if (!$userZoneInfo) {
             $userZoneInfo = new Data_UserZoneInfo;

+ 0 - 1166
Gameserver/Amfphp/process/del_MissProc.php

@@ -1,1166 +0,0 @@
-<?php
-
-/**
- * Description of GoalProc
- * 任务处理流程
- * @author jgao
- */
-class MissProc {
-    //put your code here
-
-    /**
-     * 获得任务卡列表
-     * @param type $args
-     */
-    static function onMissionCardList($args) {
-        $storeInfo = usrInfo()->storeInfo();
-        return array(
-            'missCardDict' => $storeInfo->misCardDict,
-        );
-    }
-
-    /**
-     * 开启任务卡
-     */
-    static function onStartMissionCard($args) {
-        $id = $args->id;
-        $storeInfo = usrInfo()->storeInfo(true);
-        $missInfo = usrInfo()->missInfo(true);
-        if (!$storeInfo->hasMissionCard($id)) {
-            // 错误:没有这张任务卡
-            return Errcode::err_miss_nomisscard;
-        }
-        if ($storeInfo->checkSameTypeMissionCardHasStarted($id)) {
-            // 错误:已开启同类型任务卡
-            return Errcode::err_miss_sametypehasopen;
-        }
-
-        $ins = $storeInfo->startMissionCard($id); // 任务卡置为开启状态
-        $missCardMo = dataCenter()->getMissionCardData($ins->tid);
-        $missList = strsplit_raw($missCardMo->misslist);
-        if (count($missList) <= 0) {
-            // 错误:配置数据出错
-            return Errcode::default_;
-        }
-        // 自动挂载任务卡的第一个任务
-        $missIns = $missInfo->addMission($missList[0]);
-        $missIns->card = $id;
-        return succeed();
-    }
-
-    /**
-     * 任务卡兑换奖励
-     */
-    static function onFinishMissionCard($args) {
-        $ids = $args->ids;
-        $storeInfo = usrInfo()->storeInfo(true);
-        $missInfo = usrInfo()->missInfo(true);
-        $prizes = array();
-        foreach ($ids as $id) {
-            if (!$storeInfo->hasMissionCard($id)) {
-                // 错误:没有这张任务卡
-                return Errcode::err_miss_nomisscard;
-            }
-            $ins = $storeInfo->getMissionCard($id);
-            $state = $ins->getState();
-            if ($state != MissionCardStateType::finish) {
-                // 错误:任务链尚未完成
-                return Errcode::err_miss_notfinish;
-            }
-            $missCardMo = dataCenter()->getMissionCardData($ins->tid);
-            array_pushs($prizes, usrInfo()->modifyPrizes($missCardMo->prize));
-            // 清理任务卡名下所有子任务的完成痕迹(避免后续影响任务卡是否完成的判断)
-            $missList = strsplit_raw($missCardMo->misslist);
-            foreach ($missList as $missId) {
-                dict_remove($missInfo->overMissions, $missId);
-            }
-            $storeInfo->delMissionCard($id); // 删除这张任务卡
-        }
-        return array(
-            'prizes' => $prizes,
-        );
-    }
-
-    /**
-     * 完成任务
-     * @param RequestVo $req
-     */
-    static function onFinishMission($args) {
-        $id = $args->id;
-        $missInfo = usrInfo()->missInfo(true);
-        $baseInfo = usrInfo()->baseInfo(true);
-        // 检测今日是否已经做过该任务
-        if (!$missInfo->hasMission($id)) {
-            // 尚未接取此任务
-            return ErrCode::err_miss_noting;
-        }
-
-        $ing = $missInfo->GetMission($id);
-
-        if (!$ing->isFinish()) {
-            // 任务尚未完成
-            return ErrCode::err_miss_notfinish;
-        }
-        $ctx = dataCenter()->getMissionConst($id);
-        if ($ctx == null) {
-            // 任务模板数据缺失
-            return ErrCode::default_;
-        }
-        if ($ctx->vip != 0 && $ctx->vip != $baseInfo->vip) {
-            // vip等级错误
-            return ErrCode::default_;
-        }
-        if ($ctx->start != "") {
-            $startInfo = strsplit_raw($ctx->start, ":");
-            $start = $startInfo[0] * 3600 + $startInfo[1] * 60 + $startInfo[2];
-            $endInfo = strsplit_raw($ctx->end, ":");
-            $end = $endInfo[0] * 3600 + $endInfo[1] * 60 + $endInfo[2];
-            $date = datetime();
-            $now = $date->hours * 3600 + $date->minutes * 60 + $date->seconds;
-            if ($start > $now || $end < $now) {
-                // 完成时间不满足条件
-                return ErrCode::default_;
-            }
-        }
-
-        $ctx_prizes = "";
-        if ($ctx->prizes != "") { // 如果有奖励,则直接应用之
-            $ctx_prizes = $ctx->prizes;
-        } else {
-            #m没有奖励--待定
-        }
-        $prizes = usrInfo()->modifyPrizes($ctx_prizes);
-        $missInfo->finishMission($id);
-        if ($ctx->next != 0) {
-            if ($ctx->next == 999999) { // 未完待续任务标志字
-                $missInfo->contMissions->$id = "continue..";
-            } else {
-                $ing = $missInfo->addMission($ctx->next);
-                self::DealToServer(array($ing));
-            }
-        }
-
-        $result = array(
-            'ret' => "succeed!",
-            'prizes' => $prizes,
-            'miss' => $missInfo,
-        );
-        return $result;
-    }
-
-    /**
-     * 自动修复状态型任务
-     * @param RequestVo $req
-     */
-    static function autoRecoverStateMissions() {
-        $missInfo = usrInfo()->missInfo(true);
-        foreach ($missInfo->ingMissions as $key => $ing) {
-            $ing->autoCalcStatusCur();
-            self::chechIngMissIsAuto($ing->id); // 判断自动完成的任务是否需要自动对齐完成状态
-        }
-    }
-
-    /**
-     * 自动起始的任务
-     * @param RequestVo $req
-     */
-    static function autoStartingMissions() {
-        $missList = dataCenter()->getMissionConst();
-        $missInfo = usrInfo()->missInfo(true);
-        foreach ($missList as $id => $val) {
-            if ($val->etc == "1") {
-                if (!$missInfo->hasMission($id) &&
-                        !$missInfo->onceFinished($id)) {
-                    $missInfo->addMission($id);
-                }
-            }
-        }
-    }
-
-    /**
-     * 待续任务重新续接
-     * @param RequestVo $req
-     */
-    static function autoRecontinueMissions() {
-        $dirtyContiMissions = array();
-        $missInfo = usrInfo()->missInfo(true);
-        foreach ($missInfo->contMissions as $id => $val) {
-            $ctx = dataCenter()->getMissionConst($id);
-            if ($ctx->next != 0 && $ctx->next != 999999) {
-                $missInfo->addMission($ctx->next);
-                $dirtyContiMissions[] = $id;
-            }
-        }
-        foreach ($dirtyContiMissions as $dirty) {
-            dict_remove($missInfo->contMissions, $dirty);
-        }
-    }
-
-    /**
-     * 自动接取每日任务
-     * @param RequestVo $req
-     */
-    static function autoDailyMissions() {
-        $dirty = array();
-        $missDic = dataCenter()->getMissionConst();
-        console("autoDailyMissions");
-        $missInfo = usrInfo()->missInfo(true);
-        foreach ($missInfo->ingMissions as $ing) {
-            if (!dict_exists($missDic, $ing->id)) {
-                $dirty[] = $ing->id;
-            }
-        }
-        foreach ($dirty as $temp) {
-            $missInfo->delMission($temp);
-        }
-        foreach ($missDic as $id => $val) {
-            if ($val->type != 2) {
-                continue;
-            }
-
-            // 如果有前一天的残留数据,或者找不到此任务,则直接干掉
-            if (dict_exists($missInfo->ingMissions, $id)) {
-                $missInfo->delMission($id);
-            }
-            $missInfo->addMission($id);
-        }
-    }
-
-    // ------------------------任务状态检测-----------------------------
-
-    /**
-     * 筛选正在执行中的任务
-     * @param MissEventInfo $info
-     * @return type
-     */
-    static function SelectIngMissions($info) {
-        $list = array();
-        if (!MissEventCode::isServerLogic) {
-            return $list;
-        }
-        $baseInfo = usrInfo()->baseInfo(false);
-        $missInfo = usrInfo()->missInfo(false);
-        foreach ($missInfo->ingMissions as $key => $ing) {
-            if ($ing->minlv > $baseInfo->level &&
-                    !MisStatus::isStatusType($ing->cmd) &&
-                    $ing->type != 2) {
-                continue;
-            }
-            if ($ing->cmd != $info->evnCode) {
-                continue;
-            }
-            $bSign = true;
-            if (array_count($ing->paras) == 0) {
-                ###说明这个任务没有特定需求
-            } else {
-                $index = 0;
-                foreach ($info->paras as $para) {
-                    if ($index < array_count($ing->paras)) {
-                        if (strcontains($para, "|")) {
-                            $paraList = strsplit($para, "|");
-                            foreach ($paraList as $paraItem) {
-                                if ($paraItem == $ing->paras[$index]) {
-                                    continue;
-                                }
-                            }
-                        } else {
-                            if ($ing->paras[$index] != 0 && $para != $ing->paras[$index]) {
-                                $bSign = false;
-                                continue;
-                            }
-                        }
-                    } else {
-                        continue;
-                    }
-                    $index++;
-                }
-            }
-            if ($bSign) {
-                $list[] = $ing->id;
-            }
-        }
-        return $list;
-    }
-
-    /**
-     * 筛选出的任务节奏递推
-     * @param type $id
-     * @param type $info
-     * @return type
-     */
-    static function PropelIngMission($id, $info) {
-        $missInfo = usrInfo()->missInfo(true);
-        $ing = $missInfo->GetMission($id);
-        switch ($info->ope) {
-            case "set":
-                $ing->cur = $info->val;
-                break;
-            case "add":
-                $ing->cur += $info->val;
-                break;
-            case "inc":
-                $ing->cur += 1;
-                break;
-            case "max":
-                if ($info->val > $ing->cur) {
-                    $ing->cur = $info->val;
-                }
-                break;
-        }
-
-        if ($info->ope != "set") {
-            if ($ing->cur > $ing->max) {
-                $ing->cur = $ing->max;
-            }
-        }
-
-        #检查现有的任务中是否包含自动完成的数据
-        self::chechIngMissIsAuto($id);
-        return $ing;
-    }
-
-    /**
-     * 检查现有的任务中是否包含自动完成的数据
-     *  @param type $ing
-     */
-    static function chechIngMissIsAuto($id) {
-        $missInfo = usrInfo()->missInfo(true);
-        $ing = $missInfo->GetMission($id);
-        $ctx = dataCenter()->getMissionConst($id);
-        if ($ing->isFinish() && $ctx->isauto == 1) {
-            $missInfo->finishMission($id);
-            if ($ctx->next != 0) {
-                if ($ctx->next == 999999) { // 未完待续任务标志字
-                    $missInfo->contMissions->$id = "continue..";
-                } else {
-                    $nexting = $missInfo->addMission($ctx->next);
-                    if ($ing->card != 0) {
-                        $nexting->card = $ing->card; // 继承任务卡的所属关系
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * 捆绑进度变化到应答信息
-     * @param type $ings
-     */
-    static function DealToServer($ings) {
-        $resp = ctx()->resp();
-        $missInfo = usrInfo()->missInfo(true);
-        if (count($ings) > 0) {
-            if (!dict_exists($resp->tag, "missInfo")) {
-                $resp->tag->missInfo = new stdClass();
-            }
-            if (!dict_exists($resp->tag->missInfo, "ings")) {
-                $resp->tag->missInfo->ings = array();
-            }
-            array_pushs($resp->tag->missInfo->ings, $ings);
-        }
-    }
-
-    // -------------各种任务事件监听---------------
-
-    /**
-     * 玩家升级事件
-     * @param type $level
-     */
-    static function DealUserLevelup($level) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_User_Levelup, "set", $level);
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 玩家食物发生变化
-     * 参数一:特定食物类型,无限定填0
-     * @param type $type 类型
-     * @param type $num 食物数量
-     */
-    static function DealUserFood($type, $num) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_User_Food, "set", $num, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 建造一个领地    /    
-     * 建造一个指定领地	
-     * 参数一:特定建筑ID,无限定填0
-     * @param type $type
-     */
-    static function DealHabitat_Build($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Habitat_Build, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * √拥有一个领地     
-     * / 拥有一个指定领地	
-     * / 拥有一个特定 等级领地 
-     * 参数一:特定栖息地类型,无限定填0
-     * 参数二:特定等级,无限定填0
-     * @param type $type 领地类型
-     * @param type $level 领地等级
-     */
-    static function DealHabitat_Own($subId, $level) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Habitat_Own, "set", self::GetBuildingNum(INIT_HABITID, $subId, $level), array($subId, $level));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 升级一个领地	/    升级一个指定领地
-     * 参数一:特定建筑ID,无限定填0
-     * 参数二:特定目标等级,无限定填0
-     * @param type $type
-     * @param type $level
-     */
-    static function DealHabitat_LevelUp($type, $level) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Habitat_LevelUp, "inc", 1, array($type, $level));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     *  收取一次金币操作   
-     * 【行为的计数 】     
-     * 参数一:特定领地类型,无限定填0
-     * @param type $type    
-     */
-    static function DealHabitat_CollectGold($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Habitat_CollectGold, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 栖息地 金币收集累计  
-     * 【金币的计数 】 
-     *  参数一:特定领地类型,无限定填0 
-     * @param type $type
-     * @param type $num
-     */
-    static function DealHabitat_CollectGold_S($type, $num) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Habitat_CollectGold, "add", $num, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 建造一个农田	
-     * 参数一:特定建筑ID,无限定填0  
-     * @param type $type
-     */
-    static function DealFarm_Build($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Farm_Build, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 拥有一个农田   /   
-     * 拥有一个指定农田	/
-     * 拥有一个指定等级的农田		
-     * 参数一:特定农田类别,无限定填0
-     * 参数二:特定等级,无限定填0
-     * @param type $subId 农田类别
-     * @param type $level 领地等级
-     */
-    static function DealFarm_Own($subId, $level) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Farm_Own, "set", self::GetBuildingNum(INIT_Farm, $subId, $level), array($subId, $level));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 升级一个农田
-     * 参数一:特定建筑,无限定填0
-     * 参数二:特定目标等级,无限定填0
-     * @param type $type
-     * @param type $level
-     */
-    static function DealFarm_LevelUp($type, $level) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Farm_LevelUp, "inc", 1, array($type, $level));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 种植一次作物	/   种植一次指定作物
-     * 参数一:特定作物类型,无限定填0
-     * @param type $type
-     */
-    static function DealFarm_PlantFood($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Farm_PlantFood, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 收获一次作物	/   收获一次指定作物
-     * 【行为统计】
-     * 参数一:特定作物类型,无限定填0
-     * @param type $type
-     * @param type $num
-     */
-    static function DealFarm_CollectFood($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Farm_CollectFood, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 收获一次作物	/   收获一次指定作物
-     * 【果实数量统计】
-     * 参数一:特定作物类型,无限定填0
-     * @param type $type
-     * @param type $num
-     */
-    static function DealFarm_CollectFood_S($type, $num) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Farm_CollectFood, "add", $num, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 建造一个建筑   /   建造一个指定建筑
-     * 参数一:特定类型,无限定填0  
-     * @param type $type
-     */
-    static function DealBuild_Construct($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_Construct, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 拥有一个建筑	/   拥有一个指定建筑 / 拥有指定等级的建筑
-     *  参数一:特定建筑  一级大类 类型,无限定填0
-     * 参数二:特定建筑  二级小类 类型,无限定填0
-     * 参数二:特定等级,无限定填0
-     * @param type $cabid
-     * @param type $subId
-     * @param type $level
-     */
-    static function DealBuild_Own($cabid, $subId, $level) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Build_Own, "set", self::GetBuildingNum($cabid, $subId, $level), array($cabid, $subId, $level));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 升级一个建筑   /  升级一个指定建筑	
-     * 参数一:特定建筑ID,无限定填0
-     * 参数二:特定目标等级,无限定填0
-     * @param type $type
-     * @param type $level
-     */
-    static function DealBuild_Levelup($type, $level) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_LevelUp, "inc", 1, array($type, $level));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     *  铲除 一个建筑   /  铲除一个指定建筑	    
-     * 参数一:特定类型,无限定填0
-     * @param type $type
-     */
-    static function DealBuild_Remove($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_Remove, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 招募   一次    
-     * 参数一:特定神兽类型,无限定填0
-     * @param type $type
-     */
-    static function DealBuild_PubEmploy($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_PubEmploy, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 培育一次    /  培育出指定神兽一次	获得兽蛋  
-     * 参数一:特定兽蛋类型,无限定填0
-     * @param type $type
-     */
-    static function DealBuild_Breed($type) {
-        $ings = array();
-
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_Breed, "inc", 1, array($type));
-
-
-        $list = self::SelectIngMissions($info);
-
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 孵化
-     * 参数一:特定兽蛋类型,无限定填0
-     * @param type $type
-     */
-    static function DealBuild_EggHatch($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_EggHatch, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 采矿场 打工一次
-     * 参数一:特定工作神兽类型,无限定填0
-     * @param type $type
-     */
-    static function DealBuild_QuarryWork($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_QuarryWork, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 采矿场 结果收取一次         
-     * 参数一:特定工作神兽类型,无限定填0  
-     * @param type $type
-     */
-    static function DealBuild_QuarryResult($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_QuarryResult, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     *  采矿场 结果收取一次
-     * [累计道具的收取始数量]
-     * 参数一:特定采矿成果道具ID, 无限定填0  
-     * @param type $type
-     * @param type $num
-     */
-    static function DealBuild_QuarryResult_S($type, $num) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Build_QuarryResult, "add", $num, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     *  加工厂 打工一次
-     * 参数一:特定工作神兽类型,无限定填0
-     * @param type $type
-     */
-    static function DealBuild_ProcessWork($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_ProcessWork, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 采矿场 结果收取一次         
-     * 参数一:特定工作神兽类型,无限定填0  
-     * @param type $type
-     */
-    static function DealBuild_ProcessResult($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_ProcessResult, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     *  加工厂 结果收取
-     * [累计道具的收取始数量]
-     * 参数一:特定成果道具ID, 无限定填0  
-     * @param type $type
-     * @param type $num
-     */
-    static function DealBuild_ProcessResult_S($type, $num) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Build_ProcessResult, "add", $num, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 收取建造的建筑的经验值    
-     * 参数一:特定建筑ID,无限定填0       
-     * 计数:要求数目
-     * @param type $type
-     */
-    static function DealBuild_CollectExp($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_CollectExp, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 酒馆配置上阵神兽    
-     * 计数:配置次数
-     */
-    static function DealBuild_PubTeamConfig() {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Build_PubTeamConfig, "inc", 1);
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    ################################   神兽   #######################################################################
-
-    /**
-     * 拥有一只神兽	/ 拥有一只指定神兽	
-     * 参数一:特定神兽类型,无限定填0
-     * 参数二:特定等级,无限定填0
-     * 参数三:特定星级,无限定填0
-     * @param type $type
-     * @param type $level
-     */
-    static function DealPet_Own($type, $level, $star) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Pet, "set", self::GetPetNum($type, $level, $star), array($type, $level, $star));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 喂养一次神兽  /   喂养一次指定神兽	
-     * 参数一:特定神兽类型,无限定填0
-     * @param type $type
-     */
-    static function DealPet_Feed($type) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Pet_Feed, "inc", 1, array($type));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 升级一次神兽	/ 升级一次指定神兽	
-     * 参数一:特定神兽类型,无限定填0
-     * 参数二:特定等级,无限定填0
-     * @param type $level
-     * @param type $type
-     */
-    static function DealPet_LevelUp($type, $level) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Pet_LevelUp, "inc", 1, array($type, $level));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     *  升级技能一次神兽	/ 升级一次指定神兽	的技能
-     * 参数一:特定神兽类型,无限定填0
-     * 参数二:特定技能ID,无限定填0
-     * 参数三:特定技能等级,无限定填0
-     * @param type $level
-     * @param type $type
-     */
-    static function DealPet_Skill($type, $skill, $skillLevel) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Pet_Skill, "inc", 1, array($type, $skill, $skillLevel));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 升星一次神兽	/ 升星一次指定神兽	
-     * 参数一:特定神兽类型,无限定填0
-     * 参数二:特定星级,无限定填0
-     * @param type $starlv
-     * @param type $type
-     */
-    static function DealPet_Star($type, $starlv) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Pet_Star, "inc", 1, array($type, $starlv));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    // ---------------------  探索任务卡相关   ------------------------
-
-    /**
-     * 占领一块领地 / 占领一块指定领地
-     * 参数一:特定领地类型,无限定填0
-     * @param type $gridtype
-     */
-    static function DealExplore_GridCaptureSucced($gridtype) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Explore_GridCaptureSucced, "inc", 1, array($gridtype));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 进行一次占领(不考虑结果)
-     * 参数一:特定领地类型,无限定填0
-     * @param type $gridtype
-     */
-    static function DealExplore_GridCapture($gridtype) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Explore_GridCapture, "inc", 1, array($gridtype));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 拥有N块领地 / 拥有N块指定领地
-     * 参数一:特定领地类型,无限定填0
-     * @param type $gridtype
-     */
-    static function DealExplore_GridOwn($gridtype) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::SEvn_Explore_GridOwn, "set", self::GetExlporeGridNum($gridtype), array($gridtype));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 与NPC交谈处理流程
-     * @param type $mapId
-     * @param type $posX
-     * @param type $posY
-     * @param type $npcId
-     */
-    static function dealTalkToMissNpc($mapId, $posX, $posY, $npcId) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Explore_TalkToMissNpc, "inc", 1, array($mapId, $posX . "_" . $posY));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 与NPC战斗处理流程
-     * @param type $mapId
-     * @param type $posX
-     * @param type $posY
-     * @param type $npcId
-     */
-    static function dealFightToMissNpc($mapId, $posX, $posY, $npcId) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Explore_FightToMissNpc, "inc", 1, array($mapId, $posX . "_" . $posY));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 进入一次探索地图	
-     */
-    static function DealExplore_EnterMap($map) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Explore_EnterMap, "inc", 1, array($map));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 队伍调动
-     */
-    static function DealExplore_ArmyDeploy() {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Explore_ArmyDeploy, "inc", 1);
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    // ----------------------------------------------------------------------------------------
-
-    /**
-     * 加速一次	/   加速一次指定操作
-     * 参数一:加速类型(建造 /种植 /孵化/铲除障碍物),无限定填0
-     * @param type $speedType  build / plant /  hatch / obstacle
-     */
-    static function Deal_SpeedUp($speedType) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_SpeedUp, "inc", 1, array($speedType));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     *  岛屿解锁
-     * 计数:要求数目
-     */
-    static function Deal_MapIsLand() {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_MapIsLand, "inc", 1);
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     *  岛屿阴影解锁
-     * 计数:要求数目
-     */
-    static function Deal_MapShadow() {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_MapShadow, "inc", 1);
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    /**
-     * 新手引导  
-     *  @param type $step =  引导步骤
-     */
-    static function DealGuideStep($step) {
-        $ings = array();
-        $info = new MissEventInfo(
-                MissEventCode::Evn_Guide, "set", $step, array($step));
-        $list = self::SelectIngMissions($info);
-        foreach ($list as $id) {
-            $ings[] = self::PropelIngMission($id, $info);
-        }
-        self::DealToServer($ings);
-    }
-
-    //----------------------------------
-    // ---------------------------状态辅助方法--------------------------------
-
-    /**
-     * 获取当前建筑数量
-     * @param type $cabid =  建筑一级大类
-     * @param type $subId =  建筑二级分类
-     * @param type $level =  建筑等级
-     * @return int
-     */
-    static function GetBuildingNum($cabid = 0, $subId = 0, $level = 0) {
-        $num = 0;
-        $mapInfo = usrInfo()->mapInfo(false);
-        foreach ($mapInfo->items as $key => $bd) {
-            $buildMo = dataCenter()->getItemBuildData($bd->buildid);
-            if ($buildMo->level >= $level) {
-                if (($cabid == 0 || ($cabid != 0 && $buildMo->categoryId == $cabid)) &&
-                        ($subId == 0 || ($subId != 0 && $buildMo->subcategoryId == $subId))) {
-                    $num++;
-                }
-            }
-        }
-        return $num;
-    }
-
-    /**
-     * 获取当前英雄数量
-     * @return int
-     */
-    static function GetPetNum($type = 0, $level = 0, $star = 0) {
-        $num = 0;
-        $mapInfo = usrInfo()->mapInfo(false);
-        foreach ($mapInfo->godpets as $iid => $hero) {
-            if ($hero->type == $type || $hero->level == $level || $hero->currStar == $star) {
-                $num++;
-            }
-        }
-        return $num;
-    }
-
-    /**
-     * 获得探索中,拥有某个类型得领地数量
-     * @param type $type
-     * @return int
-     */
-    static function GetExlporeGridNum($type = 0) {
-        $num = 0;
-        return $num;
-    }
-
-}