Changeset 149 for trunk/src/game/Pet.cpp

Show
Ignore:
Timestamp:
11/19/08 13:40:46 (17 years ago)
Author:
yumileroy
Message:

[svn] *Implement new player conditions CONDITION_NO_AURA, CONDITION_ACTIVE_EVENT
* Default behaviour of pets for creatures changed to REACT_DEFENSIVE
* Disallowed sending wrapped items as COD
* Prevent loading and saving single target auras for pet in same way as already implemented for player
* Correctly limit use some flask types to zones.
* Fixed extracting common.MPQ under *nix
* Many small xleanups and fixes.
** mangos merge rev.

TEST REV so be careful of creepy crawly bugs!

Original author: KingPin?
Date: 2008-11-02 16:53:46-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Pet.cpp

    r120 r149  
    13671367                remaincharges = -1; 
    13681368 
     1369                        /// do not load single target auras (unless they were cast by the player) 
     1370                        if (caster_guid != GetGUID() && IsSingleTargetSpell(spellproto)) 
     1371                                continue; 
     1372 
    13691373            Aura* aura = CreateAura(spellproto, effindex, NULL, this, NULL); 
    13701374 
     
    13961400                break; 
    13971401 
    1398         if (i == 3 && !itr->second->IsPassive()) 
    1399             CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_index,amount,maxduration,remaintime,remaincharges) " 
    1400                 "VALUES ('%u', '" I64FMTD "', '%u', '%u', '%d', '%d', '%d', '%d')", 
    1401                 m_charmInfo->GetPetNumber(), itr->second->GetCasterGUID(),(uint32)(*itr).second->GetId(), (uint32)(*itr).second->GetEffIndex(),(*itr).second->GetModifier()->m_amount,int((*itr).second->GetAuraMaxDuration()),int((*itr).second->GetAuraDuration()),int((*itr).second->m_procCharges)); 
     1402        if (i != 3) 
     1403                        continue; 
     1404 
     1405                if(itr->second->IsPassive()) 
     1406                        continue; 
     1407 
     1408                /// do not save single target auras (unless they were cast by the player) 
     1409                if (itr->second->GetCasterGUID() != GetGUID() && IsSingleTargetSpell(spellInfo)) 
     1410                        continue; 
     1411 
     1412                CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_index,amount,maxduration,remaintime,remaincharges) " 
     1413                        "VALUES ('%u', '" I64FMTD "', '%u', '%u', '%d', '%d', '%d', '%d')", 
     1414                        m_charmInfo->GetPetNumber(), itr->second->GetCasterGUID(),(uint32)(*itr).second->GetId(), (uint32)(*itr).second->GetEffIndex(),(*itr).second->GetModifier()->m_amount,int((*itr).second->GetAuraMaxDuration()),int((*itr).second->GetAuraDuration()),int((*itr).second->m_procCharges)); 
    14021415    } 
    14031416}