[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:
KingPin
2008-11-02 16:53:46 -06:00
parent 6633d3c680
commit d5beb2bbe9
30 changed files with 414 additions and 342 deletions

View File

@@ -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));
}
}