Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there) Closes issue 5084. --HG-- branch : trunk
This commit is contained in:
@@ -15289,7 +15289,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
// Call creature just died function
|
||||
if (creature->IsAIEnabled)
|
||||
creature->AI()->JustDied(this);
|
||||
|
||||
|
||||
if (creature->ToTempSummon())
|
||||
{
|
||||
if (Unit* pSummoner = creature->ToTempSummon()->GetSummoner())
|
||||
|
||||
@@ -1212,7 +1212,7 @@ class Unit : public WorldObject
|
||||
inline bool HealthBelowPctDamaged(int32 pct, uint32 damage) const { return (int32(GetHealth()) - damage) * (int64)100 < GetMaxHealth() * (int64)pct; }
|
||||
inline bool HealthAbovePct(int32 pct) const { return GetHealth() * (uint64)100 > GetMaxHealth() * (uint64)pct; }
|
||||
inline float GetHealthPct() const { return GetMaxHealth() ? 100.f * GetHealth() / GetMaxHealth() : 0.0f; }
|
||||
inline uint32 CountPctFromMaxHealth(int32 pct) const { return CalculatePctN(GetMaxHealth(), pct); }
|
||||
inline uint32 CountPctFromMaxHealth(int32 pct) const { return CalculatePctN(GetMaxHealth(), pct); }
|
||||
|
||||
void SetHealth(uint32 val);
|
||||
void SetMaxHealth(uint32 val);
|
||||
|
||||
Reference in New Issue
Block a user