Merge commit 'origin/master' into 310

Conflicts:
	src/game/TargetedMovementGenerator.cpp
	win/VC71/shared.vcproj
This commit is contained in:
tomrus88 2009-05-21 20:17:19 +04:00
commit 52effd119c
39 changed files with 523 additions and 7161 deletions

View file

@ -4142,7 +4142,7 @@ DynamicObject * Unit::GetDynObject(uint32 spellId)
GameObject* Unit::GetGameObject(uint32 spellId) const
{
for (GameObjectList::const_iterator i = m_gameObj.begin(); i != m_gameObj.end();)
for (GameObjectList::const_iterator i = m_gameObj.begin(); i != m_gameObj.end(); ++i)
if ((*i)->GetSpellId() == spellId)
return *i;
@ -5214,19 +5214,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if( procSpell->SpellFamilyFlags & 0x0000000000000004LL )
{
triggered_spell_id = 40445;
chance = 25.f;
chance = 25.0f;
}
// Rejuvenation
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL )
{
triggered_spell_id = 40446;
chance = 25.f;
chance = 25.0f;
}
// Mangle (cat/bear)
else if( procSpell->SpellFamilyFlags & 0x0000044000000000LL )
{
triggered_spell_id = 40452;
chance = 40.f;
chance = 40.0f;
}
else
return false;
@ -5552,13 +5552,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if( procSpell->SpellFamilyFlags & 0x00000000C0000000LL)
{
triggered_spell_id = 40471;
chance = 15.f;
chance = 15.0f;
}
// Judgement
else if( procSpell->SpellFamilyFlags & 0x0000000000800000LL )
{
triggered_spell_id = 40472;
chance = 50.f;
chance = 50.0f;
}
else
return false;
@ -5718,17 +5718,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL)
{
triggered_spell_id = 40465; // Lightning Bolt
chance = 15.f;
chance = 15.0f;
}
else if (procSpell->SpellFamilyFlags & 0x0000000000000080LL)
{
triggered_spell_id = 40465; // Lesser Healing Wave
chance = 10.f;
chance = 10.0f;
}
else if (procSpell->SpellFamilyFlags & 0x0000001000000000LL)
{
triggered_spell_id = 40466; // Stormstrike
chance = 50.f;
chance = 50.0f;
}
else
return false;
@ -7252,7 +7252,10 @@ bool Unit::AttackStop(bool targetSwitch /*=false*/)
// reset only at real combat stop
if(!targetSwitch && GetTypeId()==TYPEID_UNIT )
{
((Creature*)this)->SetNoCallAssistance(false);
((Creature*)this)->SetNoSearchAssistance(false);
}
SendAttackStop(victim);
@ -8866,10 +8869,6 @@ bool Unit::isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList,
if(m_Visibility==VISIBILITY_RESPAWN)
return false;
// always seen by owner
if(GetCharmerOrOwnerGUID()==u->GetGUID())
return true;
// Grid dead/alive checks
if( u->GetTypeId()==TYPEID_PLAYER)
{
@ -8888,6 +8887,10 @@ bool Unit::isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList,
return false;
}
// always seen by owner
if(GetCharmerOrOwnerGUID()==u->GetGUID())
return true;
// different visible distance checks
if(u->isInFlight()) // what see player in flight
{
@ -10872,7 +10875,7 @@ void Unit::StopMoving()
SendMessageToSet(&data,false);
}
void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID)
void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID, uint32 time)
{
if( apply )
{
@ -10886,7 +10889,7 @@ void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID)
Unit* caster = ObjectAccessor::GetUnit(*this,casterGUID);
GetMotionMaster()->MoveFleeing(caster); // caster==NULL processed in MoveFleeing
GetMotionMaster()->MoveFleeing(caster, time); // caster==NULL processed in MoveFleeing
}
else
{
@ -11198,7 +11201,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
if (OriginalCastTime > 7000) OriginalCastTime = 7000;
if (OriginalCastTime < 1500) OriginalCastTime = 1500;
// Portion to Over Time
float PtOT = (overTime / 15000.f) / ((overTime / 15000.f) + (OriginalCastTime / 3500.f));
float PtOT = (overTime / 15000.0f) / ((overTime / 15000.0f) + (OriginalCastTime / 3500.0f));
if ( damagetype == DOT )
CastingTime = uint32(CastingTime * PtOT);