--HG--
branch : trunk
This commit is contained in:
tartalo
2009-11-01 00:07:18 +01:00
8 changed files with 106 additions and 105 deletions
+2 -1
View File
@@ -528,9 +528,10 @@ void AuctionHouseObject::Update()
} while (result->NextRow());
delete result;
vector<uint32>::iterator iter = expiredAuctions.begin();
while (!expiredAuctions.empty())
{
vector<uint32>::iterator iter = expiredAuctions.begin();
// from auctionhousehandler.cpp, creates auction pointer & player pointer
AuctionEntry* auction = GetAuction(*iter);
+4 -4
View File
@@ -293,15 +293,15 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
//function for setting up visibility distance for maps on per-type/per-Id basis
virtual void InitVisibilityDistance();
void PlayerRelocation(Player *, float x, float y, float z, float angl);
void CreatureRelocation(Creature *creature, float x, float y, float, float);
void PlayerRelocation(Player *, float x, float y, float z, float orientation);
void CreatureRelocation(Creature *creature, float x, float y, float z, float ang);
template<class LOCK_TYPE, class T, class CONTAINER> void Visit(const CellLock<LOCK_TYPE> &cell, TypeContainerVisitor<T, CONTAINER> &visitor);
bool IsRemovalGrid(float x, float y) const
{
GridPair p = Trinity::ComputeGridPair(x, y);
return( !getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL );
return !getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL;
}
bool GetUnloadLock(const GridPair &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
@@ -312,7 +312,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
void ResetGridExpiry(NGridType &grid, float factor = 1) const
{
grid.ResetTimeTracker((time_t)((float)i_gridExpiry*factor));
grid.ResetTimeTracker(time_t(float(i_gridExpiry)*factor));
}
time_t GetGridExpiry(void) const { return i_gridExpiry; }
+1 -1
View File
@@ -1372,9 +1372,9 @@ void Player::Update( uint32 p_time )
}
// not auto-free ghost from body in instances
#pragma omp critical(UpdateThreadSafety)
if(m_deathTimer > 0 && !GetBaseMap()->Instanceable())
{
#pragma omp critical(UpdateThreadSafety)
if(p_time >= m_deathTimer)
{
m_deathTimer = 0;
+2 -4
View File
@@ -945,8 +945,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
void Spell::AddUnitTarget(uint64 unitGUID, uint32 effIndex)
{
Unit* unit = m_caster->GetGUID() == unitGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, unitGUID);
if (unit)
if (Unit* unit = m_caster->GetGUID() == unitGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, unitGUID))
AddUnitTarget(unit, effIndex);
}
@@ -2279,8 +2278,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
case 46584: // Raise Dead
{
m_targets.m_targetMask &= ~TARGET_FLAG_DEST_LOCATION;
WorldObject* result = FindCorpseUsing<MaNGOS::RaiseDeadObjectCheck> ();
if(result)
if (WorldObject* result = FindCorpseUsing<MaNGOS::RaiseDeadObjectCheck> ())
{
switch(result->GetTypeId())
{
+2
View File
@@ -1715,6 +1715,8 @@ void Spell::EffectDummy(uint32 i)
if (m_spellInfo->SpellFamilyFlags[1] & 0x20000 && i == 1)
{
int32 dmg = m_damage * damage / 100;
if (!unitTarget)
unitTarget = m_caster;
m_caster->CastCustomSpell(unitTarget, 54171, &dmg, 0, 0, true);
return;
}