Merge remote branch 'origin/master' into 330

This commit is contained in:
tomrus88 2010-03-30 13:06:34 +04:00
commit 4c8dd37612
46 changed files with 189 additions and 156 deletions

View file

@ -269,9 +269,9 @@ Unit::~Unit()
delete m_charmInfo;
// those should be already removed at "RemoveFromWorld()" call
assert(m_gameObj.size() == 0);
assert(m_dynObjGUIDs.size() == 0);
assert(m_deletedAuras.size() == 0);
ASSERT(m_gameObj.size() == 0);
ASSERT(m_dynObjGUIDs.size() == 0);
ASSERT(m_deletedAuras.size() == 0);
}
void Unit::Update( uint32 p_time )
@ -466,7 +466,7 @@ void Unit::resetAttackTimer(WeaponAttackType type)
bool Unit::canReachWithAttack(Unit *pVictim) const
{
assert(pVictim);
ASSERT(pVictim);
float reach = GetFloatValue(UNIT_FIELD_COMBATREACH);
if( reach <= 0.0f )
reach = 1.0f;
@ -860,10 +860,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
// last damage from non duel opponent or opponent controlled creature
if(duel_hasEnded)
{
assert(pVictim->GetTypeId()==TYPEID_PLAYER);
ASSERT(pVictim->GetTypeId()==TYPEID_PLAYER);
Player *he = (Player*)pVictim;
assert(he->duel);
ASSERT(he->duel);
he->duel->opponent->CombatStopWithPets(true);
he->CombatStopWithPets(true);
@ -1037,10 +1037,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
// last damage from duel opponent
if(duel_hasEnded)
{
assert(pVictim->GetTypeId()==TYPEID_PLAYER);
ASSERT(pVictim->GetTypeId()==TYPEID_PLAYER);
Player *he = (Player*)pVictim;
assert(he->duel);
ASSERT(he->duel);
he->SetHealth(1);
@ -3346,7 +3346,7 @@ void Unit::_UpdateAutoRepeatSpell()
void Unit::SetCurrentCastedSpell( Spell * pSpell )
{
assert(pSpell); // NULL may be never passed here, use InterruptSpell or InterruptNonMeleeSpells
ASSERT(pSpell); // NULL may be never passed here, use InterruptSpell or InterruptNonMeleeSpells
CurrentSpellTypes CSpellType = pSpell->GetCurrentContainer();
@ -3417,7 +3417,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool sendAutoRepeatCancelToClient)
{
assert(spellType < CURRENT_MAX_SPELL);
ASSERT(spellType < CURRENT_MAX_SPELL);
if (m_currentSpells[spellType] && (withDelayed || m_currentSpells[spellType]->getState() != SPELL_STATE_DELAYED) )
{
@ -4668,7 +4668,7 @@ GameObject* Unit::GetGameObject(uint32 spellId) const
void Unit::AddGameObject(GameObject* gameObj)
{
assert(gameObj && gameObj->GetOwnerGUID()==0);
ASSERT(gameObj && gameObj->GetOwnerGUID()==0);
m_gameObj.push_back(gameObj);
gameObj->SetOwnerGUID(GetGUID());
@ -4684,7 +4684,7 @@ void Unit::AddGameObject(GameObject* gameObj)
void Unit::RemoveGameObject(GameObject* gameObj, bool del)
{
assert(gameObj && gameObj->GetOwnerGUID()==GetGUID());
ASSERT(gameObj && gameObj->GetOwnerGUID()==GetGUID());
gameObj->SetOwnerGUID(0);
@ -11091,7 +11091,7 @@ void Unit::DeleteThreatList()
void Unit::TauntApply(Unit* taunter)
{
assert(GetTypeId()== TYPEID_UNIT);
ASSERT(GetTypeId()== TYPEID_UNIT);
if(!taunter || (taunter->GetTypeId() == TYPEID_PLAYER && ((Player*)taunter)->isGameMaster()))
return;
@ -11114,7 +11114,7 @@ void Unit::TauntApply(Unit* taunter)
void Unit::TauntFadeOut(Unit *taunter)
{
assert(GetTypeId()== TYPEID_UNIT);
ASSERT(GetTypeId()== TYPEID_UNIT);
if(!taunter || (taunter->GetTypeId() == TYPEID_PLAYER && ((Player*)taunter)->isGameMaster()))
return;
@ -11152,7 +11152,7 @@ bool Unit::SelectHostileTarget()
//next-victim-selection algorithm and evade mode are called
//threat list sorting etc.
assert(GetTypeId()== TYPEID_UNIT);
ASSERT(GetTypeId()== TYPEID_UNIT);
if (!this->isAlive())
return false;