Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop
This commit is contained in:
commit
19d8ed6cc5
|
|
@ -597,6 +597,7 @@ const (
|
|||
ItemIDSlippers = 100010 // 拖鞋
|
||||
ItemIDPermit = 100011 // 赛季通行证积分
|
||||
ItemIDLong = 50013 // 龙币
|
||||
ItemIDPetSkill = 11001 //宠物技能升级道具
|
||||
)
|
||||
|
||||
func ToItemId(id int32) int32 {
|
||||
|
|
|
|||
|
|
@ -290,6 +290,10 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int
|
|||
Num: v.ItemNum,
|
||||
})
|
||||
}
|
||||
|
||||
if v.ItemId == common.ItemIDPetSkill && v.ItemNum > 0 {
|
||||
PetMgrSington.CheckShowRed(p)
|
||||
}
|
||||
}
|
||||
|
||||
if len(changeItems) > 0 {
|
||||
|
|
|
|||
|
|
@ -344,7 +344,12 @@ func (this *PetMgr) CheckShowRed(p *Player) {
|
|||
status := true
|
||||
for itemId, itemNum := range SkillInfo.ItemConsum {
|
||||
item := BagMgrSingleton.GetItem(p.SnId, int32(itemId))
|
||||
if item.ItemNum < itemNum {
|
||||
if item != nil {
|
||||
if item.ItemNum < itemNum {
|
||||
status = false
|
||||
break
|
||||
}
|
||||
} else {
|
||||
status = false
|
||||
break
|
||||
}
|
||||
|
|
@ -363,7 +368,12 @@ func (this *PetMgr) CheckShowRed(p *Player) {
|
|||
status := true
|
||||
for itemId, itemNum := range SkillInfo.ItemConsum {
|
||||
item := BagMgrSingleton.GetItem(p.SnId, int32(itemId))
|
||||
if item.ItemNum < itemNum {
|
||||
if item != nil {
|
||||
if item.ItemNum < itemNum {
|
||||
status = false
|
||||
break
|
||||
}
|
||||
} else {
|
||||
status = false
|
||||
break
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue