refactor: 优化宠物类型变量使用并简化条件判断
This commit is contained in:
@@ -174,9 +174,9 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
|
||||
items.ADDitem(3, uint32(poolexp))
|
||||
|
||||
p.AddPetExp(foi.Winpet, int64(addexp))
|
||||
|
||||
if monster.IsShiny() && p.CanGetXUAN() &&xmlres.PetMAP[int(refPet.GetID())].Type<16{
|
||||
xuan := 400686 + int64(xmlres.PetMAP[int(refPet.GetID())].Type)
|
||||
pettype := int64(xmlres.PetMAP[int(refPet.GetID())].Type)
|
||||
if monster.IsShiny() && p.CanGetXUAN() && pettype < 16 {
|
||||
xuan := 400686 + pettype
|
||||
ok := p.ItemAdd(xuan, 1)
|
||||
if ok {
|
||||
items.ADDitem(uint32(xuan), 1)
|
||||
|
||||
Reference in New Issue
Block a user