首冲加赠是否翻倍

This commit is contained in:
sk 2024-10-10 17:50:19 +08:00
parent e32cd1a6bd
commit e5378e46f9
5 changed files with 769 additions and 751 deletions

View File

@ -10,6 +10,6 @@
"MatchAward": "{\"zh\":\"恭喜您获得电话预付卡“%v$”话费充值奖励,兑换码:%v,请尽快使用\",\"vi\":\"Chúc mừng bạn đã nhận được Thẻ trả trước ĐT “%v$” phần thưởng nạp tiền tín dụng ĐT, mã đổi thưởng %v xin sử dụng ngay lập tức\",\"en\":\"Congratulations, you have received the phone prepaid card “%v$” mobile credit top-up reward, redemption code: %v please use it immediately.\",\"kh\":\"សូមអបអរសាទរ អ្នកទទួលបានរង្វាន់កាតបញ្ចូលទូរស័ព្ទ កាតទូរស័ព្ទបង់ប្រាក់ជាមុន “%v$”លេខកូដដោះដូរ %v សូមប្រើវាភ្លាមៗ\"}",
"PermitAwardTitle": "{\"zh\":\"通行证排行奖励\",\"vi\":\"Vượt qua phần thưởng xếp hạng\",\"en\":\"Pass Ranking Rewards\",\"kh\":\"រង្វាន់ចំណាត់ថ្នាក់ឆ្លងកាត់\"}",
"PermitAward": "{\"zh\":\"恭喜您在上个赛季通行证排行中名次达到%v名排行奖励已发放请查收\",\"vi\":\"Chúc mừng bạn đã đạt được %v trong bảng xếp hạng vượt qua. Phần thưởng xếp hạng đã được phân phối, vui lòng kiểm tra.\",\"en\":\"Congratulations on reaching %vth place in the pass ranking. Ranking rewards have been issued. Please check.\",\"kh\":\"សូមអបអរសាទរចំពោះការឈានដល់ចំណាត់ថ្នាក់ទី %v ក្នុងចំណាត់ថ្នាក់ឆ្លងកាត់។ រង្វាន់ចំណាត់ថ្នាក់ត្រូវបានចេញ។ សូមត្រួតពិនិត្យ។\"}",
"UpgradeTitle": "{\"zh\":\"更新奖励\",\"vi\":\"\",\"en\":\"\",\"kh\":\"\"}",
"Upgrade": "{\"zh\":\"感谢您更新客户端,更新奖励已发放至附近,请注意查收\",\"vi\":\"\",\"en\":\"\",\"kh\":\"\"}"
"UpgradeTitle": "{\"zh\":\"更新奖励\",\"vi\":\"Phần thưởng cập nhật\",\"en\":\"Update Rewards\",\"kh\":\"រង្វាន់ដំឡើង\"}",
"Upgrade": "{\"zh\":\"感谢您更新客户端,更新奖励已发放至附近,请注意查收\",\"vi\":\"Cảm ơn bạn đã cập nhật ứng dụng khách. Phần thưởng cập nhật đã được phân phối gần đó, vui lòng chú ý kiểm tra nhận\",\"en\":\"Thank you for updating the client. The update reward has been distributed to everyone. Please check it carefully.\",\"kh\":\"អរគុណសម្រាប់ការធ្វើបច្ចុប្បន្នភាពហ្គេម។ រង្វាន់នៃការធ្វើបច្ចុប្បន្នភាពត្រូវបានចែកចាយទៅគ្រប់គ្នា។ សូមពិនិត្យអោយបានច្បាស់លាស់។\"}"
}

View File

@ -56,16 +56,17 @@ type ShopInfo struct {
Ratio int32 //权重
EndTime int32 //新手礼包结束时间间隔
//缓存数据
AdLookedNum int32 //已经观看的次数
AdReceiveNum int32 //已经领取的次数
RemainingTime int32
LastLookTime int32
RoleAdded int32
PetAdded int32
RoleAddedId int32 //加成人物ID
PetAddedId int32 //加成宠物ID
FirstSwitch bool // 首冲翻倍
AmountFinal int64 // 实际获得数量
AdLookedNum int32 //已经观看的次数
AdReceiveNum int32 //已经领取的次数
RemainingTime int32
LastLookTime int32
RoleAdded int32
PetAdded int32
RoleAddedId int32 //加成人物ID
PetAddedId int32 //加成宠物ID
FirstSwitch bool // 首冲翻倍
FirstGiveSwitch bool // 首冲翻倍时加赠是否翻倍
AmountFinal int64 // 实际获得数量
}
func (this *ShopInfo) GetName() string {
@ -237,28 +238,29 @@ func (cm *ConfigMgr) UpdateItemShop(list *webapi.ItemShopList) {
}
shopInfos[itemShop.Id] = &ShopInfo{
Id: itemShop.Id,
ItemId: itemShop.ItemId,
Page: itemShop.Page,
Order: itemShop.Order,
Type: itemShop.Type,
Location: itemShop.Location,
Picture: itemShop.Picture,
Name: itemShop.Name,
Ad: itemShop.Ad,
AdTime: itemShop.AdTime,
RepeatTimes: itemShop.RepeatTimes,
CoolingTime: itemShop.CoolingTime,
Label: itemShop.Label,
AddArea: itemShop.AddArea,
Amount: int64(itemShop.Amount),
ConstType: itemShop.ConstType,
CostArea: itemShop.CostArea,
AddItemInfo: itemInfo,
VipLevel: itemShop.VipLevel,
Ratio: itemShop.Ratio,
EndTime: itemShop.EndTime,
FirstSwitch: itemShop.FirstSwitch,
Id: itemShop.Id,
ItemId: itemShop.ItemId,
Page: itemShop.Page,
Order: itemShop.Order,
Type: itemShop.Type,
Location: itemShop.Location,
Picture: itemShop.Picture,
Name: itemShop.Name,
Ad: itemShop.Ad,
AdTime: itemShop.AdTime,
RepeatTimes: itemShop.RepeatTimes,
CoolingTime: itemShop.CoolingTime,
Label: itemShop.Label,
AddArea: itemShop.AddArea,
Amount: int64(itemShop.Amount),
ConstType: itemShop.ConstType,
CostArea: itemShop.CostArea,
AddItemInfo: itemInfo,
VipLevel: itemShop.VipLevel,
Ratio: itemShop.Ratio,
EndTime: itemShop.EndTime,
FirstSwitch: itemShop.FirstSwitch,
FirstGiveSwitch: itemShop.OnFirstGiveDouble == common.On,
}
}
cm.GetConfig(list.Platform).ShopInfos = shopInfos

File diff suppressed because it is too large Load Diff

View File

@ -449,6 +449,7 @@ message ItemShop {
int32 Ratio = 20; //
int32 EndTime = 21; //
bool FirstSwitch = 22; //
int32 OnFirstGiveDouble = 23; // 1 2
}
// etcd /game/item_shop

View File

@ -661,7 +661,11 @@ func (this *ShopMgr) GetAmountFinal(p *Player, shopId, vipShopId int32) int64 {
// 首充翻倍
if shopInfo.FirstSwitch {
if !slices.Contains(p.ShopID, int(shopInfo.Id)) {
addTotal *= 2
if shopInfo.FirstGiveSwitch {
addTotal *= 2
} else {
addTotal += shopInfo.Amount
}
}
}
default: