1
This commit is contained in:
@@ -108,7 +108,9 @@ func (p *Player) GenMonster() {
|
||||
if atomic.LoadUint32(&p.Canmon) == 0 { //已经进入地图或者没在战斗中,就可以刷新怪
|
||||
return
|
||||
}
|
||||
|
||||
if p.GetSpace().PitS == nil {
|
||||
return
|
||||
}
|
||||
var oldnum, newNum int
|
||||
var replce []int
|
||||
p.monsters, oldnum, newNum = replaceOneNumber(p.monsters)
|
||||
@@ -120,13 +122,9 @@ func (p *Player) GenMonster() {
|
||||
|
||||
}
|
||||
p.MapNPC.Reset(10 * time.Second)
|
||||
p.Data[oldnum] = OgrePetInfo{} //切地图清空
|
||||
|
||||
for _, i := range replce {
|
||||
if p.GetSpace().PitS == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
p.Data[i] = OgrePetInfo{} //切地图清空
|
||||
ogreconfig, ok := p.GetSpace().PitS.Load(i) //service.NewMapPitService().GetData(p.Info.MapID, uint32(i))
|
||||
if !ok {
|
||||
continue
|
||||
@@ -137,7 +135,6 @@ func (p *Player) GenMonster() {
|
||||
continue
|
||||
}
|
||||
|
||||
p.Data[i] = OgrePetInfo{}
|
||||
p.Data[i].ID = uint32(v.RefreshID[grand.Intn(len(v.RefreshID))])
|
||||
|
||||
if p.Data[i].ID != 0 {
|
||||
|
||||
Reference in New Issue
Block a user