diff options
author | maximius <none@none> | 2009-09-10 22:15:29 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-10 22:15:29 -0700 |
commit | bcf19139afae87b71cee87ea6a70e70fb444ea14 (patch) | |
tree | e0f9999b655ff54fb109d7a9063f904bfcf57529 /src | |
parent | 3441e4ef391e0096dbb3ceb6742c99f4fd994d0d (diff) |
*Cleanup comments, update THANKS (no idea if I missed anybody o_O), added Themris' Warlock's Death Coil healing and damage fix, corrected some typos
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Pet.cpp | 1 | ||||
-rw-r--r-- | src/game/PetAI.cpp | 15 | ||||
-rw-r--r-- | src/game/PetAI.h | 2 | ||||
-rw-r--r-- | src/game/PetHandler.cpp | 9 | ||||
-rw-r--r-- | src/game/Player.cpp | 3 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 10 | ||||
-rw-r--r-- | src/game/TargetedMovementGenerator.cpp | 7 | ||||
-rw-r--r-- | src/game/TargetedMovementGenerator.h | 1 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.h | 2 |
10 files changed, 17 insertions, 35 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 1578bd5badd..2c4dfe225ef 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -78,7 +78,6 @@ void Pet::AddToWorld() AIM_Initialize(); } - // MrSmite 09-09-2009 PetAI_v1.1 // Prevent stuck pets when zoning. Pets default to "follow" when added to world // so we'll reset flags and let the AI handle things if (this->GetCharmInfo() && this->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW)) diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index db7270bf553..f28cf2ecc93 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -70,7 +70,6 @@ void PetAI::_stopAttack() return; } - // MrSmite 09-05-2009 PetAI_v1.0 m_creature->AttackStop(); me->GetCharmInfo()->SetIsCommandAttack(false); HandleReturnMovement(); @@ -100,8 +99,6 @@ void PetAI::UpdateAI(const uint32 diff) } else if(owner && m_creature->GetCharmInfo()) //no victim { - // MrSmite 05-09-2009 PetAI_v1.0 - Unit *nextTarget = SelectNextTarget(); if (nextTarget) @@ -165,7 +162,7 @@ void PetAI::UpdateAI(const uint32 diff) Spell *spell = new Spell(m_creature, spellInfo, false, 0); - // MrSmite 09-05-2009 PetAI_v1.0 - Fix to allow pets on STAY to autocast + // Fix to allow pets on STAY to autocast if (inCombat && _CanAttack(me->getVictim()) && spell->CanAutoCast(me->getVictim())) { targetSpellStore.push_back(std::make_pair<Unit*, Spell*>(m_creature->getVictim(), spell)); @@ -269,8 +266,6 @@ void PetAI::UpdateAllies() void PetAI::KilledUnit(Unit *victim) { - // MrSmite 09-09-2009 PetAI_v1.2 - // Called from Unit::Kill() in case where pet or owner kills something // if owner killed this victim, pet may still be attacking something else if (me->getVictim() && me->getVictim() != victim) @@ -290,7 +285,6 @@ void PetAI::KilledUnit(Unit *victim) void PetAI::AttackStart(Unit *target) { - // MrSmite 09-05-2009 PetAI_v1.0 // Overrides Unit::AttackStart to correctly evaluate Pet states // Check all pet states to decide if we can attack this target @@ -311,8 +305,6 @@ void PetAI::AttackStart(Unit *target) Unit *PetAI::SelectNextTarget() { - // MrSmite 09-05-2009 PetAI_v1.0 - // Provides next target selection after current target death // Passive pets don't do next target selection @@ -334,8 +326,6 @@ Unit *PetAI::SelectNextTarget() void PetAI::HandleReturnMovement() { - // MrSmite 09-05-2009 PetAI_v1.0 - // Handles moving the pet back to stay or owner if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY)) @@ -402,7 +392,6 @@ void PetAI::DoAttack(Unit *target, bool chase) void PetAI::MovementInform(uint32 moveType, uint32 data) { - // MrSmite 09-05-2009 PetAI_v1.0 // Receives notification when pet reaches stay or follow owner switch (moveType) { @@ -467,4 +456,4 @@ bool PetAI::_CanAttack(Unit *target) // default, though we shouldn't ever get here return false; -}
\ No newline at end of file +} diff --git a/src/game/PetAI.h b/src/game/PetAI.h index b9059ad869e..226aa493202 100644 --- a/src/game/PetAI.h +++ b/src/game/PetAI.h @@ -39,7 +39,6 @@ class TRINITY_DLL_DECL PetAI : public CreatureAI void UpdateAI(const uint32); static int Permissible(const Creature *); - // MrSmite 09-05-2009 PetAI_v1.0 void KilledUnit(Unit *victim); void AttackStart(Unit *target); void MovementInform(uint32 moveType, uint32 data); @@ -56,7 +55,6 @@ class TRINITY_DLL_DECL PetAI : public CreatureAI std::set<uint64> m_AllySet; uint32 m_updateAlliesTimer; - // MrSmite 09-05-2009 PetAI_v1.0 Unit *SelectNextTarget(); void HandleReturnMovement(); void DoAttack(Unit *target, bool chase); diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 90a5a69d1b6..c9b07823d5f 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -96,7 +96,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid pet->InterruptNonMeleeSpells(false); pet->GetMotionMaster()->MoveIdle(); charmInfo->SetCommandState( COMMAND_STAY ); - // MrSmite 09-05-2009 PetAI_v1.0 + charmInfo->SetIsCommandAttack(false); charmInfo->SetIsAtStay(true); charmInfo->SetIsFollowing(false); @@ -108,7 +108,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid pet->InterruptNonMeleeSpells(false); pet->GetMotionMaster()->MoveFollow(_player,PET_FOLLOW_DIST,pet->GetFollowAngle()); charmInfo->SetCommandState( COMMAND_FOLLOW ); - // MrSmite 09-05-2009 PetAI_v1.0 + charmInfo->SetIsCommandAttack(false); charmInfo->SetIsAtStay(false); charmInfo->SetIsReturning(true); @@ -150,7 +150,6 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid if(pet->GetTypeId() != TYPEID_PLAYER && ((Creature*)pet)->IsAIEnabled) { - // MrSmite 09-05-2009 PetAI_v1.0 charmInfo->SetIsCommandAttack(true); charmInfo->SetIsAtStay(false); charmInfo->SetIsFollowing(false); @@ -172,7 +171,6 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid if(pet->getVictim() && pet->getVictim() != TargetUnit) pet->AttackStop(); - // MrSmite 09-05-2009 PetAI_v1.0 charmInfo->SetIsCommandAttack(true); charmInfo->SetIsAtStay(false); charmInfo->SetIsFollowing(false); @@ -212,7 +210,6 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid switch(spellid) { case REACT_PASSIVE: //passive - // MrSmite 09-05-2009 PetAI_v1.0 pet->AttackStop(); case REACT_DEFENSIVE: //recovery @@ -251,7 +248,6 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid if(!pet->HasSpell(spellid) || IsPassiveSpell(spellid)) return; - // MrSmite 09-08-2009 PetAI_v1.1 // Clear the flags as if owner clicked 'attack'. AI will reset them // after AttackStart, even if spell failed if (pet->GetCharmInfo()) @@ -330,7 +326,6 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid spell->finish(false); delete spell; - // MrSmite 09-08-2009 PetAI_v1.1 // reset specific flags in case of spell fail. AI will reset other flags if (pet->GetCharmInfo()) pet->GetCharmInfo()->SetIsCommandAttack(false); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d25f27fff66..20cc3265e09 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17962,8 +17962,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc // prevent stealth flight //RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK); - //Hawthorne - Instant Taxi Option - if ((bool)sWorld.getConfig(CONFIG_INSTANT_TAXI)) + if (sWorld.getConfig(CONFIG_INSTANT_TAXI)) { TaxiNodesEntry const* lastnode = sTaxiNodesStore.LookupEntry(nodes[nodes.size()-1]); m_taxi.ClearTaxiDestinations(); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 208ae3759f8..a0ca82d7674 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2744,7 +2744,12 @@ void Spell::EffectHealthLeech(uint32 i) if(Player *modOwner = m_caster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_MULTIPLE_VALUE, multiplier); - int32 new_damage = int32(damage*multiplier); + // Do not apply multiplier to damage if it's Death Coil + int32 new_damage; + if (m_spellInfo->SpellFamilyFlags[0] & 0x80000) + new_damage = damage; + else + int32 new_damage = int32(damage*multiplier); uint32 curHealth = unitTarget->GetHealth(); new_damage = m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, new_damage ); if(curHealth < new_damage) @@ -2752,6 +2757,9 @@ void Spell::EffectHealthLeech(uint32 i) if(m_caster->isAlive()) { + // Insead add it just to healing if it's Death Coil + if (m_spellInfo->SpellFamilyFlags[0] & 0x80000) + new_damage = int32(new_damage*multiplier); new_damage = m_caster->SpellHealingBonus(m_caster, m_spellInfo, new_damage, HEAL); m_caster->DealHeal(m_caster, uint32(new_damage), m_spellInfo); } diff --git a/src/game/TargetedMovementGenerator.cpp b/src/game/TargetedMovementGenerator.cpp index 061e875a91c..c14ed5ba75e 100644 --- a/src/game/TargetedMovementGenerator.cpp +++ b/src/game/TargetedMovementGenerator.cpp @@ -22,7 +22,7 @@ #include "TargetedMovementGenerator.h" #include "Errors.h" #include "Creature.h" -#include "CreatureAI.h" // MrSmite 09-05-2009 PetAI_v1.0 +#include "CreatureAI.h" #include "DestinationHolderImp.h" #include "World.h" @@ -238,7 +238,6 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff) } } - // MrSmite 09-05-2009 PetAI_v1.0 // Implemented for PetAI to handle resetting flags when pet owner reached if (i_destinationHolder.HasArrived()) MovementInform(owner); @@ -256,17 +255,15 @@ TargetedMovementGenerator<T>::GetTarget() const template<class T> void TargetedMovementGenerator<T>::MovementInform(T &unit) { - // MrSmite 09-05-2009 PetAI_v1.0 } template <> void TargetedMovementGenerator<Creature>::MovementInform(Creature &unit) { - // MrSmite 09-05-2009 PetAI_v1.0 // Pass back the GUIDLow of the target. If it is pet's owner then PetAI will handle unit.AI()->MovementInform(TARGETED_MOTION_TYPE, i_target.getTarget()->GetGUIDLow()); } -template void TargetedMovementGenerator<Player>::MovementInform(Player&); // MrSmite 09-05-2009 PetAI_v1.0 - Not implemented for players +template void TargetedMovementGenerator<Player>::MovementInform(Player&); // Not implemented for players template TargetedMovementGenerator<Player>::TargetedMovementGenerator(Unit &target, float offset, float angle); template TargetedMovementGenerator<Creature>::TargetedMovementGenerator(Unit &target, float offset, float angle); template bool TargetedMovementGenerator<Player>::_setTargetLocation(Player &); diff --git a/src/game/TargetedMovementGenerator.h b/src/game/TargetedMovementGenerator.h index a2b09c822c8..c6e7ef05812 100644 --- a/src/game/TargetedMovementGenerator.h +++ b/src/game/TargetedMovementGenerator.h @@ -49,7 +49,6 @@ class TRINITY_DLL_SPEC TargetedMovementGenerator bool Update(T &, const uint32 &); MovementGeneratorType GetMovementGeneratorType() { return TARGETED_MOTION_TYPE; } - // MrSmite 09-05-2009 PetAI_v1.0 void MovementInform(T &); Unit* GetTarget() const; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1432898ae1d..889633dccf6 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -15084,4 +15084,4 @@ void CharmInfo::SetIsReturning(bool val) bool CharmInfo::IsReturning() { return m_isReturning; -}
\ No newline at end of file +} diff --git a/src/game/Unit.h b/src/game/Unit.h index bd1abcc20e5..4a62568f613 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1011,7 +1011,6 @@ struct CharmInfo CharmSpellEntry* GetCharmSpell(uint8 index) { return &(m_charmspells[index]); } - // MrSmite 09-05-2009 PetAI_v1.0 void SetIsCommandAttack(bool val); bool IsCommandAttack(); void SetIsAtStay(bool val); @@ -1036,7 +1035,6 @@ struct CharmInfo //for restoration after charmed ReactStates m_oldReactState; - // MrSmite 09-05-2009 PetAI_v1.0 bool m_isCommandAttack; bool m_isAtStay; bool m_isFollowing; |