diff options
-rwxr-xr-x | src/server/game/Entities/Creature/Creature.cpp | 4 | ||||
-rwxr-xr-x | src/server/game/Entities/Creature/Creature.h | 1 | ||||
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Handlers/CharacterHandler.cpp | 1 | ||||
-rwxr-xr-x | src/server/game/Spells/Auras/SpellAuras.cpp | 4 | ||||
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 8 | ||||
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp | 7 |
7 files changed, 12 insertions, 15 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index d40ee89e774..3dfa1cece61 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -141,7 +141,7 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/) Creature::Creature(bool isWorldObject): Unit(isWorldObject), MapCreature(), lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLowGUID(0), -m_PlayerDamageReq(0), m_lootMoney(0), m_lootRecipient(0), m_lootRecipientGroup(0), m_corpseRemoveTime(0), m_respawnTime(0), +m_PlayerDamageReq(0), m_lootRecipient(0), m_lootRecipientGroup(0), m_corpseRemoveTime(0), m_respawnTime(0), m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_reactState(REACT_AGGRESSIVE), m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false), m_AlreadySearchedAssistance(false), m_regenHealth(true), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), @@ -1415,7 +1415,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC)) return false; - + // Do not attack non-combat pets if (who->GetTypeId() == TYPEID_UNIT && who->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET) return false; diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 1e360342852..bfe186329e1 100755 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -721,7 +721,6 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature static float _GetHealthMod(int32 Rank); - uint32 m_lootMoney; uint64 m_lootRecipient; uint32 m_lootRecipientGroup; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 183267d1dbf..7bcd993192e 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12164,7 +12164,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co if (FactionTemplateEntry const* factionTemplate = creature->getFactionTemplateEntry()) if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplate->faction)) if (FactionState const* repState = player->GetReputationMgr().GetState(factionEntry)) - if (repState->Flags & FACTION_FLAG_PEACE_FORCED) + if (!(repState->Flags & FACTION_FLAG_AT_WAR)) return false; } } diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 310bda92739..d677424496a 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -615,6 +615,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte } Player newChar(this); + newChar.GetMotionMaster()->Initialize(); if (!newChar.Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PLAYER), createInfo)) { // Player not create (race/class/etc problem?) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index ee5827cdb98..1260425ef55 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1840,6 +1840,10 @@ bool Aura::CanStackWith(Aura const* existingAura) const if (!sameCaster) { + // Channeled auras can stack if not forbidden by db or aura type + if (existingAura->GetSpellInfo()->IsChanneled()) + return true; + if (m_spellInfo->AttributesEx3 & SPELL_ATTR3_STACK_FOR_DIFF_CASTERS) return true; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index cc159a613c3..cbfa739fb69 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2814,12 +2814,12 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) unitList.remove(m_targets.GetUnitTarget()); Trinity::RandomResizeList(unitList, maxTargets); } - } - CallScriptAfterUnitTargetSelectHandlers(unitList, SpellEffIndex(i)); + CallScriptAfterUnitTargetSelectHandlers(unitList, SpellEffIndex(i)); - for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr) - AddUnitTarget(*itr, effectMask, false); + for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr) + AddUnitTarget(*itr, effectMask, false); + } if (!gobjectList.empty()) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index b2ee0572247..fbed870eb19 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -501,13 +501,6 @@ class boss_the_lich_king : public CreatureScript DoCastAOE(SPELL_PLAY_MOVIE, false); me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x03); - float x, y, z; - me->GetPosition(x, y, z); - // use larger distance for vmap height search than in most other cases - float ground_Z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z, true, MAX_FALL_DISTANCE); - if (fabs(ground_Z - z) < 0.1f) - return; - me->GetMotionMaster()->MoveFall(); } |