So I'm trying to migrate a onStatsChange creaturescript that I was using in TFS 0.4 to TFS 1.1.
Basically what the script did was that, under some circumstances, a player get increased damage (let's say, 20% increased damage from all sources). In TFS 0.4 I did that registering an onStatsEvent that, if the circumstances were met, executed the following:
doTargetCombatHealth(attacker, cid, combat, -value*0.2, -value*0.2, CONST_ME_NONE, false)
And returned TRUE at the end, so the player would get 2 damage rounds (the original one and another one with only 20% damage, 120% in total).
My problem in TFS 1.1: While the above can be done with the onHealthChange function that comes with the same parameters, no problem with that, I have the problem when the player is using a manashield. As far as I have read, the function function onManaChange(cid, attacker, manaChange) does not provide the type of damage that was done to the player (basically the primaryType parameter from onHealthChange).
I need to know what type of damage was done to the player (physical, fire, earth...) in the onManaChange. Both because it's related to the circumstances that call the damage amplification, and because it only makes sense for the second round of damage the player gets to have the same type as the original one.
I hope I have explained myself properly
If anybody could help me out with this I would be very thankful 
Basically what the script did was that, under some circumstances, a player get increased damage (let's say, 20% increased damage from all sources). In TFS 0.4 I did that registering an onStatsEvent that, if the circumstances were met, executed the following:
doTargetCombatHealth(attacker, cid, combat, -value*0.2, -value*0.2, CONST_ME_NONE, false)
And returned TRUE at the end, so the player would get 2 damage rounds (the original one and another one with only 20% damage, 120% in total).
My problem in TFS 1.1: While the above can be done with the onHealthChange function that comes with the same parameters, no problem with that, I have the problem when the player is using a manashield. As far as I have read, the function function onManaChange(cid, attacker, manaChange) does not provide the type of damage that was done to the player (basically the primaryType parameter from onHealthChange).
I need to know what type of damage was done to the player (physical, fire, earth...) in the onManaChange. Both because it's related to the circumstances that call the damage amplification, and because it only makes sense for the second round of damage the player gets to have the same type as the original one.
I hope I have explained myself properly