ArcEmu: Divine Shield Immunity & Other Small Spell Fixes - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Hasbro  : (06 April 2011 - 07:55 PM) We will not tolerate disrespect on our forums. If you believe a member of the staff or a member of the community is abusing our forums, please report their post.
Resize Shouts Area

Read:

When submitting patches - READ: http://arcemu.org/fo...?showtopic=2355 -
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Divine Shield Immunity & Other Small Spell Fixes fixes Art of War talent, Divine Shield immunity, Lava Burst...

#1 User is offline   Appled 

  • Member
  • Pip
  • Group: Members
  • Posts: 21
  • Joined: 04-July 09

Posted 09 June 2012 - 05:59 AM

Some of you wanted my spell fixes so here they are.
NOTE: The patch file won't apply at least on my computer via git bash so you may want to add the lines manually to source.
^ So if you are not fine with that then stop whining for my fixes. Seriously.

This following patch file will fix:
*Divine Shield immunity. More about that here.
*After using Divine Shield, Divine Protection or Hand of Protection you get "a mark" on yourself so you cannot use Avenging Wrath for next 30 seconds. ArcEmu did not use for some weird reason the real spellid for it. So this patch gives the right spellid for the mark.
*Art of War (retribution paladin) talent should only be consumed when you use either Exorcism or Flash of Light. It says that on the tooltip.
*Lava Burst ability no longer ever consumes a Flame Shock debuff off of the target.
*Forbearance, Avenging Wrath marker, Hypothermia, Weakened Soul, Recently Bandaged and Sated are debuffs which are NOT dispellable by ANY means. You get rid of them only by dying or waiting the duration. On ArcEmu Divine Shield removed all this and gave you an immunity against them.

NOTE: Only spell which was not tested was Flame Shock / Lava Burst.

Pastebin link for patch.
Patch file:
diff --git a/src/arcemu-world/HackFixes.cpp b/src/arcemu-world/HackFixes.cpp
index a521460..fc1bb08 100644
--- a/src/arcemu-world/HackFixes.cpp
+++ b/src/arcemu-world/HackFixes.cpp
@@ -2305,35 +2392,96 @@ void ApplyNormalFixes()
 	if(sp != NULL)
 		sp->noproc = true;
 
+	//Paladin - Avenging Wrath marker - Is forced debuff
+	sp = CheckAndReturnSpellEntry(61987);
+	if(sp != NULL)
+	{
+		sp->c_is_flags = SPELL_FLAG_IS_FORCEDDEBUFF;
+		sp->Attributes = ATTRIBUTES_IGNORE_INVULNERABILITY;
+	}
+
 	//Paladin - Forbearance - Is forced debuff
 	sp = CheckAndReturnSpellEntry(25771);
 	if(sp != NULL)
-		sp->c_is_flags |= SPELL_FLAG_IS_FORCEDDEBUFF;
+	{
+		sp->c_is_flags = SPELL_FLAG_IS_FORCEDDEBUFF;
+		sp->Attributes = ATTRIBUTES_IGNORE_INVULNERABILITY;
+	}
 
 	//Divine Protection
 	sp = CheckAndReturnSpellEntry(498);
@@ -3356,11 +3505,12 @@ void ApplyNormalFixes()
 		sp->EffectApplyAuraName[0] = SPELL_AURA_PROC_TRIGGER_SPELL;
 		sp->EffectTriggerSpell[0] = 33619; //!! WRONG spell, we will make direct dmg here
 	}
-	// Weakened Soul - Is forced debuff
+	// Weakened Soul - is debuff
 	sp = CheckAndReturnSpellEntry(6788);
 	if(sp != NULL)
 	{
 		sp->c_is_flags = SPELL_FLAG_IS_FORCEDDEBUFF;
+		sp->Attributes = ATTRIBUTES_IGNORE_INVULNERABILITY;
 	}
 
 	// Penance
@@ -3510,10 +3660,13 @@ void ApplyNormalFixes()
 	if(sp != NULL)
 		sp->casterAuraSpellNot = 57724; //sated debuff
 
