Hunter Autoshoot Question

Greetings. Programmer for years, but a long time since I have worked with C++. I would like to allow hunters to auto-shoot while on the run. I looked through the source files and database, but I have not found anything promising regarding autoshoot and movement. I am just looking for a little direction from the more experienced developers and have no expectation of anyone else taking up the gauntlet.

Thanks,

If you do some research, you probably find that there is a spell flag allowing movement.

Unit.h:

enum SpellInterruptFlags
{
SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, // why need this for instant?
SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, // push back
SPELL_INTERRUPT_FLAG_UNK3 = 0x04, // any info?
SPELL_INTERRUPT_FLAG_INTERRUPT = 0x08, // interrupt
SPELL_INTERRUPT_FLAG_ABORT_ON_DMG = 0x10 // complete interrupt on direct damage
//SPELL_INTERRUPT_UNK = 0x20 // unk, 564 of 727 spells having this spell start with “Glyph”
};

Apparently auto shot (spell entry 75)

has interrupt flags set to 1+32 (33)

32 is not in the enum (unk) but 1 is, and its SPELL_INTERRUPT_FLAG_MOVEMENT

Removing that probably solves your issue.

You can do it with spellmgr.cpp for example. (see bottom of the file)

Or possibly in the DB table for spell DBC.

The value you should modify is InterruptFlags of SpellEntry. See DBCStructure.h

Thank you for the reply Rochet2. I’ll get back to my research and if I can get this to work I’ll post it back.

Thank you again,