mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 03:31:08 +00:00
Changed EVENT_TRADE to pass iteminst instead of variable ids, perl will not have changed at all but lua now passes the iteminsts in the trade object. Also redid a bunch of the spell quest stuff
This commit is contained in:
+18
-7
@@ -297,6 +297,16 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
||||
}
|
||||
}
|
||||
|
||||
if(IsClient()) {
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", spell_id);
|
||||
parse->EventPlayer(EVENT_CAST_BEGIN, CastToClient(), temp, 0);
|
||||
} else if(IsNPC()) {
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", spell_id);
|
||||
parse->EventNPC(EVENT_CAST_BEGIN, CastToNPC(), nullptr, temp, 0);
|
||||
}
|
||||
|
||||
if(resist_adjust)
|
||||
{
|
||||
return(DoCastSpell(spell_id, target_id, slot, cast_time, mana_cost, oSpellWillFinish, item_slot, timer, timer_duration, type, *resist_adjust));
|
||||
@@ -1197,13 +1207,14 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, uint16 slot,
|
||||
// at this point the spell has successfully been cast
|
||||
//
|
||||
|
||||
// if the spell is cast by a client, trigger the EVENT_CAST player quest
|
||||
if(this->IsClient()) {
|
||||
if(parse->PlayerHasQuestSub("EVENT_CAST") ) {
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", spell_id);
|
||||
parse->EventPlayer(EVENT_CAST, CastToClient(), temp, 0);
|
||||
}
|
||||
if(IsClient()) {
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", spell_id);
|
||||
parse->EventPlayer(EVENT_CAST, CastToClient(), temp, 0);
|
||||
} else if(IsNPC()) {
|
||||
char temp[64];
|
||||
sprintf(temp, "%d", spell_id);
|
||||
parse->EventNPC(EVENT_CAST, CastToNPC(), nullptr, temp, 0);
|
||||
}
|
||||
|
||||
if(bard_song_mode)
|
||||
|
||||
Reference in New Issue
Block a user