PDA

View Full Version : Guard of Calliav / Bulwark of Alendar


ryanlepsch
12-31-2009, 10:30 PM
These two spells, which are from the LDoN era, don't seem to work.

Guard of Calliav is a magician spell, but there are also Bst and Nec varieties as well. I believe there is another spell in its line that is an upgrade to this. Essentially this spell places a rune on your pet that absorbs a number of hits (or spells), instead of a traditional rune that absorbs damage.

Bulwark of Alendar is an enchanter spell that reduces magic damage on the target by a percentage until a total amount has been reached and it dissipates.

For Guard of Calliav, the spell lands on the pet, but after multiple hits proves to do nothing. The icon doesnt wear off after the two hits, either.

Bulwark of Alendar is a bit hard for me to test, but the simple fact that it gives me an error message when cast: "Unknown spell effect 161 in spell Bulwark of Alendar (id 4076)", I'm lead to believe it doesn't work.

blmille2
01-18-2010, 06:32 PM
I would like to begin work on this issue.

If you know things that pertain to this issue, please post them here.

Thanks!

blmille2
01-19-2010, 12:31 AM
Can someone list the spells in this line that I should look at?

Thanks!

blmille2
01-19-2010, 04:19 AM
Here's the code.

I have verified that it works by getting a monk and dueling my mage.

I kicked and counted the blow only if the damage would've been > 0 (i.e. didn't block, parry, etc.).

There are other mitigation types, but this handles the calliav type (the kind that blocks a certain number of melee/spell hits).

For some reason, I am not able to cast a DD spell (always says that I can't see my target).

For the melee part, I was only able to use special moves (i.e. kick) to do damage.

The spell casting code was copied + pasted from the melee mitigation part. I expect that it would work, but don't have a way to test it now.

Any ideas why I can't do regular melee and DD?

Thanks!

The Code:

Index: zone/attack.cpp
================================================== =================
--- zone/attack.cpp (revision 1120)
+++ zone/attack.cpp (working copy)
@@ -2766,8 +2766,19 @@
}

