Merge branch 'develop' into release

This commit is contained in:
sk 2024-07-17 18:32:31 +08:00
commit 1253ba8cc4
14 changed files with 2156 additions and 1727 deletions

View File

@ -0,0 +1,17 @@
 红米手机 æÑ(
é‡å¸<C3A5> ¡<>( Â
 酷帕碎片 ¡œ(
积分 ¬<>(20Þ
!2å…ƒè¯<C3A8>è´¹ç´å…券 ¹ê(0,
é‡å¸<C3A5> ¡<>(€­â0X
魔法师碎片 £œ(
哈奴曼啤酒 ©º(0
 积分 ¬<>(d0ï

 è<>¶å¥³ç¢Žç‰‡ ¢œ(
 钻石 ¢<>(
! 5å…ƒè¯<C3A8>è´¹ç´å…券 ºê(0
 钻石 ¢<>(0¸
积分 ¬<>0¸
1å…ƒè¯<C3A8>è´¹ç´å…券 ¸ê(

122
data/DB_DiamondLottery.json Normal file
View File

@ -0,0 +1,122 @@
{
"Arr": [
{
"Id": 1,
"Type": 1,
"Name": "红米手机",
"Item_Id": 76006,
"Grade": 1
},
{
"Id": 2,
"Type": 1,
"Name": "金币",
"Item_Id": 100001,
"Grade": 500000,
"Oddrate": 1758
},
{
"Id": 3,
"Type": 1,
"Name": "酷帕碎片",
"Item_Id": 20001,
"Grade": 1,
"Oddrate": 879
},
{
"Id": 4,
"Type": 1,
"Name": "积分",
"Item_Id": 100012,
"Grade": 50,
"Oddrate": 1758
},
{
"Id": 5,
"Type": 1,
"Name": "2元话费直兑券",
"Item_Id": 30009,
"Grade": 1,
"Oddrate": 44
},
{
"Id": 6,
"Type": 1,
"Name": "金币",
"Item_Id": 100001,
"Grade": 10000000,
"Oddrate": 88
},
{
"Id": 7,
"Type": 1,
"Name": "魔法师碎片",
"Item_Id": 20003,
"Grade": 1,
"Oddrate": 176
},
{
"Id": 8,
"Type": 1,
"Name": "哈奴曼啤酒",
"Item_Id": 73001,
"Grade": 1,
"Oddrate": 5
},
{
"Id": 9,
"Type": 1,
"Name": "积分",
"Item_Id": 100012,
"Grade": 100,
"Oddrate": 879
},
{
"Id": 10,
"Type": 1,
"Name": "蝶女碎片",
"Item_Id": 20002,
"Grade": 1,
"Oddrate": 1758
},
{
"Id": 11,
"Type": 1,
"Name": "钻石",
"Item_Id": 100002,
"Grade": 5,
"Oddrate": 1758
},
{
"Id": 12,
"Type": 1,
"Name": "5元话费直兑券",
"Item_Id": 30010,
"Grade": 5,
"Oddrate": 17
},
{
"Id": 13,
"Type": 1,
"Name": "钻石",
"Item_Id": 100002,
"Grade": 20,
"Oddrate": 440
},
{
"Id": 14,
"Type": 1,
"Name": "积分",
"Item_Id": 100012,
"Grade": 200,
"Oddrate": 440
},
{
"Id": 15,
"Type": 2,
"Name": "1元话费直兑券",
"Item_Id": 30008,
"Grade": 1
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -361,6 +361,26 @@ message DB_CreateroomArray {
repeated DB_Createroom Arr = 1;
}
message DB_DiamondLottery {
int32 Id = 1;
int32 Type = 2;
string Name = 3;
int32 Item_Id = 4;
int32 Grade = 5;
int32 Oddrate = 6;
}
message DB_DiamondLotteryArray {
repeated DB_DiamondLottery Arr = 1;
}
message DB_Fish {
int32 Id = 1;

2
public

@ -1 +1 @@
Subproject commit 085f01d57005ff2e025bb0bb40740ac170620cdf
Subproject commit 867b106a8e8daadf6e7c7ae3b3b0b4bf55da83a9

View File

@ -0,0 +1,77 @@
// Code generated by xlsx2proto.
// DO NOT EDIT!
package srvdata
import (
"google.golang.org/protobuf/proto"
"mongo.games.com/game/protocol/server"
)
var PBDB_DiamondLotteryMgr = &DB_DiamondLotteryMgr{
Datas: &server.DB_DiamondLotteryArray{},
pool: make(map[int32]*server.DB_DiamondLottery),
}
type DB_DiamondLotteryMgr struct {
Datas *server.DB_DiamondLotteryArray
pool map[int32]*server.DB_DiamondLottery
}
func (this *DB_DiamondLotteryMgr) unmarshal(data []byte) error {
err := proto.Unmarshal(data, this.Datas)
if err == nil {
this.arrangeData()
}
return err
}
func (this *DB_DiamondLotteryMgr) reunmarshal(data []byte) error {
newDatas := &server.DB_DiamondLotteryArray{}
err := proto.Unmarshal(data, newDatas)
if err == nil {
for _, item := range newDatas.Arr {
existItem := this.GetData(item.GetId())
if existItem == nil {
this.pool[item.GetId()] = item
this.Datas.Arr = append(this.Datas.Arr, item)
} else {
*existItem = *item
}
}
}
return err
}
func (this *DB_DiamondLotteryMgr) arrangeData() {
if this.Datas == nil {
return
}
dataArr := this.Datas.GetArr()
if dataArr == nil {
return
}
for _, data := range dataArr {
this.pool[data.GetId()] = data
}
}
func (this *DB_DiamondLotteryMgr) GetData(id int32) *server.DB_DiamondLottery {
if data, ok := this.pool[id]; ok {
return data
}
return nil
}
func init() {
DataMgr.register("DB_DiamondLottery.dat", &ProtobufDataLoader{dh: PBDB_DiamondLotteryMgr})
}

View File

@ -389,7 +389,23 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
}
}
}
BagMgrSingleton.AddItems(p, items, 0, common.GainWayDiamondLottery, "system", "钻石抽奖", 0, 0, false)
BagMgrSingleton.AddItemsV2(&ItemParam{
P: p,
Change: items,
Cost: []*model.ItemInfo{
{
ItemId: common.ItemIDDiamond,
ItemNum: diamondNum,
},
},
Add: 0,
GainWay: common.GainWayDiamondLottery,
Operator: "system",
Remark: "钻石抽奖",
gameId: 0,
gameFreeId: 0,
noLog: false,
})
pack.LuckyScore = p.DiamondLotteryScore
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_DiamondLottery), pack)
logger.Logger.Trace("返回钻石抽奖信息:", pack.String())

View File

@ -1,7 +1,6 @@
package main
import (
"mongo.games.com/game/srvdata"
"time"
"mongo.games.com/goserver/core/basic"
@ -13,6 +12,7 @@ import (
"mongo.games.com/game/model"
"mongo.games.com/game/proto"
"mongo.games.com/game/protocol/shop"
"mongo.games.com/game/srvdata"
)
type CSShopInfoPacketFactory struct {

View File

@ -787,6 +787,9 @@ func (this *Player) MessageShowRed() {
if msg.State == model.MSGSTATE_UNREAD ||
(msg.State == model.MSGSTATE_READED && msg.AttachState == model.MSGATTACHSTATE_DEFAULT &&
(msg.Coin > 0 || msg.Diamond > 0 || len(msg.Params) > 0)) {
if len(msg.Channel) > 0 && !common.InSliceString(msg.Channel, this.LastChannel) {
continue
}
if msg.ShowId == model.HallAll {
msgMap[model.HallMain] = 1
msgMap[model.HallTienlen] = 1

BIN
xlsx/DB_DiamondLottery.xlsx Normal file

Binary file not shown.

Binary file not shown.