| 
   | 
   | 
  
 
    | 
    | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
   | 
  
	
		
   
   
      | Spell Support Broken Spells? Want them Fixed? Request it here. | 
    
    
   
   
   
   
   
   
   
   
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				01-13-2016, 03:47 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				Fixing Harmony - Should be AOE
			 
			 
			
		
		
		
		Messed up the title should be "Fixing Harmony - Should be AOE" - changed 
 
Harmony should actually be an AOE spell. I really thought I had fixed this a few months ago, but I guess it is still broken. Spell 1541 is an AOE lull, so after trying everything else I decided to copy 1541 and change the ID to 250, just as a test. It still is not an AOE spell, with the exact same data! 1541, wake of tranquility is definitely an AOE and it works! I can find nothing in the source that would prevent this from working like it should.  
 
Just to be sure I am dealing with apples to apples I of course exported my new spell file to the client and bounced the server. This is a mystery I cannot figure out. 
 
Is this futile, is this somehow getting interpreted from the client as a single target spell? 
		
	
		
		
		
		
		
		
		
		
		
		
						  
				
				Last edited by Uleat; 01-13-2016 at 04:06 PM..
				Reason: title fixed
				
			
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				01-13-2016, 05:29 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I stole a code block from Alkabor    I got it.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				01-13-2016, 06:27 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Since you fixed this, would you mind showing your resolution? The reason I ask, is because I'm fairly certain someone else in the future may make a similar post and it'd be nice to have the solution readily available. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				01-13-2016, 06:50 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				
			 
			 
			
		
		
		
		spdat.cpp I think was the name of the file, under common. 
	Code: 
	bool IsBeneficialSpell(uint16 spell_id)
{
    if (!IsValidSpell(spell_id))
        return false;
    // You'd think just checking goodEffect flag would be enough?
    if (spells[spell_id].goodEffect == 1) {
        // If the target type is ST_Self or ST_Pet and is a SE_CancleMagic spell
        // it is not Beneficial
        SpellTargetType tt = spells[spell_id].targettype;
        if (tt != ST_Self && tt != ST_Pet &&
                IsEffectInSpell(spell_id, SE_CancelMagic))
            return false;
        // When our targettype is ST_Target, ST_AETarget, ST_Aniaml, ST_Undead, or ST_Pet
        // We need to check more things!
        if (tt == ST_Target || tt == ST_AETarget || tt == ST_Animal ||
                tt == ST_Undead || tt == ST_Pet) {
            uint16 sai = spells[spell_id].SpellAffectIndex;
            // If the resisttype is magic and SpellAffectIndex is Calm/memblur/dispell sight
            // it's not beneficial.
            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 {
                // If the resisttype is not magic and spell is Bind Sight or Cast Sight or Harmony
                // It's not beneficial
                if ((sai == SAI_Calm && IsEffectInSpell(spell_id, SE_Harmony))
                    || (sai == SAI_Calm_Song && IsEffectInSpell(spell_id, SE_BindSight))
                    || (sai == SAI_Dispell_Sight && spells[spell_id].skill == 18 &&
                        !IsEffectInSpell(spell_id, SE_VoiceGraft)))
                    return false;
            }
        }
    }
    // And finally, if goodEffect is not 0 or if it's a group spell it's beneficial
    return spells[spell_id].goodEffect != 0 || IsGroupSpell(spell_id);
}
  
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				01-13-2016, 07:42 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Administrator 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2013 
					Location: United States 
					
					
						Posts: 1,604
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		So as for changes. 
This:  
	Code: 
	if (sai == SAI_Dispell_Sight && spells[spell_id].skill == 18 && !IsEffectInSpell(spell_id, SE_VoiceGraft)) 
 Becomes this:  
	Code: 
	if ((sai == SAI_Calm && IsEffectInSpell(spell_id, SE_Harmony)) || (sai == SAI_Calm_Song && IsEffectInSpell(spell_id, SE_BindSight)) || (sai == SAI_Dispell_Sight && spells[spell_id].skill == 18 && !IsEffectInSpell(spell_id, SE_VoiceGraft))) 
  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				01-13-2016, 07:59 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Exactly. 
 
/10char 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				01-13-2016, 08:37 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Discordant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2005 
					
					
					
						Posts: 270
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		If this is the way the spell is supposed to work, will this change be added to the code? 
 
Celestial 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				01-13-2016, 08:38 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2007 
					
					
					
						Posts: 2,175
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				Harmony should be AOE
			 
			 
			
		
		
		
		Harmony should be AOE 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
 
	
		
	
	
	
	
	
		
	
		 
		Posting Rules
	 | 
 
	
		
		You may not post new threads 
		You may not post replies 
		You may not post attachments 
		You may not edit your posts 
		 
		
		
		
		
		HTML code is Off 
		 
		
	  | 
 
 
	 | 
	
		
	 | 
 
 
All times are GMT -4. The time now is 11:04 PM. 
 
		 
	 
 
 
     | 
     | 
    
   
      | 
     | 
      | 
    
   
     | 
      | 
     | 
    
   
       | 
      | 
       | 
     
    
    
  | 
   |