-	//Sated
+	// Sated - is debuff
 	sp = CheckAndReturnSpellEntry(57724);
 	if(sp != NULL)
-		sp->c_is_flags |= SPELL_FLAG_IS_FORCEDDEBUFF;
+	{
+		sp->c_is_flags = SPELL_FLAG_IS_FORCEDDEBUFF;
+		sp->Attributes = ATTRIBUTES_IGNORE_INVULNERABILITY;
+	}
 
 	/**********************************************************
 	 *	Heroism
@@ -3523,10 +3676,13 @@ void ApplyNormalFixes()
 	if(sp != NULL)
 		sp->casterAuraSpellNot = 57723; //sated debuff
 
-	//Sated
+	// Sated - is debuff
 	sp = CheckAndReturnSpellEntry(57723);
 	if(sp != NULL)
-		sp->c_is_flags |= SPELL_FLAG_IS_FORCEDDEBUFF;
+	{
+		sp->c_is_flags = SPELL_FLAG_IS_FORCEDDEBUFF;
+		sp->Attributes = ATTRIBUTES_IGNORE_INVULNERABILITY;
+	}
 
 	/**********************************************************
 	 *	Lightning Overload
@@ -4345,10 +4501,13 @@ void ApplyNormalFixes()
 	if(sp != NULL)
 		sp->EffectImplicitTargetA[0] = EFF_TARGET_DYNAMIC_OBJECT;
 
-	// Hypothermia: undispellable
+	// Hypothermia - forced debuff
 	sp = CheckAndReturnSpellEntry(41425);
 	if(sp != NULL)
+	{
 		sp->c_is_flags = SPELL_FLAG_IS_FORCEDDEBUFF;
+		sp->Attributes = ATTRIBUTES_IGNORE_INVULNERABILITY;
+	}
 
 	// Mage - Permafrost Rank 1
 	sp = CheckAndReturnSpellEntry(11175);
@@ -6964,6 +7130,14 @@ void ApplyNormalFixes()
 		sp->procChance = 100;
 	}
 
+	// Recently Bandaged - is debuff
+	sp = CheckAndReturnSpellEntry(11196);
+	if(sp != NULL)
+	{
+		sp->c_is_flags = SPELL_FLAG_IS_FORCEDDEBUFF;
+		sp->Attributes = ATTRIBUTES_IGNORE_INVULNERABILITY;
+	}
+
 	sp = CheckAndReturnSpellEntry(44856);		// Bash'ir Phasing Device
 	if(sp != NULL)
 		sp->AuraInterruptFlags = AURA_INTERRUPT_ON_LEAVE_AREA;
diff --git a/src/arcemu-world/Unit.cpp b/src/arcemu-world/Unit.cpp
index f84f196..553cb60 100644
--- a/src/arcemu-world/Unit.cpp
+++ b/src/arcemu-world/Unit.cpp
@@ -2526,6 +2516,13 @@ uint32 Unit::HandleProc(uint32 flag, Unit* victim, SpellEntry* CastingSpell, boo
 									continue;
 							}
 							break;
+						case 53489:
+						case 59578: // The Art of War (Paladin talent) should disappear only from flash of light or exorcism
+							{
+								if(CastingSpell->NameHash != SPELL_HASH_FLASH_OF_LIGHT || CastingSpell->NameHash != SPELL_HASH_EXORCISM)
+									continue;
+							}
+							break;
 						case 65156: // Juggernaut
 							{
 								if(CastingSpell->NameHash != SPELL_HASH_MORTAL_STRIKE &&
@@ -4286,7 +4283,9 @@ void Unit::AddAura(Aura* aur)
 		}
 	}
 
-	if(aur->GetSpellProto()->School && SchoolImmunityList[aur->GetSpellProto()->School])
+	if(aur->GetSpellProto()->School && SchoolImmunityList[aur->GetSpellProto()->School] 
+	&& !aur->IsPositive() && aur->GetSpellProto()->Attributes && aur->GetSpellProto()->Attributes != ATTRIBUTES_IGNORE_INVULNERABILITY)
+	// basically if aura is not positive and aura does not have ignore invulnerability flag, delete aura
 	{
 		delete aur;
 		return;
@@ -8098,13 +8109,9 @@ bool Unit::IsCriticalDamageForSpell(Object* victim, SpellEntry* spell)
 	// HACK!!!
 	Aura* fs = NULL;
 	if(victim->IsUnit()
 		&& spell->NameHash == SPELL_HASH_LAVA_BURST
 		&& ( fs = TO< Unit* >(victim)->FindAuraByNameHash(SPELL_HASH_FLAME_SHOCK) ) != NULL)
-	{
 		result = true;
-		if( !HasAura(55447) )	// Glyph of Flame Shock
-			fs->Remove();
-	}
 
 	return result;
 } 
diff --git a/src/arcemu-world/Spell.cpp b/src/arcemu-world/Spell.cpp
index 821e3ae..2cf22ff 100644
--- a/src/arcemu-world/Spell.cpp
+++ b/src/arcemu-world/Spell.cpp
@@ -2881,16 +2881,12 @@ void Spell::HandleAddAura(uint64 guid)
 
 	uint32 spellid = 0;
 
 	if((GetProto()->MechanicsType == MECHANIC_INVULNARABLE && GetProto()->Id != 25771) || GetProto()->Id == 31884)     // Cast spell Forbearance
 	{
 		if(GetProto()->Id != 31884)
 			spellid = 25771;
 
-		if(Target->IsPlayer())
-		{
-			sEventMgr.AddEvent(TO< Player* >(Target), &Player::AvengingWrath, EVENT_PLAYER_AVENGING_WRATH, 30000, 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT);
-			TO< Player* >(Target)->mAvengingWrath = false;
-		}
+		p_caster->CastSpell(unitTarget, 61987, true);
 	}
 	else if(GetProto()->MechanicsType == MECHANIC_HEALING && GetProto()->Id != 11196)  // Cast spell Recently Bandaged
 		spellid = 11196;

2

#2 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 23 July 2012 - 07:50 AM

Well, you may make your fork and then make pull request, so you don't need to make diffs and apply them manually :)
Posted Image
0

#3 User is offline   Neo_mat 

  • drunken bear rider
  • PipPipPip
  • Group: Developers
  • Posts: 278
  • Joined: 07-June 08
  • Gender:Male
  • Server OS:Linux

Posted 13 August 2012 - 12:19 AM

Thanks for submitting your work, will look into that a little bit later.
Posted Image
Posted Image
Posted Image
I am 91% addicted to World of Warcraft. What about you?
0

#4 User is offline   Ceterrec 

  • Member
  • Pip
  • Group: Members
  • Posts: 54
  • Joined: 16-March 12
  • Gender:Male
  • Location:Germany
  • Server OS:Windows

Posted 13 August 2012 - 11:34 AM

View PostAppled, on 09 June 2012 - 05:59 AM, said:

NOTE: The patch file won't apply at least on my computer via git bash so you may want to add the lines manually to source.

That happens when you use git gui to create the patch file. Use git format-patch (manpage). (The best way is using git history to look for the sha hashes, copy them and then insert them.) Anyways, it should work by using git apply instead of git am.
0

#5 User is offline   Neo_mat 

  • drunken bear rider
  • PipPipPip
  • Group: Developers
  • Posts: 278
  • Joined: 07-June 08
  • Gender:Male
  • Server OS:Linux

Posted 13 August 2012 - 06:04 PM

View PostCeterrec, on 13 August 2012 - 11:34 AM, said:

That happens when you use git gui to create the patch file. Use git format-patch (manpage). (The best way is using git history to look for the sha hashes, copy them and then insert them.) Anyways, it should work by using git apply instead of git am.


Or even better way is to use github's pull request :)
Posted Image
Posted Image
Posted Image
I am 91% addicted to World of Warcraft. What about you?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users