#536 Need Lua function for combat power drain components in spells.

クローズ
8 ヶ月 前LordPazuzu によって開かれました · 3 コメント
LordPazuzu8 ヶ月 前 にコメントしました

Currently no lua function for power drains that broadcasts to chat and overhead numbers. Possibly add power option to SpellDamage()?

Currently no lua function for power drains that broadcasts to chat and overhead numbers. Possibly add power option to SpellDamage()?
image6 ヶ月 前 にコメントしました
共同編集者

this is called siphon it is already supported (although I am not sure DoF client has been verified)

#define DAMAGE_PACKET_TYPE_SIPHON_SPELL		0x41
#define DAMAGE_PACKET_TYPE_SIPHON_SPELL2	0x49

0x41 = 65 in decimal 0x49 = 73 in decimal

DamageSpawn(Attacker, Victim, 65, ...)

this is called siphon it is already supported (although I am not sure DoF client has been verified) ``` #define DAMAGE_PACKET_TYPE_SIPHON_SPELL 0x41 #define DAMAGE_PACKET_TYPE_SIPHON_SPELL2 0x49 ``` 0x41 = 65 in decimal 0x49 = 73 in decimal DamageSpawn(Attacker, Victim, 65, ...)
image6 ヶ月 前 にコメントしました
共同編集者

seems our DamageSpawn function is only designed to deal out actual damage though despite the siphon option

        if(damage) {
            int32 prevDmg = damage;
            damage = victim->CheckWards(this, damage, damage_type);

            if (damage < (sint64)prevDmg)
                useWards = true;
            if(damage > 0 && spell) {
                spell->has_damaged = true;
            }
            victim->TakeDamage(damage);
seems our DamageSpawn function is only designed to deal out actual damage though despite the siphon option ``` if(damage) { int32 prevDmg = damage; damage = victim->CheckWards(this, damage, damage_type); if (damage < (sint64)prevDmg) useWards = true; if(damage > 0 && spell) { spell->has_damaged = true; } victim->TakeDamage(damage); ```
image6 ヶ月 前 にコメントしました
共同編集者
DamageSpawn(NPC, Spawn, 65, 5, 10, 20, "Power Drain", 0, 0, 0, 0, 1) -- last argument 1 is 'take power'

takes 10-20 power away from their target

65 = drain 5 = magic damage

``` DamageSpawn(NPC, Spawn, 65, 5, 10, 20, "Power Drain", 0, 0, 0, 0, 1) -- last argument 1 is 'take power' ``` takes 10-20 power away from their target 65 = drain 5 = magic damage
image 6 ヶ月 前 に閉じられました
会話に参加するには サインイン してください。
読み込み中…
キャンセル
保存
まだコンテンツがありません