View Single Post
  #1  
Old 07-14-2006, 10:25 PM
EverHood
Restoring Necromancers to their former glory, one patch at a time
 
Join Date: Jul 2006
Posts: 6
Default Seeing is Believing - Multiple Spell Fixes

This fixes/implements the following spells:

Cast Sight
Bind Sight
Eye of Zomm
Eye of Tallon
Stalking Probe (Gnomes Rejoice!)

I used #summonitem to grab a tinkered stalking probe and holgresh elder beads and they both right clicked properly.

Here is the Diff:

Code:
--- E:\EQEmu827\zone\spdat.h	Mon Jul 10 22:43:22 2006
+++ C:\EQEmuSP\Source\0.7.0\zone\spdat.h	Sat Jul 15 00:51:00 2006
@@ -29,6 +29,10 @@
 #define SPELL_HARM_TOUCH 88
 #define SPELL_HARM_TOUCH2 2821
 #define SPELL_NPC_HARM_TOUCH 929
+// Everhood
+#define SPELL_EYE_OF_ZOMM 323
+#define SPELL_EYE_OF_TALLON 1720
+#define SPELL_STALKING_PROBE 960
 
 
 //#define SPDAT_SIZE		1824000
@@ -43,7 +47,7 @@
 
 enum SpellAffectIndex {
 	SAI_Calm			= 12, // Lull and Alliance Spells
-	SAI_Dispell			= 14,
+	SAI_Dispell_Sight	= 14, // Dispells and Spells like Bind Sight
 	SAI_Memory_Blur		= 27,
 	SAI_Calm_Song		= 43  // Lull and Alliance Songs
 };
--- E:\EQEmu827\zone\spdat.cpp	Mon Jul 10 22:43:22 2006
+++ C:\EQEmuSP\Source\0.7.0\zone\spdat.cpp	Sat Jul 15 02:30:50 2006
@@ -211,10 +211,14 @@
 	// EverHood - These spells are actually detrimental
 	if(spells[spell_id].goodEffect == 1){
 		SpellTargetType tt = spells[spell_id].targettype;
-		if(tt == ST_Target || tt == ST_AETarget || tt == ST_Animal || tt == ST_Undead)
-			if(spells[spell_id].resisttype == RESIST_MAGIC){
 				int16 sai = spells[spell_id].SpellAffectIndex;
-				if(sai == SAI_Calm || sai == SAI_Dispell || sai == SAI_Memory_Blur || sai == SAI_Calm_Song)
+		if(tt == ST_Target || tt == ST_AETarget || tt == ST_Animal || tt == ST_Undead || tt == ST_Pet)
+			if(spells[spell_id].resisttype == RESIST_MAGIC){
+				if(sai == SAI_Calm || sai == SAI_Dispell_Sight || sai == SAI_Memory_Blur || sai == SAI_Calm_Song)
+					return false;
+			}else{
+				// Bind Sight and Cast Sight
+				if(sai == SAI_Dispell_Sight && spells[spell_id].skill == 18)
 					return false;
 			}
 	}
--- E:\EQEmu827\zone\spell_effects.cpp	Mon Jul 10 22:43:22 2006
+++ C:\EQEmuSP\Source\0.7.0\zone\spell_effects.cpp	Fri Jul 14 22:08:03 2006
@@ -871,8 +871,8 @@
 #ifdef SPELL_EFFECT_SPAM
 				snprintf(effect_desc, _EDLEN, "Eye of Zomm");
 #endif
-				const char *msg = "Eye of Zomm is not implemented.";
-				if(caster) caster->Message(13, msg);
+				if(caster && caster->IsClient())
+					caster->CastToClient()->TemporaryPets(spell_id, this);
 				break;
 			}
 
--- E:\EQEmu827\zone\AA.cpp	Thu Jul 13 22:09:56 2006
+++ C:\EQEmuSP\Source\0.7.0\zone\AA.cpp	Sat Jul 15 01:07:02 2006
@@ -404,6 +404,13 @@
 	const AA_SwarmPet &pet = AA_SwarmPets[spell_id];
 	
 	const NPCType *npc_type = database.GetNPCType(pet.npc_id);
+	// Everhood - Eye Name over rides
+	if(spell_id == SPELL_EYE_OF_ZOMM || spell_id == SPELL_EYE_OF_TALLON || spell_id == SPELL_STALKING_PROBE ){
+		NPCType *npc_type_temp = new NPCType;
+		memcpy(npc_type_temp, npc_type, sizeof(NPCType));
+		strcat(npc_type_temp->name,this->GetName());
+		npc_type = npc_type_temp;
+	}
 	if(npc_type == NULL) {
 		//log write
 		LogFile->write(EQEMuLog::Error, "Unknown npc type for swarm pet spell id: %d", spell_id);
@@ -425,14 +432,24 @@
 														8, 8, -8, -8 };
 	
 	while(summon_count > 0) {
+		int pet_duration = 0;
 		NPC* npca = new NPC(npc_type, 0, 
 				GetX()+swarm_pet_x[summon_count], GetY()+swarm_pet_y[summon_count], 
 				GetZ(), GetHeading());
+		// Everhood - Eye duration over ride
+		if(spell_id == SPELL_EYE_OF_ZOMM || spell_id == SPELL_EYE_OF_TALLON || spell_id == SPELL_STALKING_PROBE ){
+			// we don't own eyes
+			// eyes don't get hate
+			// eyes do have different durations
+			pet_duration = spells[spell_id].buffduration * 6000;
+		}else{
+			pet_duration = pet.duration;
 		npca->SetOwnerID(GetID());
-		entity_list.AddNPC(npca);
 		if(targ != NULL)
 			npca->AddToHateList(targ, 1000, 1000);
-		npca->StartSwarmTimer(pet.duration);
+		}
+		entity_list.AddNPC(npca);
+		npca->StartSwarmTimer(pet_duration);
 		
 		summon_count--;
 	}
And some SQL to back it up:

* Change 189041 in all querys to an npc id of your choice if mine conflicts:

Code:
INSERT INTO aa_swarmpets (spell_id, `count`, npc_id, duration) VALUES (	323,1,189041,0);
INSERT INTO aa_swarmpets (spell_id, `count`, npc_id, duration) VALUES (	1720,1,189041,0);
INSERT INTO aa_swarmpets (spell_id, `count`, npc_id, duration) VALUES (	960,1,189041,0);

INSERT INTO npc_types (id,name,lastname,level,race,class,bodytype,hp,
gender,texture,helmtexture,size,hp_regen_rate,
mana_regen_rate,loottable_id,merchant_id,
npc_spells_id,npc_faction_id,mindmg,maxdmg,
npcspecialattks,aggroradius,face,
luclin_hairstyle,luclin_haircolor,luclin_eyecolor,
luclin_eyecolor2,luclin_beardcolor,luclin_beard,
fixedz,d_meele_texture1,d_meele_texture2,runspeed,
MR,CR,DR,FR,PR,see_invis,see_invis_undead,qglobal,
AC,npc_aggro,spawn_limit,attack_speed,findable,
STR,STA,DEX,AGI,_INT,WIS,CHA)
 VALUES (189041,'eye_of_',1,108,1,63,1,2,0,0,4,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.25,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0);
On a side note , I'll be posting under this name from now on instead of unicorn97211 so my irc name/server name/forum names all match.

Enjoy
Reply With Quote