Fork me on GitHub
Determining NPC Movement and Position in Client
Post: #1
I am busy working on a headless client for Vanilla wow and have come across an issue regarding NPC movement. My question isn't necessarily specific to CMangos, but I thought I'd ask here anyway since that is the server I am using.

I'm creating a headless client to have bots follow me around using the Classic version and everything is going great so far. My bots follow my target just fine but when it comes to combat they have trouble determining when an NPC stops it's movement. From what I have seen so far when an NPC starts it's movement the server sends a MSG_MONSTER_MOVE packet. I receive that one just fine, however when the NPC (in this case an enemy) reaches it's destination my bot doesn't know it and it keeps on running thinking it's still moving. As soon as the NPC turns I get another MSG_MONSTER_MOVE packet that tells me the position and the angle in which it is now facing. However, if the NPC never turns the bot just keeps on running because it thinks the NPC is still moving and runs off into the sunset.

I'm wondering (hoping)if anyone knows how the client handles this. The WoW client somehow knows when the NPC stops so I'm wondering how I can get my bot client to know that as well. The funny thing is that I see in the MSG_MONSTER_MOVE packet there is a flag that tells when the monster movement stops, however I'm never receiving a packet with that flag. And it doesn't look like it is called in the code either. I'm just receiving movement start and turns in the MSG_MONSTER_MOVE packets. Any help/advice/suggestions would be greatly appreciated. Thanks!
Post: #2
As it turns out not 30 minutes after I asked this question a light bulb went on. It looks like path nodes and the destination node of the NPC movement is being sent with the MSG_MONSTER_MOVE packet. Problem solved!

Possibly Related Threads...
Thread Author Replies Views Last Post
  Wow client freezes my machine while I'm debugging cMangos eeka 0 627 02-26-2017, 06:27 PM
Last Post: eeka
  Help needed to determine correct movement behavior namreeb 0 641 12-02-2016, 07:21 PM
Last Post: namreeb
  purpose of make some movement ack message magiceye 2 1,963 10-16-2015, 01:54 AM
Last Post: magiceye
  check movement position magiceye 0 1,157 09-12-2015, 07:07 AM
Last Post: magiceye
  Movement sync magiceye 1 1,548 08-18-2015, 07:36 PM
Last Post: namreeb
  Core - Client problem grz3s 11 8,497 06-09-2015, 02:22 PM
Last Post: shiendra
  Linked Movement - Npc Speed Differences (BUG) X-Savior 0 1,365 04-06-2015, 03:18 AM
Last Post: X-Savior
  NPC Movement and Scripts Trigger By Game Event X-Savior 1 1,985 01-06-2015, 10:27 AM
Last Post: Schmoozerd
Question Large Player races on mounts unable to pass low entrances: core or client issue? tarwyn 6 6,148 12-27-2014, 04:48 PM
Last Post: Velvet
  Random Creature Movement behavior Efonius 23 18,819 06-23-2014, 08:47 PM
Last Post: Efonius

Forum Jump:

Users browsing this thread: 1 Guest(s)

Continued MaNGOS | Return to Top | | Lite (Archive) Mode | RSS Syndication