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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2009, 06:38 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default Implemented StringID ALREADY_INVIS

Well, a little nuisance I decided to give a crack at fixing. Basically before if you were invisible and someone tried to invis you again, it would cause you to become uninvised

Code:
Index: EQEmuServer/zone/spells.cpp
===================================================================
--- EQEmuServer/zone/spells.cpp	(revision 713)
+++ EQEmuServer/zone/spells.cpp	(working copy)
@@ -2859,6 +2859,38 @@
 		return(false);
 	}
 
+	// Prevent double invising, which made you uninvised
+	// Not sure if all 3 should be stacking
+	if(IsEffectInSpell(spell_id, SE_Invisibility))
+	{
+		if(spelltar->invisible)
+		{
+			spelltar->Message_StringID(MT_Shout, ALREADY_INVIS, GetCleanName());
+			safe_delete(action_packet);
+			return false;
+		}
+	}
+
+	if(IsEffectInSpell(spell_id, SE_InvisVsUndead))
+	{
+		if(spelltar->invisible_undead)
+		{
+			spelltar->Message_StringID(MT_Shout, ALREADY_INVIS, GetCleanName());
+			safe_delete(action_packet);
+			return false;
+		}
+	}
+
+	if(IsEffectInSpell(spell_id, SE_InvisVsAnimals))
+	{
+		if(spelltar->invisible_animals)
+		{
+			spelltar->Message_StringID(MT_Shout, ALREADY_INVIS, GetCleanName());
+			safe_delete(action_packet);
+			return false;
+		}
+	}
+
 	if(!(IsClient() && CastToClient()->GetGM()) && !IsHarmonySpell(spell_id))	// GMs can cast on anything
 	{
 		// Beneficial spells check
did not test IVA or IVU but the logic is the same, so if there is a problem, it's not my fault!

only "problem" I've come across is bard song invis spams you if you're already invis (singing just the song w/o another invis on causes no problems)
Reply With Quote
  #2  
Old 06-26-2009, 07:36 AM
steve
Discordant
 
Join Date: Jan 2002
Posts: 305
Default

You can stack Uinvis and Invis on Live... but you need to be using one of the group forms of the spells. They nerfed using single target casts. Invis overwrites Uinvis and vice versa.

So if I wanted to get both Uinvis and Invis, I would cast my Group version of the spell first, then the other person casts the group or single target version of the other spell. This is the common method used for collecting the crystallos base in Hills of Shade (where there's both undead and regular mobs that see through (u)invis).
Reply With Quote
  #3  
Old 06-26-2009, 07:15 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

This shouldn't prevent you from having invis, ivu and iva at the same time if that's what you are saying
Reply With Quote
  #4  
Old 08-08-2009, 10:07 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Committed in Rev 903.
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 03:36 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