mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Various Cleanups (game T-Z)
This commit is contained in:
parent
08fd085549
commit
6379a746d7
34 changed files with 2858 additions and 2852 deletions
|
|
@ -362,7 +362,8 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* pAttacker, Hostile
|
||||||
|
|
||||||
if (pCurrentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
|
if (pCurrentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
|
||||||
(pCurrentRef->getThreat() > 1.1f * pCurrentVictim->getThreat() && pAttacker->CanReachWithMeleeAttack(pTarget)))
|
(pCurrentRef->getThreat() > 1.1f * pCurrentVictim->getThreat() && pAttacker->CanReachWithMeleeAttack(pTarget)))
|
||||||
{ // implement 110% threat rule for targets in melee range
|
{
|
||||||
|
// implement 110% threat rule for targets in melee range
|
||||||
found = true; // and 130% rule for targets in ranged distances
|
found = true; // and 130% rule for targets in ranged distances
|
||||||
break; // for selecting alive targets
|
break; // for selecting alive targets
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,8 @@ void MapManager::LoadTransports()
|
||||||
|
|
||||||
//t->GetMap()->Add<GameObject>((GameObject *)t);
|
//t->GetMap()->Add<GameObject>((GameObject *)t);
|
||||||
++count;
|
++count;
|
||||||
} while(result->NextRow());
|
}
|
||||||
|
while (result->NextRow());
|
||||||
delete result;
|
delete result;
|
||||||
|
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
|
|
|
||||||
|
|
@ -10975,7 +10975,8 @@ void Unit::SetVehicleId(uint32 entry)
|
||||||
|
|
||||||
void Unit::UpdateSplineMovement(uint32 t_diff)
|
void Unit::UpdateSplineMovement(uint32 t_diff)
|
||||||
{
|
{
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
POSITION_UPDATE_DELAY = 400,
|
POSITION_UPDATE_DELAY = 400,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -756,7 +756,8 @@ inline ByteBuffer& operator>> (ByteBuffer& buf, MovementInfo& mi)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Movement{
|
namespace Movement
|
||||||
|
{
|
||||||
class MoveSpline;
|
class MoveSpline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -827,7 +828,8 @@ struct CalcDamageInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
// Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode
|
// Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode
|
||||||
struct SpellNonMeleeDamage{
|
struct SpellNonMeleeDamage
|
||||||
|
{
|
||||||
SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, SpellSchoolMask _schoolMask)
|
SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, SpellSchoolMask _schoolMask)
|
||||||
: target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), schoolMask(_schoolMask),
|
: target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), schoolMask(_schoolMask),
|
||||||
absorb(0), resist(0), physicalLog(false), unused(false), blocked(0), HitInfo(0)
|
absorb(0), resist(0), physicalLog(false), unused(false), blocked(0), HitInfo(0)
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,8 @@ bool FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
|
||||||
break;
|
break;
|
||||||
i_currentNode += (uint32)departureEvent;
|
i_currentNode += (uint32)departureEvent;
|
||||||
departureEvent = !departureEvent;
|
departureEvent = !departureEvent;
|
||||||
} while(true);
|
}
|
||||||
|
while (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return i_currentNode < (i_path->size()-1);
|
return i_currentNode < (i_path->size()-1);
|
||||||
|
|
|
||||||
|
|
@ -363,8 +363,7 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||||
if (owner->GetTypeId()==TYPEID_PLAYER)
|
if (owner->GetTypeId()==TYPEID_PLAYER)
|
||||||
aset.insert((Player*)owner);
|
aset.insert((Player*)owner);
|
||||||
}
|
}
|
||||||
else
|
else if ((*itr)->GetTypeId()==TYPEID_PLAYER)
|
||||||
if((*itr)->GetTypeId()==TYPEID_PLAYER)
|
|
||||||
aset.insert((Player*)(*itr));
|
aset.insert((Player*)(*itr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -661,7 +660,8 @@ void WorldSession::LoadAccountData(QueryResult* result, uint32 mask)
|
||||||
m_accountData[type].Time = time_t(fields[1].GetUInt64());
|
m_accountData[type].Time = time_t(fields[1].GetUInt64());
|
||||||
m_accountData[type].Data = fields[2].GetCppString();
|
m_accountData[type].Data = fields[2].GetCppString();
|
||||||
|
|
||||||
} while (result->NextRow());
|
}
|
||||||
|
while (result->NextRow());
|
||||||
|
|
||||||
delete result;
|
delete result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue