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:
郑佩茹
2022-07-13 10:31:30 -06:00
123 changed files with 6889 additions and 1214 deletions

View File

@@ -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;
}