12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- namespace loyalsoft;
- /**
- * Description of StatisticsProc
- *
- * @author cyzhao
- */
- class StatisticsProc {
-
- /**
- * 已经完成新手引导的玩家记录
- * @param type $uid
- * @param type $index
- */
- static function NewbieGuideRecord($uid,$index) {
- if($index == 2){//现在游戏新手引导就2步
- $key = "NewbieGuideRecord-".req()->zoneid;
- gMem()->lpush($key, $uid);
- }
- }
-
- /**
- * 玩家自己任务完成统计-----每日任务进度变化--主线,学院,日程,悬赏的任务全记录在这
- * @param type $id
- */
- static function SelfTaskDataCollect($taskId) {
- $task = $taskId."-".time();
-
- $arr = array();
- $arr[] = $task;
-
- $num = gMem()->rpush("SelfTaskDataCollect-".req()->uid."-". req()->zoneid, $arr);
- }
-
- /**
- * 全区:记录uid-主线任务id,玩家做任务更新id,以获取最高任务--------主线,学院,日程,悬赏的任务全记录在这
- * @param type $taskId
- */
- static function TaskDataCollect($taskId) {
- $taskMo = GameConfig::item_taskcard_getItem($taskId);
- // if($taskMo->type != 1){
- // return;
- // }
-
- $key = "TaskDataCollect-".req()->zoneid;
- gMem()->hset($key, req()->uid, $taskId);
- }
-
- /**
- * 全区--玩家解锁课程进度:uid-courseId
- * @param type $courseId
- */
- static function UserCourseIngRecord($courseId){
- $key = "UserCourseIngRecord-".req()->zoneid;
- gMem()->hset($key, req()->uid, $courseId);
- }
-
-
- /*
- * 统计全区------玩家最新解锁建筑
- */
- static function unlockBuild($buildId) {
- $key = "unlockBuild-".req()->zoneid;
- gMem()->hset($key, req()->uid, $buildId);
- }
-
- /**
- * 统计全区------玩家最新解锁关卡
- * @param type $gateId
- */
- static function unlockGate($gateId) {
- $key = "unlockGate-".req()->zoneid;
- gMem()->hset($key, req()->uid, $gateId);
- }
-
- static function AAA($gateId) {
-
- }
- }
|