This commit is contained in:
@@ -210,15 +210,18 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
|
||||
ItemCnt: int64(poolexp),
|
||||
})
|
||||
p.AddPetExp(foi.Winpet, int64(addexp))
|
||||
if refPet.Item != 0 {
|
||||
for _, v := range refPet.Item {
|
||||
count := int64(grand.Intn(2) + 1)
|
||||
p.ItemAdd(refPet.Item, count)
|
||||
items.ItemList = append(items.ItemList, data.ItemInfo{
|
||||
ItemId: refPet.Item,
|
||||
ItemCnt: count,
|
||||
})
|
||||
ok := p.ItemAdd(v, count)
|
||||
if ok {
|
||||
items.ItemList = append(items.ItemList, data.ItemInfo{
|
||||
ItemId: v,
|
||||
ItemCnt: count,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
p.SendPackCmd(8004, items)
|
||||
}
|
||||
|
||||
|
||||
@@ -301,6 +301,7 @@ type FightOverInfo struct {
|
||||
// 3=isDraw 双方平手
|
||||
// 4=isSysError 系统错误
|
||||
// 5=isNpcEscape 精灵主动逃跑
|
||||
|
||||
Winpet *model.PetInfo `struc:"skip"`
|
||||
Round uint32 `struc:"skip"`
|
||||
LastAttavue AttackValue `struc:"skip"`
|
||||
|
||||
@@ -86,12 +86,13 @@ func (p *Player) GenMonster() {
|
||||
if xmlres.PetMAP[int(p.OgreInfo.Data[i].ID)].CatchRate != 0 {
|
||||
if grand.Meet(1, 500) {
|
||||
p.OgreInfo.Data[i].RandomByWeightShiny()
|
||||
p.OgreInfo.Data[i].Item = append(p.OgreInfo.Data[i].Item, 400687+int64(xmlres.PetMAP[int(p.OgreInfo.Data[i].ID)].Type))
|
||||
}
|
||||
|
||||
}
|
||||
if ok && len(mapinfo.DropItemIds) > 0 {
|
||||
|
||||
p.OgreInfo.Data[i].Item = int64(mapinfo.DropItemIds[grand.Intn(len(mapinfo.DropItemIds))])
|
||||
p.OgreInfo.Data[i].Item = append(p.OgreInfo.Data[i].Item, int64(mapinfo.DropItemIds[grand.Intn(len(mapinfo.DropItemIds))]))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ type OgrePetInfo struct {
|
||||
ShinyLen uint32 `json:"-" struc:"sizeof=ShinyInfo"`
|
||||
ShinyInfo []data.GlowFilter `json:"ShinyInfo,omitempty"`
|
||||
Lv uint32 `struc:"skip"` //等级
|
||||
Item int64 `struc:"skip"` //奖励,如果有的话
|
||||
Item []int64 `struc:"skip"` //奖励,如果有的话
|
||||
Ext uint32 `struc:"skip"` //是否变尼尔尼奥
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user