|
@@ -15,18 +15,34 @@ class EventProc {
|
|
|
switch (req()->cmd) {
|
|
|
case CmdCode::cmd_event_GetNotifications: # 7201 拉取角标通知列表
|
|
|
return self::GetCornerSignNotifications();
|
|
|
+ case CmdCode::cmd_event_ClearNotifications: # 7202 清理指定类型的角标
|
|
|
+ return self::ClearCornerSignNotification();
|
|
|
default:
|
|
|
return Resp::err(ErrCode::cmd_err);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * [7201] 拉取角标通知
|
|
|
+ * [7202] 清理指定类型的角标记录
|
|
|
+ */
|
|
|
+ static function ClearCornerSignNotification() {
|
|
|
+ $ctype =req()->paras[0];
|
|
|
+ $e=new OperateEventType();
|
|
|
+ $e->isValidValue($ctype);
|
|
|
+ unset( req()->userInfo->game->privateState->cornerSignNotifications[$ctype]);
|
|
|
+ UserProc::updateUserInfo();
|
|
|
+ $arr = array_values(array_unique(req()->userInfo->game->privateState->cornerSignNotifications)); # 返回值去重
|
|
|
+ // req()->userInfo->game->privateState->cornerSignNotifications = []; # 清理记录
|
|
|
+ return Resp::ok(array("notifications" => $arr)); # 返回
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * [7201] 拉取角标通知
|
|
|
*/
|
|
|
static function GetCornerSignNotifications() {
|
|
|
// 这里直接返回, 将来开发对应的触发逻辑, 给数组中添加相应的值
|
|
|
$arr = array_values(array_unique(req()->userInfo->game->privateState->cornerSignNotifications)); # 返回值去重
|
|
|
- req()->userInfo->game->privateState->cornerSignNotifications = []; # 清理记录
|
|
|
+// req()->userInfo->game->privateState->cornerSignNotifications = []; # 清理记录
|
|
|
UserProc::updateUserInfo();
|
|
|
return Resp::ok(array("notifications" => $arr)); # 返回
|
|
|
}
|
|
@@ -39,28 +55,28 @@ class EventProc {
|
|
|
* 收到请求
|
|
|
*/
|
|
|
static function OnRequest() {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 处理完毕准备返回
|
|
|
*/
|
|
|
static function AfterResponse() {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 当天第一次登录
|
|
|
*/
|
|
|
static function OnNewDay() {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 当周第一次登录(周一)
|
|
|
*/
|
|
|
static function OnNewWeek() {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -76,10 +92,10 @@ class EventProc {
|
|
|
if (!in_array($id, $ubs)) { # 尚未解锁的建筑,判断,已解锁的跳过
|
|
|
if ($b->playerLevelLimit <= $new) { # 符合解锁条件
|
|
|
req()->userInfo->game->privateState->unlockedBuild[] = $id; # 插入解锁记录
|
|
|
- StatisticsProc::TargetStatistics(Enum_TargetStatistics::unlockbuidId,$id);
|
|
|
- if($id == 1000){
|
|
|
+ StatisticsProc::TargetStatistics(Enum_TargetStatistics::unlockbuidId, $id);
|
|
|
+ if ($id == 1000) {
|
|
|
$college = new Info_College();
|
|
|
- $college->setFunUnluckTs();
|
|
|
+ $college->setFunUnluckTs();
|
|
|
}
|
|
|
StatisticsProc::unlockBuild($id); # 统计全服玩家解锁建筑
|
|
|
NormalEventProc::OnUnlockBuild($id, null); # 插入事件
|