Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C++ by Hundekuchen ( 16 years ago )
void Aura::MirasBossFunktion(int32 aura_buff, int32 spellmod_buff, int32 dmg_buff)
{
    Unit* caster = GetCaster();
    int32 count = 0;

    Map *map = caster->GetMap();
    Map::PlayerList const& players = map->GetPlayers();
    for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
    {
        if (Player* pPlayer = itr->getSource())
        {
            if(caster != pPlayer && pPlayer->isAlive())
            {
                if(caster->IsWithinDistInMap(pPlayer,10,true))
                {
                    if(pPlayer->HasAura(aura_buff))
                    {
                        Unit::AuraMap& auras = caster->GetAuras();
                        for(Unit::AuraMap::iterator i = auras.begin(); i != auras.end(); ++i)
                        {
                            if(i->second->GetId() == spellmod_buff)
                                ++count;

                        }
                     if(count < players.getSize())
                         caster->CastSpell(caster, spellmod_buff, true, NULL, this);
                    }
                    else 
                    {
                        caster->CastSpell(caster, dmg_buff, true);
                    }
                }
            }
        }
    }
}

 

Revise this Paste

Parent: 17338
Children: 17340
Your Name: Code Language: