mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Merge remote branch 'origin/master' into 330
This commit is contained in:
commit
654a93d7cd
8 changed files with 147 additions and 135 deletions
|
|
@ -1558,11 +1558,14 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
|
|||
// only from players
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
uint32 redunction_affected_damage = CalcNotIgnoreDamageRedunction(damage,damageInfo->damageSchoolMask);
|
||||
uint32 redunction_affected_damage = CalcNotIgnoreDamageRedunction(damageInfo->damage,damageInfo->damageSchoolMask);
|
||||
uint32 resilienceReduction;
|
||||
if (attackType != RANGED_ATTACK)
|
||||
damage -= pVictim->GetMeleeDamageReduction(redunction_affected_damage);
|
||||
resilienceReduction = pVictim->GetMeleeDamageReduction(redunction_affected_damage);
|
||||
else
|
||||
damage -= pVictim->GetRangedDamageReduction(redunction_affected_damage);
|
||||
resilienceReduction = pVictim->GetRangedDamageReduction(redunction_affected_damage);
|
||||
damageInfo->damage -= resilienceReduction;
|
||||
damageInfo->cleanDamage += resilienceReduction;
|
||||
}
|
||||
|
||||
// Calculate absorb resist
|
||||
|
|
@ -8638,11 +8641,6 @@ void Unit::SetPet(Pet* pet)
|
|||
|
||||
if(pet && GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)this)->SendPetGUIDs();
|
||||
|
||||
// FIXME: hack, speed must be set only at follow
|
||||
if(pet && GetTypeId()==TYPEID_PLAYER)
|
||||
for(int i = 0; i < MAX_MOVE_TYPE; ++i)
|
||||
pet->SetSpeedRate(UnitMoveType(i), m_speed_rate[i], true);
|
||||
}
|
||||
|
||||
void Unit::SetCharm(Unit* pet)
|
||||
|
|
@ -10724,7 +10722,7 @@ void Unit::UpdateWalkMode(Unit* source, bool self)
|
|||
CallForAllControlledUnits(UpdateWalkModeHelper(source), false, true, true);
|
||||
}
|
||||
|
||||
void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
|
||||
void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio)
|
||||
{
|
||||
// not in combat pet have same speed as owner
|
||||
switch(mtype)
|
||||
|
|
@ -10834,7 +10832,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
|
|||
if (speed < min_speed)
|
||||
speed = min_speed;
|
||||
}
|
||||
SetSpeedRate(mtype, speed, forced);
|
||||
SetSpeedRate(mtype, speed * ratio, forced);
|
||||
}
|
||||
|
||||
float Unit::GetSpeed( UnitMoveType mtype ) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue