User Tag List

Results 1 to 2 of 2

Thread: Some method questions

  1. #1
    Respected Member
    Join Date
    Sep 2013
    Thanked 0 Times in 0 Posts

    Some method questions

    I'd like to know the following things:

    - How do you make a creature react completely passively? Making him stunned/pacified only removes melee, but not the combat animation. SetAllowedCombat seemed to work but a lot of times the boss cant get in combat anymore after that (even when setting it to true when leaving combat) probably because he's not in combat anymore after setting it to false so not sure how to set it to true then.

    -The SetStandState() method, where can I find the ID's for the standing states?

    - Is there any method to prevent spellcast interrupting (like a channeled spell) from another event? The way I did it before was once the channel started it cancelled the other spell event and made a replica of the other event that would get activated after the duration of the channel.

    - Lastly a problem I've faced for a while that might be on my end in this case, though I never got a proper answer.. The vehicle methods. I tried some things but fucking around with this doesn't really get me anywhere. I simply want to know the exact method for adding passengers to a vehicle creature, if it doesn't work with my particular creatures then that's the end of that. I tried some things with GetVehicleKit(), a local variable to be able to refer to the passenger with GetNearestCreature() and AddPassenger() but getting errors.

    Any help appreciated!

  2. #2
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Thanked 1,843 Times in 1,115 Posts
    1. The method "SetAllowCombat" is pretty self-explanatory. If it is false then you're obviously making it so the npc cannot go into combat since that's what it does. Making the NPC passive isn't hard at all, take the target dummy into account here. You can attack it, but it cannot attack back. I would say edit its flags but it seems you've had trouble with that. When it is stunned/pacified the combat animation should be suppressed seeing it isn't ready to attack yet. The only thing I see here is changing its react state to passive, like pets for example.


    enum ReactStates
        REACT_PASSIVE    = 0,
        REACT_DEFENSIVE  = 1,
    However, I don't think we even have React states in Eluna at the moment. I think what's holding us back is that cMangos classic has their ReactState in Unit CharmInfo and TC's is in Creature (not in CharmInfo), leaving us to add completely different methods just for them being so different. We could always add it to one emulator but not the other, however, that isn't the ideal thing to do. Creature inherits unit allowing it to access 'CharmInfo()->REACT_FUNCTIONS', but again, either way, it would be a bust.

    2. You can search the source or if you have VS up, search for "SetStandState" -> Right Click -> Go To Definition and you should see the enumerator type "UnitStandStateType" -> Right Click -> Go To Definition. OR you can read this: It is in "Unit.h" under "enum UnitStandStateType". When Eluna is documented more, you will be able to go to Eluna's wiki to view all of this: ""

    3. I'm pretty sure there is, but I not sure of this. Perhaps someone can help you with this.

    4. Ever since I added vehicles to Eluna they have always been a pain and buggy. However, that was awhile ago and they should work. I can't give any examples at the moment.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts