```
feat(fight): 调整技能使用时的宠物信息获取逻辑 根据玩家是否为房主来决定获取宠物信息的方式,房主和非房主玩家 使用不同的参数获取当前宠物信息,以确保技能使用的正确性。 ```
This commit is contained in:
@@ -60,7 +60,11 @@ func (f *FightC) UseSkill(c common.PlayerI, id int32) {
|
||||
ret := &SelectSkillAction{
|
||||
PlayerID: c.ID(),
|
||||
}
|
||||
ret.PetInfo = f.GetInputByPlayer(c, false).CurrentPet
|
||||
if c.GetInfo().UserID == f.ownerID {
|
||||
ret.PetInfo = f.GetInputByPlayer(c, false).CurrentPet
|
||||
} else {
|
||||
ret.PetInfo = f.GetInputByPlayer(c, true).CurrentPet
|
||||
}
|
||||
|
||||
for _, v := range ret.PetInfo.Skills {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user