sint32 Mob::ReduceDamage(sint32 damage){
+ int slot = GetBuffSlotFromType(SE_NegateAttacks);
+
+ if(damage > 0 && slot >= 0 && this->buffs[slot].melee_rune > 0){
+ this->buffs[slot].melee_rune--;
+ if(buffs[slot].melee_rune == 0){
+ BuffFadeBySlot(slot);
+ SetHasRune((GetBuffSlotFromType(SE_NegateAttacks) >= 0) || (GetBuffSlotFromType(SE_Rune) >= 0));
+ }
+ return -6;
+ }
+
if(damage > 0 && HasRune()) {
- int slot = GetBuffSlotFromType(SE_Rune);
+ slot = GetBuffSlotFromType(SE_Rune);

while(slot >= 0) {
int16 melee_rune_left = this->buffs[slot].melee_rune;
@@ -2796,8 +2807,18 @@
}

sint32 Mob::ReduceMagicalDamage(sint32 damage) {
+ int slot = GetBuffSlotFromType(SE_NegateAttacks);
+
+ if(damage > 0 && slot >= 0 && this->buffs[slot].melee_rune > 0){
+ this->buffs[slot].melee_rune--; // arbitrarily using melee_rune to count both melee and spell attacks
+ if(buffs[slot].melee_rune == 0){
+ BuffFadeBySlot(slot);
+ SetHasSpellRune((GetBuffSlotFromType(SE_NegateAtta cks) >= 0) || (GetBuffSlotFromType(SE_AbsorbMagicAtt) >= 0));
+ }
+ return -6;
+ }
if(damage > 0 && HasSpellRune()) {
- int slot = GetBuffSlotFromType(SE_AbsorbMagicAtt);
+ slot = GetBuffSlotFromType(SE_AbsorbMagicAtt);

while(slot >= 0) {
int16 magic_rune_left = this->buffs[slot].magic_rune;
Index: zone/spell_effects.cpp
================================================== =================
--- zone/spell_effects.cpp (revision 1120)
+++ zone/spell_effects.cpp (working copy)
@@ -1488,7 +1488,16 @@
AddProcToWeapon(procid, false, spells[spell_id].base2[i]+100);
break;
}
-
+ case SE_NegateAttacks:
+ {
+#ifdef SPELL_EFFECT_SPAM
+ snprintf(effect_desc, _EDLEN, "Melee Negate Attack Rune: %+i", effect_value);
+#endif
+ buffs[buffslot].melee_rune = effect_value;
+ SetHasRune(true);
+ SetHasSpellRune(true);
+ break;
+ }
case SE_AppraiseLDonChest:
{
if(IsNPC())

Derision
01-19-2010, 10:24 AM
Those symptoms (can kick but not melee or cast spells) indicate you don't have the server side maps.

You can get them from :

http://code.google.com/p/eqemumaps/

All the files ending in .map, .wtr or .path should go in the server Maps directory

blmille2
01-19-2010, 09:08 PM
Awesome, that did the trick!

This is how it works:
- Calliav spell line absorbs a specific number of melee and spell damage
- I verified with my wizard that each melee/damage spell decrements the counter while absorbing the blow.
- When the counter gets down to 0 the spell fades.

Here's the code:

Index: zone/attack.cpp
================================================== =================
--- zone/attack.cpp (revision 1120)
+++ zone/attack.cpp (working copy)
@@ -2766,8 +2766,19 @@
}

sint32 Mob::ReduceDamage(sint32 damage){
+ int slot = GetBuffSlotFromType(SE_NegateAttacks);
+
+ if(damage > 0 && slot >= 0 && this->buffs[slot].melee_rune > 0){
+ this->buffs[slot].melee_rune--;
+ if(buffs[slot].melee_rune == 0){
+ BuffFadeBySlot(slot);
+ SetHasRune((GetBuffSlotFromType(SE_NegateAttacks) >= 0) || (GetBuffSlotFromType(SE_Rune) >= 0));
+ }
+ return -6;
+ }
+
if(damage > 0 && HasRune()) {
- int slot = GetBuffSlotFromType(SE_Rune);
+ slot = GetBuffSlotFromType(SE_Rune);

while(slot >= 0) {
int16 melee_rune_left = this->buffs[slot].melee_rune;
@@ -2796,8 +2807,18 @@
}

sint32 Mob::ReduceMagicalDamage(sint32 damage) {
+ int slot = GetBuffSlotFromType(SE_NegateAttacks);
+
+ if(damage > 0 && slot >= 0 && this->buffs[slot].melee_rune > 0){
+ this->buffs[slot].melee_rune--; // arbitrarily using melee_rune to count both melee and spell attacks
+ if(buffs[slot].melee_rune == 0){
+ BuffFadeBySlot(slot);
+ SetHasSpellRune((GetBuffSlotFromType(SE_NegateAtta cks) >= 0) || (GetBuffSlotFromType(SE_AbsorbMagicAtt) >= 0));
+ }
+ return -6;
+ }
if(damage > 0 && HasSpellRune()) {
- int slot = GetBuffSlotFromType(SE_AbsorbMagicAtt);
+ slot = GetBuffSlotFromType(SE_AbsorbMagicAtt);

while(slot >= 0) {
int16 magic_rune_left = this->buffs[slot].magic_rune;
Index: zone/spell_effects.cpp
================================================== =================
--- zone/spell_effects.cpp (revision 1120)
+++ zone/spell_effects.cpp (working copy)
@@ -1488,7 +1488,16 @@
AddProcToWeapon(procid, false, spells[spell_id].base2[i]+100);
break;
}
-
+ case SE_NegateAttacks:
+ {
+#ifdef SPELL_EFFECT_SPAM
+ snprintf(effect_desc, _EDLEN, "Melee Negate Attack Rune: %+i", effect_value);
+#endif
+ buffs[buffslot].melee_rune = effect_value;
+ SetHasRune(true);
+ SetHasSpellRune(true);
+ break;
+ }
case SE_AppraiseLDonChest:
{
if(IsNPC())

Derision
01-20-2010, 04:25 PM
The Calliav fix is in Rev1127.