mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -421,9 +421,9 @@ void Unit::GetRandomContactPoint( const Unit* obj, float &x, float &y, float &z,
|
||||
// sLog.outError("Creature entry %u has invalid combat_reach", ((Creature*)this)->GetEntry());
|
||||
combat_reach = DEFAULT_COMBAT_REACH;
|
||||
}
|
||||
uint32 attacker_number = getAttackers().size();
|
||||
uint32 attacker_number = getAttackers().size();
|
||||
if(attacker_number > 0) --attacker_number;
|
||||
GetNearPoint(obj,x,y,z,obj->GetCombatReach(), distance2dMin+(distance2dMax-distance2dMin)*rand_norm()
|
||||
GetNearPoint(obj,x,y,z,obj->GetCombatReach(), distance2dMin+(distance2dMax-distance2dMin)*rand_norm()
|
||||
, GetAngle(obj) + (attacker_number ? (M_PI/2 - M_PI * rand_norm()) * (float)attacker_number / combat_reach / 3 : 0));
|
||||
}
|
||||
|
||||
@@ -543,34 +543,34 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||
|
||||
//Script Event damage taken
|
||||
if( pVictim->GetTypeId()== TYPEID_UNIT && ((Creature *)pVictim)->AI() )
|
||||
{
|
||||
((Creature *)pVictim)->AI()->DamageTaken(this, damage);
|
||||
{
|
||||
((Creature *)pVictim)->AI()->DamageTaken(this, damage);
|
||||
|
||||
// Set tagging
|
||||
if(!pVictim->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_OTHER_TAGGER) && !((Creature*)pVictim)->isPet())
|
||||
{
|
||||
//Set Loot
|
||||
switch(GetTypeId())
|
||||
{
|
||||
case TYPEID_PLAYER:
|
||||
{
|
||||
((Creature *)pVictim)->SetLootRecipient(this);
|
||||
//Set tagged
|
||||
((Creature *)pVictim)->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_OTHER_TAGGER);
|
||||
break;
|
||||
}
|
||||
case TYPEID_UNIT:
|
||||
{
|
||||
if(((Creature*)this)->isPet())
|
||||
{
|
||||
((Creature *)pVictim)->SetLootRecipient(this->GetOwner());
|
||||
((Creature *)pVictim)->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_OTHER_TAGGER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Set tagging
|
||||
if(!pVictim->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_OTHER_TAGGER) && !((Creature*)pVictim)->isPet())
|
||||
{
|
||||
//Set Loot
|
||||
switch(GetTypeId())
|
||||
{
|
||||
case TYPEID_PLAYER:
|
||||
{
|
||||
((Creature *)pVictim)->SetLootRecipient(this);
|
||||
//Set tagged
|
||||
((Creature *)pVictim)->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_OTHER_TAGGER);
|
||||
break;
|
||||
}
|
||||
case TYPEID_UNIT:
|
||||
{
|
||||
if(((Creature*)this)->isPet())
|
||||
{
|
||||
((Creature *)pVictim)->SetLootRecipient(this->GetOwner());
|
||||
((Creature *)pVictim)->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_OTHER_TAGGER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (damagetype != NODAMAGE)
|
||||
{
|
||||
@@ -3064,7 +3064,7 @@ uint32 Unit::GetWeaponSkillValue (WeaponAttackType attType, Unit const* target)
|
||||
if(attType != BASE_ATTACK && !item )
|
||||
{
|
||||
if(attType == RANGED_ATTACK && getClass() == CLASS_PALADIN) //hammer
|
||||
return GetMaxSkillValueForLevel();
|
||||
return GetMaxSkillValueForLevel();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -7868,22 +7868,22 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||
|
||||
/*switch(spellProto->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
// Siphon Essence - 0%
|
||||
if(spellProto->AttributesEx == 268435456 && spellProto->SpellIconID == 2027)
|
||||
{
|
||||
CastingTime = 0;
|
||||
}
|
||||
// Goblin Rocket Launcher - 0%
|
||||
else if (spellProto->SpellIconID == 184 && spellProto->Attributes == 4259840)
|
||||
{
|
||||
CastingTime = 0;
|
||||
}
|
||||
// Darkmoon Card: Vengeance - 0.1%
|
||||
else if (spellProto->SpellVisual[0] == 9850 && spellProto->SpellIconID == 2230)
|
||||
{
|
||||
CastingTime = 3.5;
|
||||
}
|
||||
case SPELLFAMILY_GENERIC:
|
||||
// Siphon Essence - 0%
|
||||
if(spellProto->AttributesEx == 268435456 && spellProto->SpellIconID == 2027)
|
||||
{
|
||||
CastingTime = 0;
|
||||
}
|
||||
// Goblin Rocket Launcher - 0%
|
||||
else if (spellProto->SpellIconID == 184 && spellProto->Attributes == 4259840)
|
||||
{
|
||||
CastingTime = 0;
|
||||
}
|
||||
// Darkmoon Card: Vengeance - 0.1%
|
||||
else if (spellProto->SpellVisual[0] == 9850 && spellProto->SpellIconID == 2230)
|
||||
{
|
||||
CastingTime = 3.5;
|
||||
}
|
||||
case SPELLFAMILY_MAGE:
|
||||
// Ignite - do not modify, it is (8*Rank)% damage of procing Spell
|
||||
if(spellProto->Id==12654)
|
||||
@@ -8465,7 +8465,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||
if (spellProto->Id == 15290 || spellProto->Id == 39373 ||
|
||||
spellProto->Id == 33778 || spellProto->Id == 379 ||
|
||||
spellProto->Id == 38395 || spellProto->Id == 40972 ||
|
||||
spellProto->Id == 22845 || spellProto->Id == 33504 ||
|
||||
spellProto->Id == 22845 || spellProto->Id == 33504 ||
|
||||
spellProto->Id == 34299)
|
||||
return healamount;
|
||||
|
||||
@@ -8575,12 +8575,12 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||
DotFactor = damagetype == DOT ? 0.705f : 1.0f;
|
||||
CastingTime = damagetype == DOT ? 3500 : 1010;
|
||||
}
|
||||
// Improved Leader of the Pack
|
||||
else if (spellProto->AttributesEx2 == 536870912 && spellProto->SpellIconID == 312
|
||||
&& spellProto->AttributesEx3 == 33554432)
|
||||
{
|
||||
CastingTime = 0;
|
||||
}
|
||||
// Improved Leader of the Pack
|
||||
else if (spellProto->AttributesEx2 == 536870912 && spellProto->SpellIconID == 312
|
||||
&& spellProto->AttributesEx3 == 33554432)
|
||||
{
|
||||
CastingTime = 0;
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_PRIEST:
|
||||
// Holy Nova - 14%
|
||||
|
||||
Reference in New Issue
Block a user