mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
Merge branch 'master' into Playerbot
# Conflicts: # src/server/apps/worldserver/worldserver.conf.dist # src/server/game/Battlegrounds/Battleground.h # src/server/game/Entities/Player/Player.cpp # src/server/game/World/World.cpp
This commit is contained in:
@@ -159,6 +159,8 @@ void GameObject::AddToWorld()
|
||||
|
||||
WorldObject::AddToWorld();
|
||||
|
||||
loot.sourceWorldObjectGUID = GetGUID();
|
||||
|
||||
sScriptMgr->OnGameObjectAddWorld(this);
|
||||
}
|
||||
}
|
||||
@@ -2054,20 +2056,19 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
|
||||
if (!spellInfo)
|
||||
return;
|
||||
|
||||
bool self = false;
|
||||
bool self = true;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (spellInfo->Effects[i].TargetA.GetTarget() == TARGET_UNIT_CASTER)
|
||||
if (spellInfo->Effects[i].TargetA.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER || spellInfo->Effects[i].TargetB.GetTarget())
|
||||
{
|
||||
self = true;
|
||||
self = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (self)
|
||||
if (self && target && target->GetGUID() != GetGUID())
|
||||
{
|
||||
if (target)
|
||||
target->CastSpell(target, spellInfo, true);
|
||||
target->CastSpell(target, spellInfo, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user