Compare commits
No commits in common. "ff086c3de349aae10674e1f1329e4b3bdec8c351" and "fd510661b7975237fc5115f84384d411ea3207b5" have entirely different histories.
ff086c3de3
...
fd510661b7
|
@ -114,7 +114,7 @@ type Player struct {
|
|||
sparams map[int]string //字符参数
|
||||
IsLocal bool //是否本地player
|
||||
Items map[int32]int64 //背包数据
|
||||
MatchParams []int32 //比赛参数 排名、段位、假snid、假角色、假皮肤
|
||||
MatchParams []int32 //比赛参数 排名、段位、假snid、假角色
|
||||
MatchRobotGrades []MatchRobotGrade
|
||||
TestLog []string // 调试日志
|
||||
RankScore map[int32]int64 // 段位积分
|
||||
|
|
|
@ -118,11 +118,6 @@ func (this *ScenePolicyTienLen) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
|||
playerData.CopyRoleId = p.MatchParams[3]
|
||||
}
|
||||
}
|
||||
if len(p.MatchParams) > 4 {
|
||||
if p.MatchParams[4] != 0 {
|
||||
playerData.SkinId = p.MatchParams[4]
|
||||
}
|
||||
}
|
||||
}
|
||||
pack := &tienlen.SCTienLenPlayerEnter{
|
||||
Data: playerData,
|
||||
|
@ -480,11 +475,6 @@ func TienLenCreateRoomInfoPacket(s *base.Scene, p *base.Player, sceneEx *TienLen
|
|||
pd.CopyRoleId = p.MatchParams[3]
|
||||
}
|
||||
}
|
||||
if len(p.MatchParams) > 4 {
|
||||
if p.MatchParams[4] != 0 {
|
||||
pd.SkinId = p.MatchParams[4]
|
||||
}
|
||||
}
|
||||
}
|
||||
pack.IsOutRecord = playerEx.CanUseRecordItem()
|
||||
pack.ItemRecExpireTime = playerEx.ItemRecExpireTime
|
||||
|
@ -508,11 +498,6 @@ func TienLenCreateRoomInfoPacket(s *base.Scene, p *base.Player, sceneEx *TienLen
|
|||
pd1.CopyRoleId = nowPlayer.MatchParams[3]
|
||||
}
|
||||
}
|
||||
if len(nowPlayer.MatchParams) > 4 {
|
||||
if nowPlayer.MatchParams[4] != 0 {
|
||||
pd1.SkinId = nowPlayer.MatchParams[4]
|
||||
}
|
||||
}
|
||||
}
|
||||
//手牌
|
||||
for j := int32(0); j < rule.HandCardNum; j++ {
|
||||
|
|
|
@ -146,7 +146,6 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in
|
|||
if p.Roles != nil {
|
||||
roleId = p.Roles.ModId
|
||||
}
|
||||
skinId := int32(300001)
|
||||
var tm *TmMatch
|
||||
if len(scene.params) > 3 {
|
||||
sortId := scene.params[0]
|
||||
|
@ -156,11 +155,10 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in
|
|||
grade = tm.copyRobotGrades[randIndex].grade
|
||||
snid = tm.copyRobotGrades[randIndex].copySnid
|
||||
roleId = tm.copyRobotGrades[randIndex].copyRoleId
|
||||
skinId = tm.copyRobotGrades[randIndex].CopySkinId
|
||||
tm.copyRobotGrades = append(tm.copyRobotGrades[:randIndex], tm.copyRobotGrades[randIndex+1:]...)
|
||||
}
|
||||
}
|
||||
mc := NewMatchContext(p, tm, grade, snid, 1, roleId, skinId, 0)
|
||||
mc := NewMatchContext(p, tm, grade, snid, 1, roleId, 0)
|
||||
if mc != nil {
|
||||
mc.gaming = true
|
||||
p.matchCtx = mc
|
||||
|
|
|
@ -15,7 +15,6 @@ type PlayerMatchContext struct {
|
|||
copySnid int32
|
||||
copyLv int32
|
||||
copyRoleId int32
|
||||
copySkinId int32
|
||||
}
|
||||
|
||||
type MatchContextSlice []*PlayerMatchContext
|
||||
|
@ -55,7 +54,7 @@ func (p MatchContextSlice) Sort(isFinals bool) {
|
|||
}
|
||||
}
|
||||
|
||||
func NewMatchContext(p *Player, tm *TmMatch, grade, snid, lv, roleId, skinId int32, seq int) *PlayerMatchContext {
|
||||
func NewMatchContext(p *Player, tm *TmMatch, grade, snid, lv, roleId int32, seq int) *PlayerMatchContext {
|
||||
if !p.IsRob {
|
||||
snid = p.SnId
|
||||
}
|
||||
|
@ -68,6 +67,5 @@ func NewMatchContext(p *Player, tm *TmMatch, grade, snid, lv, roleId, skinId int
|
|||
copySnid: snid,
|
||||
copyLv: lv,
|
||||
copyRoleId: roleId,
|
||||
copySkinId: skinId,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ func (this *Scene) PlayerEnter(p *Player, pos int, ischangeroom bool) bool {
|
|||
takeCoin := p.Coin
|
||||
leaveCoin := int64(0)
|
||||
gameTimes := rand.Int31n(100)
|
||||
matchParams := []int32{} //排名、段位、假snid、假角色、假皮肤
|
||||
matchParams := []int32{} //排名、段位、假snid、假角色
|
||||
|
||||
if this.IsMatchScene() && p.matchCtx != nil {
|
||||
takeCoin = int64(p.matchCtx.grade)
|
||||
|
@ -304,8 +304,7 @@ func (this *Scene) PlayerEnter(p *Player, pos int, ischangeroom bool) bool {
|
|||
matchParams = append(matchParams, 1) //段位默认值
|
||||
}
|
||||
matchParams = append(matchParams, p.matchCtx.copySnid) //假snid
|
||||
matchParams = append(matchParams, p.matchCtx.copyRoleId) //假RoleId
|
||||
matchParams = append(matchParams, p.matchCtx.copySkinId) //假SkinId
|
||||
matchParams = append(matchParams, p.matchCtx.copyRoleId) //假snid
|
||||
} else {
|
||||
if p.IsRob {
|
||||
if len(this.paramsEx) > 0 { //机器人携带金币动态调整
|
||||
|
|
|
@ -108,7 +108,6 @@ type ExchangeShopInfo struct {
|
|||
TelCharge int32 //话费
|
||||
ShopType int32 //商品类型
|
||||
TelData []*shop.TelChargeData //运营商配置
|
||||
Items []*shop.ItemInfo //道具
|
||||
}
|
||||
|
||||
func (this *ShopMgr) ModuleName() string {
|
||||
|
@ -778,13 +777,6 @@ func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInf
|
|||
Url: info.Url,
|
||||
})
|
||||
}
|
||||
var items []*shop.ItemInfo
|
||||
for _, v := range data.GetItems() {
|
||||
items = append(items, &shop.ItemInfo{
|
||||
ItemId: v.GetItemId(),
|
||||
ItemNum: v.GetItemNum(),
|
||||
})
|
||||
}
|
||||
return &ExchangeShopInfo{
|
||||
Id: data.Id,
|
||||
Picture: data.Picture,
|
||||
|
@ -796,7 +788,6 @@ func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInf
|
|||
TelCharge: data.TelCharge,
|
||||
ShopType: data.ShopType,
|
||||
TelData: telData,
|
||||
Items: items,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ type TmGradeInfo struct {
|
|||
copySnid int32
|
||||
copyLv int32
|
||||
copyRoleId int32
|
||||
CopySkinId int32
|
||||
}
|
||||
|
||||
type TmMatch struct {
|
||||
|
@ -136,7 +135,7 @@ func (tm *TmMatch) CreateRobotGrades(round int) {
|
|||
tm.robotGrades[round-1] = []*TmGradeInfo{}
|
||||
var snids []int32
|
||||
var lvs []int32
|
||||
var roleIds, skinIds []int32
|
||||
var roleIds []int32
|
||||
for _, player := range PlayerMgrSington.snidMap {
|
||||
if len(snids) > int(lastPromotionNum) {
|
||||
break
|
||||
|
@ -149,9 +148,6 @@ func (tm *TmMatch) CreateRobotGrades(round int) {
|
|||
roleId = player.Roles.ModId
|
||||
}
|
||||
roleIds = append(roleIds, roleId)
|
||||
if player.Skin != nil && player.Skin.ModId != 0 {
|
||||
skinIds = append(skinIds, player.Skin.ModId)
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(snids) <= int(lastPromotionNum) {
|
||||
|
@ -168,7 +164,6 @@ func (tm *TmMatch) CreateRobotGrades(round int) {
|
|||
snids = append(snids, tmpSnid)
|
||||
lvs = append(lvs, 1)
|
||||
roleIds = append(roleIds, int32(2000001))
|
||||
skinIds = append(skinIds, 300001)
|
||||
}
|
||||
}
|
||||
for i := 0; i < int(lastPromotionNum); i++ {
|
||||
|
@ -177,7 +172,6 @@ func (tm *TmMatch) CreateRobotGrades(round int) {
|
|||
copySnid: snids[i],
|
||||
copyLv: lvs[i],
|
||||
copyRoleId: roleIds[i],
|
||||
CopySkinId: skinIds[i],
|
||||
}
|
||||
tm.robotGrades[round-1] = append(tm.robotGrades[round-1], gradeInfo)
|
||||
}
|
||||
|
@ -224,7 +218,6 @@ func (tm *TmMatch) CreateRobotGrades(round int) {
|
|||
copySnid: tm.robotGrades[round-1][index].copySnid,
|
||||
copyLv: tm.robotGrades[round-1][index].copyLv,
|
||||
copyRoleId: tm.robotGrades[round-1][index].copyRoleId,
|
||||
CopySkinId: tm.robotGrades[round-1][index].CopySkinId,
|
||||
}
|
||||
tm.robotGrades[round] = append(tm.robotGrades[round], gradeInfo)
|
||||
}
|
||||
|
@ -251,7 +244,6 @@ func (tm *TmMatch) CreateRobotGrades(round int) {
|
|||
copySnid: tm.robotGrades[round-1][index].copySnid,
|
||||
copyLv: tm.robotGrades[round-1][index].copyLv,
|
||||
copyRoleId: tm.robotGrades[round-1][index].copyRoleId,
|
||||
CopySkinId: tm.robotGrades[round-1][index].CopySkinId,
|
||||
}
|
||||
tm.robotGrades[round] = append(tm.robotGrades[round], gradeInfo)
|
||||
}
|
||||
|
@ -300,7 +292,6 @@ func (tm *TmMatch) RobotGradesDecline(round int) {
|
|||
copySnid: info.copySnid,
|
||||
copyLv: info.copyLv,
|
||||
copyRoleId: info.copyRoleId,
|
||||
CopySkinId: info.CopySkinId,
|
||||
}
|
||||
tm.robotGrades[lastRound][i] = gradeInfo
|
||||
if info.copySnid != 0 {
|
||||
|
|
|
@ -784,7 +784,7 @@ func (this *Tournament) CreatePlayerMatchContext(p *Player, m *TmMatch, seq int)
|
|||
roleId = p.Roles.ModId
|
||||
}
|
||||
|
||||
mc := NewMatchContext(p, m, 1000, p.SnId, 1, roleId, p.Skin.ModId, seq)
|
||||
mc := NewMatchContext(p, m, 1000, p.SnId, 1, roleId, seq)
|
||||
if mc != nil {
|
||||
if this.players[m.SortId] == nil {
|
||||
this.players[m.SortId] = make(map[int32]*PlayerMatchContext)
|
||||
|
|
Loading…
Reference in New Issue