角色红点
This commit is contained in:
parent
0ccfff81de
commit
ce2c857ff3
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -1365,24 +1365,6 @@ message DB_PlayerExpArray {
|
|||
repeated DB_PlayerExp Arr = 1;
|
||||
}
|
||||
|
||||
message DB_PlayerInfo {
|
||||
|
||||
string City = 1;
|
||||
|
||||
int32 Head = 2;
|
||||
|
||||
string Name = 3;
|
||||
|
||||
int32 Sex = 4;
|
||||
|
||||
int32 Id = 5;
|
||||
|
||||
}
|
||||
|
||||
message DB_PlayerInfoArray {
|
||||
repeated DB_PlayerInfo Arr = 1;
|
||||
}
|
||||
|
||||
message DB_PlayerType {
|
||||
|
||||
int32 Id = 1;
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
|
||||
// Code generated by xlsx2proto.
|
||||
// DO NOT EDIT!
|
||||
|
||||
package srvdata
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"mongo.games.com/game/protocol/server"
|
||||
)
|
||||
|
||||
var PBDB_PlayerInfoMgr = &DB_PlayerInfoMgr{
|
||||
Datas: &server.DB_PlayerInfoArray{},
|
||||
pool: make(map[int32]*server.DB_PlayerInfo),
|
||||
|
||||
}
|
||||
|
||||
type DB_PlayerInfoMgr struct {
|
||||
Datas *server.DB_PlayerInfoArray
|
||||
pool map[int32]*server.DB_PlayerInfo
|
||||
|
||||
}
|
||||
|
||||
func (this *DB_PlayerInfoMgr) unmarshal(data []byte) error {
|
||||
err := proto.Unmarshal(data, this.Datas)
|
||||
if err == nil {
|
||||
this.arrangeData()
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (this *DB_PlayerInfoMgr) reunmarshal(data []byte) error {
|
||||
newDatas := &server.DB_PlayerInfoArray{}
|
||||
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_PlayerInfoMgr) 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_PlayerInfoMgr) GetData(id int32) *server.DB_PlayerInfo {
|
||||
if data, ok := this.pool[id]; ok {
|
||||
return data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
DataMgr.register("DB_PlayerInfo.dat", &ProtobufDataLoader{dh: PBDB_PlayerInfoMgr})
|
||||
}
|
|
@ -466,8 +466,6 @@ func (this *BagMgr) VerifyUpJybInfo(p *Player, args *model.VerifyUpJybInfoArgs)
|
|||
pack.OpRetCode = playerproto.OpResultCode_OPRC_Error
|
||||
proto.SetDefaults(pack)
|
||||
p.SendToClient(int(playerproto.PlayerPacketID_PACKET_ALL_SETTING), pack)
|
||||
} else {
|
||||
PetMgrSington.CheckShowRed(p)
|
||||
}
|
||||
p.dirty = true
|
||||
}
|
||||
|
|
|
@ -454,7 +454,7 @@ func (this *Player) CheckShowRed() {
|
|||
ShopMgrSington.ShopCheckShowRed(this)
|
||||
|
||||
//数据依赖于背包数据 放入加载背包数据之后执行
|
||||
//PetMgrSington.CheckShowRed(this)
|
||||
PetMgrSington.CheckShowRed(this)
|
||||
|
||||
//福利红点
|
||||
WelfareMgrSington.WelfareShowRed(this)
|
||||
|
@ -1155,8 +1155,6 @@ func (this *Player) GetMessageAttach(id string) {
|
|||
}
|
||||
proto.SetDefaults(pack)
|
||||
this.SendToClient(int(msg_proto.MSGPacketID_PACKET_SC_GETMESSAGEATTACH), pack)
|
||||
} else {
|
||||
PetMgrSington.CheckShowRed(this)
|
||||
}
|
||||
this.dirty = true
|
||||
}
|
||||
|
@ -1350,8 +1348,6 @@ func (this *Player) GetMessageAttachs(ids []string) {
|
|||
proto.SetDefaults(pack)
|
||||
this.SendToClient(int(msg_proto.MSGPacketID_PACKET_SC_GETMESSAGEATTACH), pack)
|
||||
*/
|
||||
} else {
|
||||
PetMgrSington.CheckShowRed(this)
|
||||
}
|
||||
this.dirty = true
|
||||
}
|
||||
|
@ -3066,9 +3062,6 @@ func (this *Player) SendPlayerInfo() {
|
|||
if this.scene != nil && this.thrscene == 0 {
|
||||
this.SendGameConfig(int32(this.scene.gameId), this.Platform, this.Channel)
|
||||
}
|
||||
|
||||
PetMgrSington.CheckShowRed(this)
|
||||
|
||||
//this.SendJackpotInfo()
|
||||
}
|
||||
|
||||
|
|
|
@ -535,9 +535,6 @@ func (this *ShopMgr) shopAddItem(p *Player, shopInfo *model.ShopInfo, vipShopId
|
|||
item := &Item{ItemId: info.ItemId, ItemNum: info.ItemNum, ObtainTime: time.Now().Unix()}
|
||||
BagMgrSingleton.AddItems(p, []*Item{item}, 0, int32(gainWay), "system", name, 0, 0, false)
|
||||
}
|
||||
|
||||
// 获得道具,检查是否显示红点
|
||||
PetMgrSington.CheckShowRed(p)
|
||||
}
|
||||
|
||||
// createOrder 保存购买记录
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue