|
@@ -66,6 +66,8 @@ class ShopProc {
|
|
ctx()->privateData(true)->guanggaoGetTiliNum += 1;
|
|
ctx()->privateData(true)->guanggaoGetTiliNum += 1;
|
|
|
|
|
|
ctx()->privateData(true)->guanggaoGetTili_ts = now();
|
|
ctx()->privateData(true)->guanggaoGetTili_ts = now();
|
|
|
|
+
|
|
|
|
+ TaskProc::OnLookGuanggao();
|
|
} else {
|
|
} else {
|
|
$maxNum = glc()->BuyTili_DailyMaxNum;
|
|
$maxNum = glc()->BuyTili_DailyMaxNum;
|
|
my_Assert(ctx()->privateState->buyTiliNum < $maxNum, ErrCode::user_shop_buyTiliNumLimit);
|
|
my_Assert(ctx()->privateState->buyTiliNum < $maxNum, ErrCode::user_shop_buyTiliNumLimit);
|
|
@@ -239,6 +241,8 @@ class ShopProc {
|
|
}
|
|
}
|
|
ctx()->privateState->dailyShop_GuangGaoNum += 1;
|
|
ctx()->privateState->dailyShop_GuangGaoNum += 1;
|
|
ctx()->privateState->dailyShop_GuangGaoTs = now();
|
|
ctx()->privateState->dailyShop_GuangGaoTs = now();
|
|
|
|
+
|
|
|
|
+ TaskProc::OnLookGuanggao();
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
my_Assert(!in_array($typeId, ctx()->privateState->dailyShopReceived), ErrCode::user_shop_NotRepeatBuy);
|
|
my_Assert(!in_array($typeId, ctx()->privateState->dailyShopReceived), ErrCode::user_shop_NotRepeatBuy);
|
|
@@ -299,12 +303,14 @@ class ShopProc {
|
|
$buyNum = 1;
|
|
$buyNum = 1;
|
|
my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxCommon_equip >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
|
|
my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxCommon_equip >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
|
|
ctx()->privateState->lastFreeGetTs_ShopBoxCommon_equip = now();
|
|
ctx()->privateState->lastFreeGetTs_ShopBoxCommon_equip = now();
|
|
|
|
+ TaskProc::OnLookGuanggao();
|
|
}
|
|
}
|
|
} else if ($mo->type == 4) {
|
|
} else if ($mo->type == 4) {
|
|
if ($buyNum == 0) {
|
|
if ($buyNum == 0) {
|
|
$buyNum = 1;
|
|
$buyNum = 1;
|
|
my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxBright_equip >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
|
|
my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxBright_equip >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
|
|
ctx()->privateState->lastFreeGetTs_ShopBoxBright_equip = now();
|
|
ctx()->privateState->lastFreeGetTs_ShopBoxBright_equip = now();
|
|
|
|
+ TaskProc::OnLookGuanggao();
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -408,12 +414,14 @@ class ShopProc {
|
|
$buyNum = 1;
|
|
$buyNum = 1;
|
|
my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxCommon >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
|
|
my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxCommon >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
|
|
ctx()->privateState->lastFreeGetTs_ShopBoxCommon = now();
|
|
ctx()->privateState->lastFreeGetTs_ShopBoxCommon = now();
|
|
|
|
+ TaskProc::OnLookGuanggao();
|
|
}
|
|
}
|
|
} else if ($mo->type == 2) {
|
|
} else if ($mo->type == 2) {
|
|
if ($buyNum == 0) {
|
|
if ($buyNum == 0) {
|
|
$buyNum = 1;
|
|
$buyNum = 1;
|
|
my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxBright >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
|
|
my_Assert(now() - ctx()->privateState->lastFreeGetTs_ShopBoxBright >= $mo->freeDownTs * 24 * 60 * 60, ErrCode::user_shop_FreeNumLimit);
|
|
ctx()->privateState->lastFreeGetTs_ShopBoxBright = now();
|
|
ctx()->privateState->lastFreeGetTs_ShopBoxBright = now();
|
|
|
|
+ TaskProc::OnLookGuanggao();
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -559,6 +567,8 @@ class ShopProc {
|
|
//收费买
|
|
//收费买
|
|
if ($typeId == 1 && ctx()->privateState->goldShop_GuangGaoNum < $mo->guanggaoNum) {
|
|
if ($typeId == 1 && ctx()->privateState->goldShop_GuangGaoNum < $mo->guanggaoNum) {
|
|
ctx()->privateState->goldShop_GuangGaoNum += 1;
|
|
ctx()->privateState->goldShop_GuangGaoNum += 1;
|
|
|
|
+
|
|
|
|
+ TaskProc::OnLookGuanggao();
|
|
} else {
|
|
} else {
|
|
my_Assert(ctx()->baseInfo->cash >= $mo->price, ErrCode::notenough_cash_msg);
|
|
my_Assert(ctx()->baseInfo->cash >= $mo->price, ErrCode::notenough_cash_msg);
|
|
ctx()->baseInfo->Consume_Cash($mo->price);
|
|
ctx()->baseInfo->Consume_Cash($mo->price);
|