mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
[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! --HG-- branch : trunk
This commit is contained in:
@@ -1366,6 +1366,10 @@ void Pet::_LoadAuras(uint32 timediff)
|
||||
else
|
||||
remaincharges = -1;
|
||||
|
||||
/// do not load single target auras (unless they were cast by the player)
|
||||
if (caster_guid != GetGUID() && IsSingleTargetSpell(spellproto))
|
||||
continue;
|
||||
|
||||
Aura* aura = CreateAura(spellproto, effindex, NULL, this, NULL);
|
||||
|
||||
if(!damage)
|
||||
@@ -1395,10 +1399,19 @@ void Pet::_SaveAuras()
|
||||
spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AREA_AURA_PET )
|
||||
break;
|
||||
|
||||
if (i == 3 && !itr->second->IsPassive())
|
||||
CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_index,amount,maxduration,remaintime,remaincharges) "
|
||||
"VALUES ('%u', '" I64FMTD "', '%u', '%u', '%d', '%d', '%d', '%d')",
|
||||
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));
|
||||
if (i != 3)
|
||||
continue;
|
||||
|
||||
if(itr->second->IsPassive())
|
||||
continue;
|
||||
|
||||
/// do not save single target auras (unless they were cast by the player)
|
||||
if (itr->second->GetCasterGUID() != GetGUID() && IsSingleTargetSpell(spellInfo))
|
||||
continue;
|
||||
|
||||
CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_index,amount,maxduration,remaintime,remaincharges) "
|
||||
"VALUES ('%u', '" I64FMTD "', '%u', '%u', '%d', '%d', '%d', '%d')",
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user