Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2009, 10:30 PM
ryanlepsch
Fire Beetle
 
Join Date: Apr 2006
Posts: 6
Default Guard of Calliav / Bulwark of Alendar

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.
Reply With Quote
  #2  
Old 01-18-2010, 06:32 PM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default

I would like to begin work on this issue.

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

Thanks!
Reply With Quote
  #3  
Old 01-19-2010, 12:31 AM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default

Can someone list the spells in this line that I should look at?

Thanks!
Reply With Quote
  #4  
Old 01-19-2010, 04:19 AM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default The Calliav Code

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:
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_NegateAttacks) >= 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())
Reply With Quote
  #5  
Old 01-19-2010, 10:24 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

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
Reply With Quote
  #6  
Old 01-19-2010, 09:08 PM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default Calliav Code

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:
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_NegateAttacks) >= 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())
Reply With Quote
  #7  
Old 01-20-2010, 04:25 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

The Calliav fix is in Rev1127.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:14 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3