mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 11:48:37 +00:00
[Cleanup] Convert Event Parses to Single Line (#4569)
* [Cleanup] Convert Event Parses to Single Line * Push * Update spells.cpp * Update spells.cpp --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+20
-38
@@ -256,22 +256,15 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
|
||||
Mob* spell_target = entity_list.GetMobID(target_id);
|
||||
std::vector<std::any> args = { spell_target };
|
||||
int return_value = parse->EventMob(
|
||||
EVENT_CAST_BEGIN,
|
||||
this,
|
||||
nullptr,
|
||||
[&]() {
|
||||
return fmt::format(
|
||||
"{} {} {} {}",
|
||||
spell_id,
|
||||
GetID(),
|
||||
GetCasterLevel(spell_id),
|
||||
target_id
|
||||
);
|
||||
},
|
||||
0,
|
||||
&args
|
||||
);
|
||||
int return_value = parse->EventMob(EVENT_CAST_BEGIN, this, nullptr, [&]() {
|
||||
return fmt::format(
|
||||
"{} {} {} {}",
|
||||
spell_id,
|
||||
GetID(),
|
||||
GetCasterLevel(spell_id),
|
||||
target_id
|
||||
);
|
||||
}, 0, &args);
|
||||
|
||||
if (IsClient() && return_value != 0) {
|
||||
if (IsDiscipline(spell_id)) {
|
||||
@@ -1804,22 +1797,15 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
|
||||
std::vector<std::any> args = { spell_target };
|
||||
|
||||
parse->EventMob(
|
||||
EVENT_CAST,
|
||||
this,
|
||||
nullptr,
|
||||
[&]() {
|
||||
return fmt::format(
|
||||
"{} {} {} {}",
|
||||
spell_id,
|
||||
GetID(),
|
||||
GetCasterLevel(spell_id),
|
||||
target_id
|
||||
);
|
||||
},
|
||||
0,
|
||||
&args
|
||||
);
|
||||
parse->EventMob(EVENT_CAST, this, nullptr, [&]() {
|
||||
return fmt::format(
|
||||
"{} {} {} {}",
|
||||
spell_id,
|
||||
GetID(),
|
||||
GetCasterLevel(spell_id),
|
||||
target_id
|
||||
);
|
||||
}, 0, &args);
|
||||
|
||||
if(bard_song_mode)
|
||||
{
|
||||
@@ -3965,10 +3951,7 @@ bool Mob::SpellOnTarget(
|
||||
|
||||
std::vector<std::any> args = { spelltar };
|
||||
|
||||
parse->EventMob(
|
||||
EVENT_CAST_ON,
|
||||
spelltar,
|
||||
this,
|
||||
parse->EventMob(EVENT_CAST_ON, spelltar, this,
|
||||
[&]() {
|
||||
return fmt::format(
|
||||
"{} {} {} {}",
|
||||
@@ -3978,8 +3961,7 @@ bool Mob::SpellOnTarget(
|
||||
target_id
|
||||
);
|
||||
},
|
||||
0,
|
||||
&args
|
||||
0, &args
|
||||
);
|
||||
|
||||
if (!DoCastingChecksOnTarget(false, spell_id, spelltar)) {
|
||||
|
||||
Reference in New Issue
Block a user