Cmangos Cata commits applied

I thankee, cmangos :-)

Commits:

13271d6 Commit Ported  Core Pet DB cleanup and simplification
60d6e29 Commit Imported  Core Utilize flags in PetAI (And uniform extra
flags with the other cores)
06d30ce Commit Ported  Core Make pet assist owner on summon if not a
passive
2821da8 Commit Ported  Core Fix Guardian reactions
4f88a9e Commit Ported  Core Pet AI Fixup
67e0558 Commit Imported  Core Fix pet unsummon on mount
f50041f Commit Imported  Core Fix player rooted after possesing an unit.
df59a93 Commit Imported  Core Syncing up pet work
056f4f5 Commit Imported  Core Fix a couple of invalid name for spell
attributes
6a58f1f Commit Imported  Core only save correct auras on
pet::SavePetToDB
34ab59b Commit Imported  Core Hunter summon pet (call pet) checkcast
fixup
dfbb69c Commit Imported  Core Handle owner entering combat properly
4b10eb4 Commit Imported  Core Pet Aggro
1bdb7e3 Commit Ported  Core Clean up pet stay functionality
1bdb7e3 Commit Ported  Core Clean up pet stay functionality
9b7b50e Commit Imported  Core UNIT_BYTE2_FLAG work
0777235 Commit Imported  Core Implement displaying group leader
indicators on players
5efab47 Commit Imported  Core Health funnel fixes
60e6a84 Commit Ported  Core Fix SMSG_QUESTGIVER_STATUS_MULTIPLE and
GetDialogStatus
60e6a84 Commit Ported  Core Fix SMSG_QUESTGIVER_STATUS_MULTIPLE and

GetDialogStatus
f8d3cbd Commit Imported  Core Fix talent spell cannot stack
32ba32e Commit Imported  Core Fix channeled spell distance check
interval
47ec2fa Commit Imported  Core Adding state to aura holder Now proc
cannot remove an aura not finalized
34588dc Commit Ported  Core Unbreak creature pets
bd079a1 Commit Imported  Core The (not so)Great Pet Rework
This commit is contained in:
Charles A Edwards 2016-09-15 14:56:42 +01:00 committed by Antz
parent c4c83f5b58
commit 600205641d
20 changed files with 634 additions and 507 deletions

View file

@ -855,7 +855,7 @@ bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT:
case SPELL_AURA_MOD_DAMAGE_PERCENT_DONE:
if (spellEffect->CalculateSimpleValue() > 0)
return true; // some expected positive spells have SPELL_ATTR_EX_NEGATIVE or unclear target modes
return true; // some expected positive spells have SPELL_ATTR_NEGATIVE or unclear target modes
break;
case SPELL_AURA_ADD_TARGET_TRIGGER:
return true;
@ -924,7 +924,7 @@ bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
spellproto->GetSpellFamilyName() == SPELLFAMILY_GENERIC)
return false;
// but not this if this first effect (don't found better check)
if (spellproto->HasAttribute(SPELL_ATTR_UNK26) && effIndex == EFFECT_INDEX_0)
if (spellproto->HasAttribute(SPELL_ATTR_NEGATIVE) && effIndex == EFFECT_INDEX_0)
return false;
break;
case SPELL_AURA_TRANSFORM:
@ -1032,7 +1032,7 @@ bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
return false;
// AttributesEx check
if (spellproto->HasAttribute(SPELL_ATTR_EX_NEGATIVE))
if (spellproto->HasAttribute(SPELL_ATTR_NEGATIVE))
return false;
// ok, positive
@ -2728,6 +2728,17 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
return true;
}
bool SpellMgr::IsSpellCanAffectSpell(SpellEntry const* spellInfo_1, SpellEntry const* spellInfo_2) const
{
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
{
ClassFamilyMask mask = spellInfo_1->GetEffectSpellClassMask(SpellEffectIndex(i));
if (spellInfo_2->IsFitToFamilyMask(mask))
return true;
}
return false;
}
bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId)
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);