[SPELL FIX] ISSUE #300

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [SPELL FIX] ISSUE #300

      Hello!
      I'm finally getting active again. Sorry that i've been inactive for so long still trying to get over my grandpas passing and work.
      The current way DeathKnightSpell handles this spell makes the ghoul spawn way to far away from the caster, my fix here will make it blizzlike

      My Fix:

      Source Code

      1. bool RaiseDead(uint32 i, Spell* s)
      2. {
      3. if(s->p_caster == NULL)
      4. return false;
      5. float x = s->p_caster->GetPositionX();
      6. float y = s->p_caster->GetPositionY() - 1;
      7. float z = s->p_caster->GetPositionZ();
      8. SpellEntry* sp = NULL;
      9. // Master of Ghouls
      10. if(!s->p_caster->HasAura(52143))
      11. {
      12. Corpse* corpseTarget = s->GetCorpseTarget();
      13. // We need a corpse for this spell
      14. // Doesn't seem to be supported yet, so let's comment this for now
      15. /*
      16. if( corpseTarget != NULL )
      17. return true;
      18. x = corpseTarget->GetPositionX();
      19. y = corpseTarget->GetPositionY();
      20. z = corpseTarget->GetPositionZ();
      21. */
      22. // Minion version, 1 min duration
      23. sp = dbcSpell.LookupEntry(46585);
      24. }
      25. else
      26. {
      27. // Pet version, infinite duration
      28. sp = dbcSpell.LookupEntry(52150);
      29. }
      30. s->p_caster->CastSpellAoF(x, y, z, sp, true);
      31. return true;
      32. }
      Display All



      Original AscEmu CODE:

      C Source Code

      1. bool RaiseDead(uint32 i, Spell* s)
      2. {
      3. if(s->p_caster == NULL)
      4. return false;
      5. float x = s->p_caster->GetPositionX() + RandomUInt(25);
      6. float y = s->p_caster->GetPositionY() + RandomUInt(25);
      7. float z = s->p_caster->GetPositionZ();
      8. SpellEntry* sp = NULL;
      9. // Master of Ghouls
      10. if(!s->p_caster->HasAura(52143))
      11. {
      12. Corpse* corpseTarget = s->GetCorpseTarget();
      13. // We need a corpse for this spell
      14. // Doesn't seem to be supported yet, so let's comment this for now
      15. /*
      16. if( corpseTarget != NULL )
      17. return true;
      18. x = corpseTarget->GetPositionX();
      19. y = corpseTarget->GetPositionY();
      20. z = corpseTarget->GetPositionZ();
      21. */
      22. // Minion version, 1 min duration
      23. sp = dbcSpell.LookupEntry(46585);
      24. }
      25. else
      26. {
      27. // Pet version, infinite duration
      28. sp = dbcSpell.LookupEntry(52150);
      29. }
      30. s->p_caster->CastSpellAoF(x, y, z, sp, true);
      31. return true;
      32. }
      Display All

      The post was edited 1 time, last by Cronic ().