function onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
if attacker and attacker:isPlayer() then
local base = attacker:getVocation():getId()
if primaryType == COMBAT_HEALING then
primaryDamage = primaryDamage * pvpvocs[base].healing
elseif creature:isPlayer() then
local form = pvpvocs[base].pvp
if origin == ORIGIN_SPELL then
primaryDamage = primaryDamage * form.spells
elseif origin == ORIGIN_MELEE or origin == ORIGIN_CONDITION or origin == ORIGIN_RANGED or origin == ORIGIN_WAND then
primaryDamage = primaryDamage * form.weapon
end
elseif creature:isMonster() then
local form = pvpvocs[base].pve
if origin == ORIGIN_SPELL then
primaryDamage = primaryDamage * form.spells
elseif origin == ORIGIN_MELEE or origin == ORIGIN_CONDITION or origin == ORIGIN_RANGED or origin == ORIGIN_WAND then
primaryDamage = primaryDamage * form.weapon
end
end
elseif creature and creature:isPlayer() then
local base = creature:getVocation():getId()
if primaryType == COMBAT_HEALING then
primaryDamage = primaryDamage * pvpvocs[base].healing
elseif attacker and attacker:isPlayer() then
local form = pvpvocs[base].pvp
if origin == ORIGIN_SPELL then
primaryDamage = primaryDamage * form.spells
elseif origin == ORIGIN_CONDITION then
primaryDamage = primaryDamage * form.defense
elseif origin == ORIGIN_MELEE or origin == ORIGIN_CONDITION or origin == ORIGIN_RANGED or origin == ORIGIN_WAND then
primaryDamage = primaryDamage * form.weapon
end
elseif attacker and attacker:isMonster() then
local form = pvpvocs[base].pve
if origin == ORIGIN_SPELL then
primaryDamage = primaryDamage * form.spells
elseif origin == ORIGIN_MELEE or origin == ORIGIN_CONDITION or origin == ORIGIN_RANGED or origin == ORIGIN_WAND then
primaryDamage = primaryDamage * form.weapon
end
end
end
return primaryDamage, primaryType, secondaryDamage, secondaryType, origin
end