Merge
--HG-- branch : trunk
This commit is contained in:
@@ -140,7 +140,7 @@ m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_A
|
||||
m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
|
||||
m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formation(NULL), m_summonMask(SUMMON_MASK_NONE)
|
||||
, m_AlreadySearchedAssistance(false)
|
||||
, m_creatureData(NULL)
|
||||
, m_creatureData(NULL), m_PlayerDamageReq(0)
|
||||
{
|
||||
m_regenTimer = 200;
|
||||
m_valuesCount = UNIT_END;
|
||||
|
||||
+1
-1
@@ -616,7 +616,7 @@ void Map::RelocationNotify()
|
||||
|
||||
void Map::AddUnitToNotify(Unit* u)
|
||||
{
|
||||
if(u->m_NotifyListPos < 0)
|
||||
if(u->m_NotifyListPos < 0 && u->IsInWorld())
|
||||
{
|
||||
u->oldX = u->GetPositionX();
|
||||
u->oldY = u->GetPositionY();
|
||||
|
||||
+1
-1
@@ -6502,7 +6502,7 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply)
|
||||
uint8 attacktype = Player::GetAttackBySlot(slot);
|
||||
|
||||
//check disarm only on mod apply to allow remove item mods
|
||||
if (apply && !CanUseAttackType(attacktype) )
|
||||
if (!CanUseAttackType(attacktype) )
|
||||
return;
|
||||
|
||||
if(attacktype < MAX_ATTACK)
|
||||
|
||||
+1
-1
@@ -1052,7 +1052,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
// Do healing and triggers
|
||||
if (m_healing > 0)
|
||||
{
|
||||
bool crit = caster->isSpellCrit(NULL, m_spellInfo, m_spellSchoolMask);
|
||||
bool crit = caster->isSpellCrit(unitTarget, m_spellInfo, m_spellSchoolMask);
|
||||
uint32 addhealth = m_healing;
|
||||
if (crit)
|
||||
{
|
||||
|
||||
@@ -3907,17 +3907,19 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount*
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if(apply)
|
||||
m_target->SetFlag(field, flag);
|
||||
else
|
||||
m_target->RemoveFlag(field, flag);
|
||||
|
||||
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if(Item *pItem = ((Player*)m_target)->GetItemByPos( INVENTORY_SLOT_BAG_0, slot ))
|
||||
((Player*)m_target)->_ApplyItemMods(pItem, slot, !apply);
|
||||
}
|
||||
else if (((Creature*)m_target)->GetCurrentEquipmentId())
|
||||
|
||||
if(apply)
|
||||
m_target->SetFlag(field, flag);
|
||||
else
|
||||
m_target->RemoveFlag(field, flag);
|
||||
|
||||
if (m_target->GetTypeId() == TYPEID_UNIT && ((Creature*)m_target)->GetCurrentEquipmentId())
|
||||
m_target->UpdateDamagePhysical(attType);
|
||||
}
|
||||
|
||||
@@ -5418,8 +5420,7 @@ void AuraEffect::HandleModDamageDone(bool apply, bool Real, bool changeAmount)
|
||||
m_target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG+i,m_amount,apply);
|
||||
}
|
||||
}
|
||||
Pet* pet = ((Player*)m_target)->GetPet();
|
||||
if(pet)
|
||||
if(Guardian* pet = ((Player*)m_target)->GetGuardianPet())
|
||||
pet->UpdateAttackPowerAndDamage();
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -9233,7 +9233,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
||||
{
|
||||
AuraEffect *aura = pVictim->GetDummyAura(58597);
|
||||
if (aura && aura->GetCasterGUID() == GetGUID())
|
||||
crit_chance+=aura->GetAmount();
|
||||
crit_chance+=aura->GetAmount();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -11684,8 +11684,8 @@ void Unit::AddToWorld()
|
||||
{
|
||||
WorldObject::AddToWorld();
|
||||
m_Notified = false;
|
||||
//assert(m_NotifyListPos < 0); instance : crash
|
||||
m_NotifyListPos = -1;
|
||||
assert(m_NotifyListPos < 0); //instance : crash
|
||||
//m_NotifyListPos = -1;
|
||||
SetToNotify();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user