Jump to content

kozelo

Members
  • Posts

    12
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by kozelo

  1. fix spell_proc_event for spell chance and procflags

    delete from `spell_proc_event` where entry in (31876,31877,31878);
    insert into `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) values('31876','0','10','8388608','0','0','16','0','0','33','0');
    insert into `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) values('31877','0','10','8388608','0','0','16','0','0','66','0');
    insert into `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) values('31878','0','10','8388608','0','0','16','0','0','100','0');
    

    diff is for revision 7477

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 839ebe2..f50b709 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -5344,6 +5344,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
            }
            case SPELLFAMILY_PALADIN:
            {
    +    //Judgements of the wise 
    +    if ( dummySpell->SpellIconID==3017 )
    +    {
    +            target = this;
    +            triggered_spell_id =31930;
    +            basepoints0 = GetCreateMana() * 0.15;
    +            CastSpell ( this,57669,true,NULL,GetDummyAura ( dummySpell->Id ),GetGUID() );
    +        break;
    +    }
    +
                // Seal of Righteousness - melee proc dummy (addition ${$MWS*(0.022*$AP+0.044*$SPH)} damage)
                if (dummySpell->SpellFamilyFlags&0x000000008000000LL && effIndex==0)
                {
    

  2. I am sorry to say that, but Replenishment is already implemented at server side.

    First code updated.

    Here is the result of our common efforts:

    void Spell::CastReplenishmentToParty(Unit* caster, int32 SpellId,  int MembersToAffect)
    {
                   Group *pGroup = NULL;
    
                       if (caster->GetTypeId() == TYPEID_PLAYER)
                           pGroup = ((Player*)caster)->GetGroup();
    
                       class PrioritizeMana
                       {
                       public:int operator()( const Player* x, const Player* y ) const {
                                    return ((x->GetPower(POWER_MANA)/x->GetMaxPower(POWER_MANA) * 100) < (y->GetPower(POWER_MANA)/y->GetMaxPower(POWER_MANA)*100)); 
                                } 
                       };
    
    
                       typedef std::Priority_queue<Player*, std::vector<Player*>, PrioritizeMana> Top10;
                       Top10 manaUsers;
                       if( pGroup)
                       {
                           for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) 
                           {
                               Player* Target = itr->getSource();
                               if(caster->GetGUID() != Target->GetGUID() && Target->getPowerType() == POWER_MANA && !Target->isDead()) 
                               {
                                   manaUsers.push(Target);
                               }
                           }
    
                           for(int countera=0; ( !manaUsers.empty() ) && countera<MembersToAffect;++countera)
                           {
                               Player* Target = manaUsers.top();
                               manaUsers.pop();
                               if(caster->GetGUID() != Target->GetGUID()) 
                               {
                                   caster->CastSpell(Target,SpellId,true,NULL,NULL,caster->GetGUID());
                               }
                           }
    
                       }
    }
    
    
    

  3. Thanks for the advise, but:

    The caster with lowest power isnt always the caster that needs more regen, per example healers have greater regen than mage in combat and often have more mana, but they need more regen in raids. So let the first 10 mana-powered members have the buff. :D

  4. What bug does the patch fix? What features does the patch add?

    - This patch would fix paladin talent Judgement of the wise.

    For which repository revision was the patch created?

    - 7414

    Who has been writing this patch

    kozelo, rechapa79 with active support from Lightguard and the other who helped with advise.

    In SpellEffects.cpp

                              // Judgement self add switch
                   switch (m_spellInfo->Id)
                   {
                       case 41467: break;                      // Judgement
                       case 53407: spellId1 = 20184; break;    // Judgement of Justice
                       case 20271:                             // Judgement of Light
                       case 57774: spellId1 = 20185; break;    // Judgement of Light
                       case 53408: spellId1 = 20186; break;    // Judgement of Wisdom
                       default:
                           return;
                   }
    
    +                //Judgement of the wise
    +                int chance =0;
    +                int32 aur =0;
    +                if(m_caster->HasAura(31876)) {chance=33;aur=31876;}
    +                else if (m_caster->HasAura(31877)) {chance=66;aur=31877;}
    +                else if (m_caster->HasAura(31878)) {chance=100;aur=31878;}
    +                if(chance != 0)
    +                {
    +                    int32 mana15 = m_caster->GetCreateMana() * 0.15;
    +                    if(urand(1,100) <= chance) 
    +                    {
    +                        m_caster->CastCustomSpell(m_caster,31930,&mana15,false,false,true,NULL,m_caster->GetDummyAura(aur),m_caster->GetGUID());
    +                                             m_caster->CastSpell(m_caster,57669,true,NULL,m_caster->GetDummyAura(aur),m_caster->GetGUID());
    +                    }
    +                    
    +                }        
    +                //Judgement of the wise end 
    
                   // all seals have aura dummy in 2 effect
    

    in Spell.cpp

    #define SPELL_CHANNEL_UPDATE_INTERVAL (1*IN_MILISECONDS)
    
    extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS];
    
    +class PrioritizeMana
    +    {
    +        public:int operator()( const Player* x, const Player* y ) const {
    +            return ((x->GetPower(POWER_MANA)/x->GetMaxPower(POWER_MANA) * 100) < (y->GetPower(POWER_MANA)/y->GetMaxPower(POWER_MANA)*100)); 
    +    }
    +};
    
    bool IsQuestTameSpell(uint32 spellId)
    {
    

    In Spell.cpp, Spell::SetTargetMap

           case TARGET_ALL_PARTY_AROUND_CASTER:
           case TARGET_ALL_PARTY_AROUND_CASTER_2:
           case TARGET_ALL_PARTY:
           case TARGET_ALL_RAID_AROUND_CASTER:
           {
            Player *pTarget = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself();
               Group *pGroup = pTarget ? pTarget->GetGroup() : NULL;
    
               if(pGroup)
               {
    +        if(m_spellInfo->Id==57669) //Replenishment
    +        {
    +        typedef std::Priority_queue<Player*, std::vector<Player*>, PrioritizeMana> Top10;
    +        Top10 manaUsers;
    +
    +            for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
    +                {
    +                    Player* Target = itr->getSource();
    +                    if(m_caster->GetGUID() != Target->GetGUID() && Target->getPowerType() == POWER_MANA && !Target->isDead() && m_caster->IsWithinDistInMap(Target, radius))
    +                    {
    +                        manaUsers.push(Target);
    +                    }
    +                }
    +
    +                for(int countera=0; ( !manaUsers.empty() )&& countera<10;countera++)
    +                {
    +                    Player* Target = manaUsers.top();
    +                    manaUsers.pop();
    +                    TagUnitMap.push_back(Target);
    +                }
    +        }
    +        else
    +        {
              uint8 subgroup = pTarget->GetSubGroup();
    
                   for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
                   {
                       Player* Target = itr->getSource();
    
                       // IsHostileTo check duel and controlled by enemy
                       if( Target &&
                           (cur==TARGET_ALL_RAID_AROUND_CASTER || Target->GetSubGroup()==subgroup) &&
                           !m_caster->IsHostileTo(Target) )
                       {
                           if( m_caster->IsWithinDistInMap(Target, radius) )
                               TagUnitMap.push_back(Target);
    
                           if(Pet* pet = Target->GetPet())
                               if( m_caster->IsWithinDistInMap(pet, radius) )
                                   TagUnitMap.push_back(pet);
                       }
                   }
               }
    +    }
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use