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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 07-18-2011, 01:32 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Make GetBotID const.

Code:
uint32 GetBotID() const { return _botID; }
You can always call a const function, but you can't call a non-const function from a const function.

Actually, looking at the code all of these should be const. If you fix them in the header you'll have to fix the two non-inline functions in the cpp file as well.

Code:
	// "GET" Class Methods
	uint32 GetBotID() const { return _botID; }
	uint32 GetBotOwnerCharacterID() const { return _botOwnerCharacterID; }
	uint32 GetBotSpellID() const { return npc_spells_id; }
	Mob* GetBotOwner() const { return this->_botOwner; }
	uint32 GetBotArcheryRange() const;
	ItemInst* GetBotItem(uint32 slotID) const;
	virtual bool GetSpawnStatus() const { return _spawnStatus; }
	int8 GetPetChooserID() const { return _petChooserID; }
	bool IsPetChooser() const { return _petChooser; }
	bool IsBotArcher() const { return _botArcher; }
	bool IsBotCharmer() const { return _botCharmer; }
	virtual bool IsBot() const { return true; }
	bool GetRangerAutoWeaponSelect() const { return _rangerAutoWeaponSelect; }
	BotRoleType GetBotRole() const { return _botRole; }
	bool IsBotCaster() const { return (GetClass() == CLERIC || GetClass() == DRUID || GetClass() == SHAMAN || GetClass() == NECROMANCER || GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == ENCHANTER); }
	bool IsBotINTCaster() const { return (GetClass() == NECROMANCER || GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == ENCHANTER); }
	bool IsBotWISCaster() const { return (GetClass() == CLERIC || GetClass() == DRUID || GetClass() == SHAMAN); }
	inline virtual sint16	GetAC()	const { return AC; }
Reply With Quote
 

Thread Tools
Display Modes

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 06:34 PM.


 

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