Merge remote-tracking branch 'tc/3.3.5' into 4.3.4
Conflicts: sql/base/characters_database.sql sql/updates/world/2016_01_26_00_world.sql sql/updates/world/2016_01_31_00_world.sql sql/updates/world/2016_02_07_00_world.sql src/server/authserver/Server/AuthSession.cpp src/server/database/Database/Implementation/LoginDatabase.cpp src/server/database/Database/Implementation/LoginDatabase.h src/server/game/AI/ScriptedAI/ScriptedCreature.cpp src/server/game/AI/ScriptedAI/ScriptedCreature.h src/server/game/Achievements/AchievementMgr.cpp src/server/game/Chat/Chat.cpp src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCStructure.h src/server/game/DataStores/DBCfmt.h src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Handlers/MailHandler.cpp src/server/game/Handlers/MovementHandler.cpp src/server/game/Server/WorldSocket.cpp src/server/game/Server/WorldSocket.h src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/SpellEffects.cpp src/server/game/Spells/SpellMgr.cpp src/server/scripts/Spells/spell_druid.cpp src/server/scripts/Spells/spell_generic.cpp src/server/scripts/Spells/spell_hunter.cpp src/server/scripts/Spells/spell_rogue.cpp src/server/scripts/Spells/spell_shaman.cpp src/server/shared/Networking/AsyncAcceptor.h src/tools/map_extractor/CMakeLists.txt src/tools/map_extractor/System.cpp src/tools/map_extractor/adt.h src/tools/mmaps_generator/MapBuilder.cpp
This commit is contained in:
commit
8bc477a2de
161 files changed
+3548
-2022
No files matched your search
@@ -1633,6 +1633,9 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
|
||||
RoundToInterval(auraAbsorbMod, 0.0f, 100.0f);
|
||||
|
||||
int32 absorbIgnoringDamage = CalculatePct(dmgInfo.GetDamage(), auraAbsorbMod);
|
||||
dmgInfo.ModifyDamage(-absorbIgnoringDamage);
|
||||
|
||||
// We're going to call functions which can modify content of the list during iteration over it's elements
|
||||
// Let's copy the list so we can prevent iterator invalidation
|
||||
AuraEffectList vSchoolAbsorbCopy(victim->GetAuraEffectsByType(SPELL_AURA_SCHOOL_ABSORB));
|
||||
@@ -1665,9 +1668,6 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
if (defaultPrevented)
|
||||
continue;
|
||||
|
||||
// Apply absorb mod auras
|
||||
AddPct(currentAbsorb, -auraAbsorbMod);
|
||||
|
||||
// absorb must be smaller than the damage itself
|
||||
currentAbsorb = RoundToInterval(currentAbsorb, 0, int32(dmgInfo.GetDamage()));
|
||||
|
||||
@@ -1716,8 +1716,6 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
if (defaultPrevented)
|
||||
continue;
|
||||
|
||||
AddPct(currentAbsorb, -auraAbsorbMod);
|
||||
|
||||
// absorb must be smaller than the damage itself
|
||||
currentAbsorb = RoundToInterval(currentAbsorb, 0, int32(dmgInfo.GetDamage()));
|
||||
|
||||
@@ -1746,6 +1744,8 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
|
||||
}
|
||||
}
|
||||
|
||||
dmgInfo.ModifyDamage(absorbIgnoringDamage);
|
||||
|
||||
// split damage auras - only when not damaging self
|
||||
if (victim != this)
|
||||
{
|
||||
@@ -4130,13 +4130,10 @@ void Unit::GetDispellableAuraList(Unit* caster, uint32 dispelMask, DispelCharges
|
||||
|
||||
if (aura->GetSpellInfo()->GetDispelMask() & dispelMask)
|
||||
{
|
||||
if (aura->GetSpellInfo()->Dispel == DISPEL_MAGIC)
|
||||
{
|
||||
// do not remove positive auras if friendly target
|
||||
// negative auras if non-friendly target
|
||||
if (aurApp->IsPositive() == IsFriendlyTo(caster))
|
||||
continue;
|
||||
}
|
||||
// do not remove positive auras if friendly target
|
||||
// negative auras if non-friendly target
|
||||
if (aurApp->IsPositive() == IsFriendlyTo(caster))
|
||||
continue;
|
||||
|
||||
// The charges / stack amounts don't count towards the total number of auras that can be dispelled.
|
||||
// Ie: A dispel on a target with 5 stacks of Winters Chill and a Polymorph has 1 / (1 + 1) -> 50% chance to dispell
|
||||
@@ -11140,7 +11137,7 @@ Unit* Creature::SelectVictim()
|
||||
}
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
if (target && _IsTargetAcceptable(target) && CanCreatureAttack(target))
|
||||
{
|
||||
@@ -11149,14 +11146,6 @@ Unit* Creature::SelectVictim()
|
||||
return target;
|
||||
}
|
||||
|
||||
// Case where mob is being kited.
|
||||
// Mob may not be in range to attack or may have dropped target. In any case,
|
||||
// don't evade if damage received within the last 10 seconds
|
||||
// Does not apply to world bosses to prevent kiting to cities
|
||||
if (!isWorldBoss() && !GetInstanceId())
|
||||
if (time(NULL) - GetLastDamagedTime() <= MAX_AGGRO_RESET_TIME)
|
||||
return target;
|
||||
|
||||
// last case when creature must not go to evade mode:
|
||||
// it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list
|
||||
// for example at owner command to pet attack some far away creature
|
||||
@@ -11165,12 +11154,12 @@ Unit* Creature::SelectVictim()
|
||||
{
|
||||
if ((*itr) && !CanCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
|
||||
&& !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/// @todo a vehicle may eat some mob, so mob should not evade
|
||||
if (GetVehicle())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// search nearby enemy before enter evade mode
|
||||
if (HasReactState(REACT_AGGRESSIVE))
|
||||
@@ -11188,17 +11177,17 @@ Unit* Creature::SelectVictim()
|
||||
{
|
||||
if ((*itr)->GetBase()->IsPermanent())
|
||||
{
|
||||
AI()->EnterEvadeMode();
|
||||
AI()->EnterEvadeMode(CreatureAI::EVADE_REASON_OTHER);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// enter in evade mode in other case
|
||||
AI()->EnterEvadeMode(CreatureAI::EVADE_REASON_NO_HOSTILES);
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
@@ -15458,12 +15447,12 @@ void Unit::JumpTo(float speedXY, float speedZ, bool forward)
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::JumpTo(WorldObject* obj, float speedZ)
|
||||
void Unit::JumpTo(WorldObject* obj, float speedZ, bool withOrientation)
|
||||
{
|
||||
float x, y, z;
|
||||
obj->GetContactPoint(this, x, y, z);
|
||||
float speedXY = GetExactDist2d(x, y) * 10.0f / speedZ;
|
||||
GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
|
||||
GetMotionMaster()->MoveJump(x, y, z, GetAngle(obj), speedXY, speedZ, EVENT_JUMP, withOrientation);
|
||||
}
|
||||
|
||||
bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
|
||||
Reference in new issue
Block a user