Skip to content

Commit

Permalink
Fixed: Resurrect, Reveal, Meteor Swarm and Lightning spells showing e…
Browse files Browse the repository at this point in the history
…ffect animation even when EFFECT_ID=0 is set

[sphereCrypt.ini]: Added crypt key for classic clients 7.0.54 ~ 7.0.55 and enhanced clients 4.0.54 ~ 4.0.55
  • Loading branch information
coruja747 committed Nov 12, 2016
1 parent c710504 commit 72ff099
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
8 changes: 7 additions & 1 deletion docs/REVISIONS-56-SERIES.TXT
Expand Up @@ -263,4 +263,10 @@ Changed: Updated internal SQLite libs v3.15.0 to v3.15.1.
[sphere_map0_ml.scp]: Added TOL regions
[sphere_map5.scp]: Moved a_valley_of_eodon, a_shadowguard to sphere_map0_ml.scp
[sphere_defs.scp]: Added mount memory for Ancient Hellhound, Tarantula, Unicorn (Rainbow)
[sphereCrypt.ini]: Added crypt key for classic client 7.0.53 and enhanced clients 4.0.33 ~ 4.0.53
[sphereCrypt.ini]: Added crypt key for classic client 7.0.53 and enhanced clients 4.0.33 ~ 4.0.53

12-11-2016, Coruja
Fixed: Resurrect, Reveal, Meteor Swarm and Lightning spells showing effect animation even when EFFECT_ID=0 is set
[sphereCrypt.ini]: Added crypt key for classic clients 7.0.54 ~ 7.0.55 and enhanced clients 4.0.54 ~ 4.0.55
[sphere_map0.scp]: Added missing 'region_flag_guarded' on a_townOcclo
[sphere_map1.scp]: Added missing 'region_flag_guarded' on a_old_haven_town and a_new_haven_town
23 changes: 15 additions & 8 deletions src/graysvr/CCharSpell.cpp
Expand Up @@ -467,7 +467,8 @@ bool CChar::Spell_Resurrection(CItemCorpse * pCorpse, CChar * pCharSrc, bool bNo
}

CSpellDef *pSpellDef = g_Cfg.GetSpellDef(SPELL_Resurrection);
Effect(EFFECT_OBJ, pSpellDef->m_idEffect, this, 10, 16);
if ( pSpellDef->m_idEffect )
Effect(EFFECT_OBJ, pSpellDef->m_idEffect, this, 10, 16);
Sound(pSpellDef->m_sound);
return true;
}
Expand Down Expand Up @@ -3187,10 +3188,13 @@ bool CChar::OnSpellEffect( SPELL_TYPE spell, CChar * pCharSrc, int iSkillLevel,
if (pSpellDef->IsSpellType(SPELLFLAG_SCRIPTED))
return true;

if ( pSpellDef->IsSpellType(SPELLFLAG_FX_BOLT) && iEffectID )
Effect(EFFECT_BOLT, iEffectID, pCharSrc, 5, 1, fExplode, iColor, iRender);
if ( pSpellDef->IsSpellType(SPELLFLAG_FX_TARG) && iEffectID )
Effect(EFFECT_OBJ, iEffectID, this, 0, 15, fExplode, iColor, iRender); // 9, 14
if ( iEffectID )
{
if ( pSpellDef->IsSpellType(SPELLFLAG_FX_BOLT) )
Effect(EFFECT_BOLT, iEffectID, pCharSrc, 5, 1, fExplode, iColor, iRender);
if ( pSpellDef->IsSpellType(SPELLFLAG_FX_TARG) )
Effect(EFFECT_OBJ, iEffectID, this, 0, 15, fExplode, iColor, iRender);
}
if ( iSound )
Sound(iSound);

Expand Down Expand Up @@ -3313,7 +3317,8 @@ bool CChar::OnSpellEffect( SPELL_TYPE spell, CChar * pCharSrc, int iSkillLevel,
case SPELL_Reveal:
if ( ! Reveal())
break;
Effect(EFFECT_OBJ, iEffectID, this, 0, 15, fExplode, iColor, iRender);
if ( iEffectID )
Effect(EFFECT_OBJ, iEffectID, this, 0, 15, fExplode, iColor, iRender);
break;

case SPELL_Invis:
Expand Down Expand Up @@ -3357,7 +3362,8 @@ bool CChar::OnSpellEffect( SPELL_TYPE spell, CChar * pCharSrc, int iSkillLevel,
break;

case SPELL_Meteor_Swarm:
Effect(EFFECT_BOLT, iEffectID, pCharSrc, 9, 6, fExplode, iColor, iRender);
if ( iEffectID )
Effect(EFFECT_BOLT, iEffectID, pCharSrc, 9, 6, fExplode, iColor, iRender);
break;

case SPELL_Lightning:
Expand All @@ -3370,7 +3376,8 @@ bool CChar::OnSpellEffect( SPELL_TYPE spell, CChar * pCharSrc, int iSkillLevel,
return Spell_Resurrection(NULL, pCharSrc, (pSourceItem && pSourceItem->IsType(IT_SHRINE)));

case SPELL_Light:
Effect(EFFECT_OBJ, iEffectID, this, 9, 6, fExplode, iColor, iRender);
if ( iEffectID )
Effect(EFFECT_OBJ, iEffectID, this, 9, 6, fExplode, iColor, iRender);
Spell_Effect_Create( spell, fPotion ? LAYER_FLAG_Potion : LAYER_NEWLIGHT, iSkillLevel, iDuration, pCharSrc );
break;

Expand Down
6 changes: 5 additions & 1 deletion src/sphereCrypt.ini
Expand Up @@ -4,7 +4,7 @@
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
//****************************************************************************
// FILE LAST UPDATED: Sunday, Nov 6, 2016
// FILE LAST UPDATED: Saturday, Nov 12, 2016

// WARNING: Modifing this file, without knowing what you are doing, can make Sphere behave incorrectly.

Expand All @@ -22,6 +22,8 @@ ENC_TFISH 3 // Twofish

[SPHERECRYPT]
//Classic Clients
7005500 0238C048D 0A4527E7F ENC_TFISH // 7.0.55
7005400 024556E9D 0A7BB227F ENC_TFISH // 7.0.54
7005300 0241E54AD 0A7945E7F ENC_TFISH // 7.0.53
7005200 024E686BD 0A715127F ENC_TFISH // 7.0.52
7005100 024AFF4CD 0A736DE7F ENC_TFISH // 7.0.51
Expand Down Expand Up @@ -135,6 +137,8 @@ ENC_TFISH 3 // Twofish
2000000 02D13A5FD 0A39D527F ENC_BFISH // 2.0.0

//Enhanced Clients
067900550 018C048D 0B5527E7F ENC_TFISH // 4.0.55
067900540 06556E9D 0B6BB227F ENC_TFISH // 4.0.54
067900530 061E54AD 0B6945E7F ENC_TFISH // 4.0.53
067900520 06E686BD 0B615127F ENC_TFISH // 4.0.52
067900510 06AFF4CD 0B636DE7F ENC_TFISH // 4.0.51
Expand Down

0 comments on commit 72ff099

Please sign in to comment.