Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 04-26-2016, 04:27 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

The thing with class Bot, it is derived from class NPC as well as class Mob (and class Entity..and...) .. so, some of the code may be in the other two classes.


You will probably see many cases like this:
Code:
Mob* mob_ptr = <some rvalue>;

mob_ptr->SomeVirtualFunction();
It's probable that the following are declared:
Code:
virtual void Mob::SomeVirtualFunction();

virtual void NPC::SomeVirtualFunction();

virtual void Bot::SomeVirtualFunction();
If <some rvalue> is instantiated as class Mob, then Mob::SomeVirtualFunction() is called.

If <some rvalue> is instantiated as class NPC, then NPC::SomeVirtualFunction() is called.

If <some rvalue> is instantiated as class Bot, then Bot::SomeVirtualFunction() is called.


Now, take away the class Bot virtual declaration:

If <some rvalue> is instantiated as class Bot, then NPC::SomeVirtualFunction() is called.


If you're using visual studio, it has some really good tools that can help.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:50 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3