Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Bugs

Archive::Bugs Archive area for Bugs's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 03-20-2002, 06:16 AM
ScotchTape
Fire Beetle
 
Join Date: Mar 2002
Posts: 12
Default

Dunno if anyone has done it yet, but this is some simple code that sets up a "IsHateful" property. If you're hateful, then you'll agro. If not, you won't (and it'll return false out of AddHateToNpcs,etc.)

Code:
npc.cpp:80
	//turn off hate by default
	//todo: lookup value from table later

	IsHateful(false);
Code:
npc.h
class NPC : public Mob
{
public:

....

	//********************************************************//
	//Can this npc agro?
	//on_or_off: true, yes the npc uses hate
	//			 false, no the npc does not use hate
	//********************************************************//
	bool	IsHateful() { return _IsHateful;}			
	void	IsHateful(bool on_or_off){_IsHateful=on_or_off;}

private:

	bool _IsHateful;	//Can this NPC agro?
};
Lastly..
Code:
NpcAI.cpp:19
	if (!sender->IsHateful())
		return false;
hth,
-ST
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 05:11 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