New EVENT_CASTED_ON event
I have implemented this event to be able to create quests like "go heal this NPC", "go buff this NPC", potentially it could be used to implement a special spell or proc harming an NPC (if the spell is cast on this specific NPC, then some harm is done). This event is received by an NPC each time a spell is cast on him, and it is passed the identity of the caster (usually a PC) and the ID of the casted spell in variable "$spell_id".
Note that it is triggered before any resist or invulnerability is checked. The spell hits the NPC, that is it. BE CAREFUL : it means an event is fired each tme a spell is cast on an NPC. I have no idea how much CPU overload this can cause. If this proves useless for "Live".like servers and a performance-hog may be this post should be moved to the "Custom" section. Here is how it is implemented (as an SVN diff from version 1102) : Code:
Index: hero-emulator/zone/event_codes.h Code:
Index: hero-emulator/zone/embparser.cpp Code:
Index: hero-emulator/zone/spells.cpp Code:
# a_defective_cleaner |
I don't want this to sound trite or anything, but if it's going into the source the past tense of "cast" is just "cast"
|
Very true.As you can see English is not my native language. Thank you for pointing it out.
|
We all know Bulle's native language is C or some other code lol.
Sounds interesting. I am all about having more options! Making unique events is one of the goals I work towards on my server. Nothing spectacular yet, but I am always trying to think up new stuff. |
I actually had this and the other thing you posted in when I first did player quests but took them out. The merit one makes a lot more sense on npcs heh, anyway I'll be putting this in soon enough.
|
This is great news KLS, thanks. I have been using these two events since I have written them and have had no problem yet. I leave it up to you whether to rename the CASTED by CAST or not, I am a bit puzzled about my English there :-? : you can find reference to both words in many places on the web or in EQEmu.
|
All times are GMT -4. The time now is 09:24 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.