1
This commit is contained in:
parent
0ad350f224
commit
a7603610e5
@ -34,7 +34,7 @@ type LoginRsp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type MapInfoRsp struct {
|
type MapInfoRsp struct {
|
||||||
ModeId int32 `json:"mode_id"`
|
ModeId interface{} `json:"mode_id"`
|
||||||
MapId int32 `json:"map_id"`
|
MapId int32 `json:"map_id"`
|
||||||
IsMoba int32 `json:"is_moba"`
|
IsMoba int32 `json:"is_moba"`
|
||||||
IsOpen int32 `json:"is_open"`
|
IsOpen int32 `json:"is_open"`
|
||||||
|
@ -358,7 +358,7 @@ func (this *team) genStartGameInfo() {
|
|||||||
} {
|
} {
|
||||||
ZoneId: this.GetZoneId(),
|
ZoneId: this.GetZoneId(),
|
||||||
NodeId: this.GetNodeId(),
|
NodeId: this.GetNodeId(),
|
||||||
ModeId: this.mapInfo.ModeId,
|
ModeId: q5.ToInt32(this.getModeId()),
|
||||||
MapId: this.mapInfo.MapId,
|
MapId: this.mapInfo.MapId,
|
||||||
RoomUuid: q5.ToString(this.getMainTeam().GetTeamUuid()),
|
RoomUuid: q5.ToString(this.getMainTeam().GetTeamUuid()),
|
||||||
StartTime: int32(this.startTime),
|
StartTime: int32(this.startTime),
|
||||||
@ -511,7 +511,7 @@ func (this *team) SendUpdateNotify() {
|
|||||||
notifyMsg := &cs.SMTeamUpdateNotify{}
|
notifyMsg := &cs.SMTeamUpdateNotify{}
|
||||||
notifyMsg.TeamInfo = &cs.MFTeam{}
|
notifyMsg.TeamInfo = &cs.MFTeam{}
|
||||||
notifyMsg.TeamInfo.TeamUuid = proto.String(this.teamUuid)
|
notifyMsg.TeamInfo.TeamUuid = proto.String(this.teamUuid)
|
||||||
notifyMsg.TeamInfo.ModeId = proto.Int32(this.mapInfo.ModeId)
|
notifyMsg.TeamInfo.ModeId = proto.Int32(this.getModeId())
|
||||||
notifyMsg.TeamInfo.MapId = proto.Int32(this.mapInfo.MapId)
|
notifyMsg.TeamInfo.MapId = proto.Int32(this.mapInfo.MapId)
|
||||||
q5.NewSlice(¬ifyMsg.TeamInfo.Members, 0, 1)
|
q5.NewSlice(¬ifyMsg.TeamInfo.Members, 0, 1)
|
||||||
for _, m := range this.memberIdHash {
|
for _, m := range this.memberIdHash {
|
||||||
@ -530,7 +530,7 @@ func (this *team) canMatch(targetT *team) bool {
|
|||||||
if this == targetT {
|
if this == targetT {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if this.mapInfo.ModeId != targetT.mapInfo.ModeId {
|
if this.getModeId() != targetT.getModeId() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if this.mapInfo.MapId != targetT.mapInfo.MapId {
|
if this.mapInfo.MapId != targetT.mapInfo.MapId {
|
||||||
@ -547,6 +547,12 @@ func (this *team) canMatch(targetT *team) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *team) getModeId() int32 {
|
||||||
|
var modeId int32
|
||||||
|
q5.DuckToSimple(this.mapInfo.ModeId, &modeId)
|
||||||
|
return modeId
|
||||||
|
}
|
||||||
|
|
||||||
func newTeam() *team {
|
func newTeam() *team {
|
||||||
t := new(team)
|
t := new(team)
|
||||||
t.state = constant.TEAM_STATE_INIT
|
t.state = constant.TEAM_STATE_INIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user