|
@@ -323,11 +323,24 @@ class FightProc {
|
|
|
public static function TowerRefreshSkills() {
|
|
|
list($isFree) = req()->paras; # 参数解析
|
|
|
if ($isFree) {
|
|
|
-// if()
|
|
|
+ if (ctx()->gates()->TowerGateInfo()->RefreshSkillTimes < glc()->tower_daily_refreshChanceNum) {
|
|
|
+ ctx()->gates()->TowerGateInfo()->RefreshSkillTimes++;
|
|
|
+ UserProc::updateUserInfo();
|
|
|
+ return Resp::ok();
|
|
|
+ } else {
|
|
|
+ return Resp::err(ErrCode::tower_refreshNo);
|
|
|
+ }
|
|
|
} else {
|
|
|
-
|
|
|
+ list($type, $num) = explode(':', glc()->tower_refreshCost); # 二级货币类型(1:金币,2:元宝):数量
|
|
|
+ if ($type == 1) { # 金币
|
|
|
+ my_Assert(ctx()->base()->Consume_Gold($num), ErrCode::notenough_gold_msg);
|
|
|
+ } else if ($type == 2) { # 元宝
|
|
|
+ my_Assert(ctx()->base()->Consume_Cash($num), ErrCode::notenough_cash_msg);
|
|
|
+ } else {
|
|
|
+ return Resp::err(ErrCode::err_const_no, "检查刷新扣费配置信息!");
|
|
|
+ }
|
|
|
+ return Resp::ok();
|
|
|
}
|
|
|
- return Resp::ok();
|
|
|
}
|
|
|
|
|
|
/**
|