Page 1 of 1

Mob Action

Posted: Sat Mar 16, 2013 7:13 am
by daiiawn
Hopefully this is the right place for it, if not apologies! Please move to the correct place and I'll do better next time!

Where would I find where mobAction is being set (for example where mobAction == ACTION_DEATH and mobAction == ACTION_NONE would be set after a mob has been killed).

The reason I ask is that I'm amending the Zilart Kings to have 30 minute mini windows, but I have noticed that at the moment the onMobDeath and onMobDespawn events are both raised before the mob has finished despawning, so if you try and pop the same mob again (eg you just killed faf and you want to respawn it in 21 hours), the respawn call in the LUA wont work because the system sees the mob as already being spawned (action != 0 or 24).

Ive had a look through the code and headers etc, I can see where the LUA scripts are being called, but not where that call is being called from or when the actions are set.

Re: Mob Action

Posted: Sat Mar 16, 2013 8:37 pm
by whasf
you should be able to trace back in VS with finding references

Re: Mob Action

Posted: Sun Mar 17, 2013 12:59 am
by daiiawn
Cheers! Stupid as it may seem i'd never noticed the search entire project option!
(Unfortunatly most the coding I do, has to be done in something a lot more basic than VS, so I'm not used to having all the perks again!)

Re: Mob Action

Posted: Sun Mar 17, 2013 1:56 am
by kjLotus
daiiawn wrote:Cheers! Stupid as it may seem i'd never noticed the search entire project option!
(Unfortunatly most the coding I do, has to be done in something a lot more basic than VS, so I'm not used to having all the perks again!)
then i guess you'll be amazed when i tell you clicking on something and presing F12 takes you to where it's defined ^^ (right click -> go to definition)

Re: Mob Action

Posted: Sun Mar 17, 2013 3:56 am
by daiiawn
I am indeed amazed lol, I've used VS before but never for long periods of time/big projects. Going back to work on monday and having to use a glorified notepad to code and a very basic debugger is going to hurt!

Anyway, thanks for the nudge in the right direction, I've got it so that the despawn LUA event now triggers once the mob has fully despawned. Going to make some other changes to scripts and things and will then make a patch