This commit is contained in:
@@ -43,12 +43,20 @@ func (h Controller) UsePetItemOutOfFight(data *C2S_USE_PET_ITEM_OUT_OF_FIGHT, c
|
||||
return nil, errorcode.ErrorCodes.ErrInsufficientItems
|
||||
}
|
||||
|
||||
oldHP := currentPet.Hp
|
||||
itemCfg, ok := xmlres.ItemsMAP[int(itemID)]
|
||||
if !ok {
|
||||
return nil, errorcode.ErrorCodes.ErrSystemError
|
||||
errcode := h.handleRegularPetItem(itemID, currentPet)
|
||||
if errcode != 0 {
|
||||
return nil, errcode
|
||||
}
|
||||
refreshPetPaneKeepHP(currentPet, oldHP)
|
||||
c.Service.Item.UPDATE(itemID, -1)
|
||||
result = &item.S2C_USE_PET_ITEM_OUT_OF_FIGHT{}
|
||||
copier.Copy(&result, currentPet)
|
||||
return result, 0
|
||||
}
|
||||
|
||||
oldHP := currentPet.Hp
|
||||
var errcode errorcode.ErrorCode
|
||||
switch {
|
||||
case itemID == 300036:
|
||||
|
||||
Reference in New Issue
Block a user