diff options
| author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-07 16:57:39 +0100 |
|---|---|---|
| committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-07 16:57:39 +0100 |
| commit | b69dff28dbd536f503de11f9348d8640cfba37d7 (patch) | |
| tree | d5894f914c93d25d41f5724762e9b8c1c160e33e /src/server/game/Entities/Unit | |
| parent | 9ad1857e59fcd81d58a953565a738e97c4fc7236 (diff) | |
| parent | d0e4e202658206aa40e656101334b446ebc9f18e (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts:
src/server/game/World/World.cpp
src/server/worldserver/worldserver.conf.dist
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 831e3785b94..017f0232852 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12716,7 +12716,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) if (GetTypeId() == TYPEID_UNIT) { Unit* pOwner = GetCharmerOrOwner(); - if (isPet() && !isInCombat() && pOwner) // Must check for owner or crash on "Tame Beast" + if ((isPet() || isGuardian()) && !isInCombat() && pOwner) // Must check for owner or crash on "Tame Beast" { // For every yard over 5, increase speed by 0.01 // to help prevent pet from lagging behind and despawning @@ -14448,6 +14448,12 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u } } + Unit* actor = isVictim ? target : this; + Unit* actionTarget = !isVictim ? target : this; + + DamageInfo damageInfo = DamageInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL, SPELL_DIRECT_DAMAGE); + ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, NULL, &damageInfo, NULL /*HealInfo*/); + ProcTriggeredList procTriggered; // Fill procTriggered list for (AuraApplicationMap::const_iterator itr = GetAppliedAuras().begin(); itr!= GetAppliedAuras().end(); ++itr) @@ -14471,6 +14477,12 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u if (!IsTriggeredAtSpellProcEvent(target, triggerData.aura, procSpell, procFlag, procExtra, attType, isVictim, active, triggerData.spellProcEvent)) continue; + // do checks using conditions table + ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_PROC, spellProto->Id); + ConditionSourceInfo condInfo = ConditionSourceInfo(eventInfo.GetActor(), eventInfo.GetActionTarget()); + if (!sConditionMgr->IsObjectMeetToConditions(condInfo, conditions)) + continue; + // Triggered spells not triggering additional spells bool triggered = !(spellProto->AttributesEx3 & SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED) ? (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false; |
