Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 07-14-2010, 10:36 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

To avoid confusion, I made a diff.


spell_effects
Code:
Index: spell_effects.cpp
===================================================================
--- spell_effects.cpp	(revision 1602)
+++ spell_effects.cpp	(working copy)
@@ -2812,6 +2812,7 @@
 			case SE_LimitCastTime:
 			case SE_NoCombatSkills:
 			case SE_TriggerOnCast:
+			case SE_ApplyEffect:
 			{
 				break;
 			}
spells.cpp
Code:
Index: spells.cpp
===================================================================
--- spells.cpp	(revision 1602)
+++ spells.cpp	(working copy)
@@ -3045,6 +3045,8 @@
 		}
 
 	TryTriggerOnCast(spelltar, spell_id);
+	
+	TryApplyEffect(spelltar, spell_id);
 
 	if(spell_id == 982)	// Cazic Touch, hehe =P
 	{
mob.h
Code:
Index: mob.h
===================================================================
--- mob.h	(revision 1602)
+++ mob.h	(working copy)
@@ -778,6 +778,7 @@
 	bool TryDeathSave();
 	void DoBuffWearOffEffect(uint32 index);
 	void TryTriggerOnCast(Mob *target, uint32 spell_id);
+	void TryApplyEffect(Mob *target, uint32 spell_id);
 
 	static int32 GetAppearanceValue(EmuAppearance iAppearance);
 	void SendAppearancePacket(int32 type, int32 value, bool WholeZone = true, bool iIgnoreSelf = false, Client *specific_target=NULL);
mob.cpp
Code:
Index: mob.cpp
===================================================================
--- mob.cpp	(revision 1602)
+++ mob.cpp	(working copy)
@@ -3036,4 +3036,23 @@
 			}
 		}
 	}
+}
+
+void Mob::TryApplyEffect(Mob *target, uint32 spell_id)
+{
+	if(target == NULL || !IsValidSpell(spell_id))
+	{
+		return;
+	}
+
+	for(int i = 0; i < EFFECT_COUNT; i++)
+	{
+		if (spells[spell_id].effectid[i] == SE_ApplyEffect)
+		{
+			if(MakeRandomInt(0, 100) <= spells[spell_id].base[i]) 
+			{
+				SpellOnTarget(spells[spell_id].base2[i], target);
+			}
+		}
+	}
 }
\ No newline at end of file
Reply With Quote
 


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 09:06 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3