Passer au contenu principal
Obtenir le pourcentage de bonus de butin pour la réussite du défi actuel.

🎮 Méthode

fightChallenge:getDropBonus()

💎 Valeur de retour

TypeDescription
intPourcentage de bonus de butin.

💡 Exemple

-- Vérifier le défi et adapter la stratégie
local challengeId = fightChallenge:getChallengeId()
if challengeId > 0 then
    local bonus = fightChallenge:getXpBonus()
    fightDebug:print("Défi " .. challengeId .. " XP+" .. bonus .. "%")

    local targets = fightChallenge:getTargetCells()
    if #targets > 0 then
        -- Prioriser les cibles du défi
        for _, targetCell in ipairs(targets) do
            local myCell = fightCharacter:getCellId()
            if fightAction:canCastSpellOnCell(myCell, 8139, targetCell) == 0 then
                fightAction:castSpellOnCell(8139, targetCell)
                break
            end
        end
    end
end