Jump to content
  • Cannon Mob don't stay in place


    Necrovoice
    • Status: Completed
      Main Category: Unset
      Sub-Category: NPC
      Version: 21.11 Milestone: 21 Priority: New
      Implemented Version: 22.1
      Assigned: Necrovoice

    -----------------------------

    I encountered some "cannon" mobs, like Legion Fel Cannon : http://www.wowhead.com/npc=21233
    When the mob start attacking you, it moves to fight in close combat.

    I tried to "set unit_flags = 4" bug this don't seems to work.
    flag 4 is documented as UNIT_FLAG_DISABLE_MOVE

    -----------------------------

    Legion Fel Cannon (ID:21233)

    Fel Cannon MKI (ID:22461)

    Attempted to change UniteFlags = 4, but this had no effect on holding them into place.

    They have the proper spell assigned (ID: 36238) but they do not cast this spell.

     


    User Feedback

    Recommended Comments

    UNIT_FLAG_DISABLE_MOVE is a confusing flag; despite its name, it only applies to players and simply means "the player is no longer in the control of its movement".

    For the chasing cannons issue, the only viable method I see is to use EventAI with ACTION_T_COMBAT_MOVEMENT on EVENT_T_SPAWNED

    For the casting spell issue, one is tempted to think that creature_template_spells table from the database is enough to make a creature cast spells. The truth is that table has nothing to do with creatures' spells, it simply describes what spells are available in your action bar if you CONTROL that creature (mind control, for example). Please remember, in MaNGOS and all it's descendants, no creature will cast spells unless instructed to do so via scripting! All creatures, by default, can only do melee attacks (and have combat movement enabled). So, for the cannons to cast spell 36238, it is mandatory to script them (EventAI is the most simple approach).

    • Like 1
    Link to comment
    Share on other sites

    INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES
    ('2123300','21233','11','0','100','1','0','0','0','0','21','0','0','0','0','0','0','0','0','0','0','0','Prevent Movement'),
    ('2123301','21233','9','0','100','1','0','50','50','200','11','36238','1','0','0','0','0','0','0','0','0','0','Cast Fel Cannon Blast'),
    ('2246100','22461','11','0','100','1','0','0','0','0','21','0','0','0','0','0','0','0','0','0','0','0','Prevent Movement'),
    ('2246101','22461','9','0','100','1','0','50','50','200','11','36238','1','0','0','0','0','0','0','0','0','0','Cast Fel Cannon Blast');

    Seems to work very well.  What do you think? @H0zen

    • Like 2
    Link to comment
    Share on other sites



    Guest
    This is now closed for further comments

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use