fix: 修复宠物竞技奖励计算逻辑错误
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -74,7 +74,7 @@ func (r *RPCfight) ADD(s string) {
|
||||
}
|
||||
|
||||
func (r *RPCfight) Cancel(s string) {
|
||||
r.zs.Remove()
|
||||
// r.zs.Remove()
|
||||
}
|
||||
|
||||
///定义map,存储用户对战斗容器的映射,便于外部传入时候进行直接操作
|
||||
|
||||
@@ -53,6 +53,7 @@ func (h Controller) PetMelee(data *fight.StartPetWarInboundInfo, c *player.Playe
|
||||
func (h Controller) PetKing(data *fight.PetKingJoinInboundInfo, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
||||
|
||||
c.Fightinfo.Status = info.BattleMode.PET_TOPLEVEL
|
||||
var ElementTypeNumbers = []int{1, 2, 3, 5, 11, 4, 6, 7, 9}
|
||||
|
||||
switch data.Type {
|
||||
case 5:
|
||||
@@ -62,7 +63,6 @@ func (h Controller) PetKing(data *fight.PetKingJoinInboundInfo, c *player.Player
|
||||
case 11:
|
||||
//草","水","火","电","战斗","飞行","机械","地面","冰"
|
||||
// 按顺序:草、水、火、电、战斗、飞行、机械、地面、冰
|
||||
var ElementTypeNumbers = []int{1, 2, 3, 5, 11, 4, 6, 7, 9}
|
||||
|
||||
println("11", c.GetPetInfo()[0].Type(), ElementTypeNumbers[data.FightType-1])
|
||||
if c.GetPetInfo()[0].Type() != int(ElementTypeNumbers[data.FightType-1]) {
|
||||
@@ -77,9 +77,9 @@ func (h Controller) PetKing(data *fight.PetKingJoinInboundInfo, c *player.Player
|
||||
switch data.Type {
|
||||
case 11:
|
||||
if foi.WinnerId == c.GetInfo().UserID {
|
||||
c.ItemAdd(80000000+int64(data.FightType), 1)
|
||||
c.ItemAdd(80000000+int64(ElementTypeNumbers[data.FightType-1]), 1)
|
||||
} else {
|
||||
p.ItemAdd(80000000+int64(data.FightType), 1)
|
||||
p.ItemAdd(80000000+int64(ElementTypeNumbers[data.FightType-1]), 1)
|
||||
}
|
||||
default:
|
||||
if foi.WinnerId == c.GetInfo().UserID {
|
||||
|
||||
Reference in New Issue
Block a user