mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[11445] Correct a possible crash, if caster of aura has disconnected after aura applied
A small code adjustment in addition, no need for caster at aura remove. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
b62c7f17f0
commit
6d28c7dfd0
3 changed files with 8 additions and 6 deletions
|
|
@ -8040,11 +8040,11 @@ void Aura::HandleAuraMirrorImage(bool apply, bool Real)
|
|||
// Target of aura should always be creature (ref Spell::CheckCast)
|
||||
Creature* pCreature = (Creature*)GetTarget();
|
||||
|
||||
// Caster can be player or creature, the unit who pCreature will become an clone of.
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
if (apply)
|
||||
{
|
||||
// Caster can be player or creature, the unit who pCreature will become an clone of.
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
pCreature->SetByteValue(UNIT_FIELD_BYTES_0, 0, caster->getRace());
|
||||
pCreature->SetByteValue(UNIT_FIELD_BYTES_0, 1, caster->getClass());
|
||||
pCreature->SetByteValue(UNIT_FIELD_BYTES_0, 2, caster->getGender());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue