Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2009, 05:32 PM
leslamarch
Discordant
 
Join Date: Sep 2006
Location: Green Bay, WI
Posts: 436
Default

I really like the idea of this, I found a problem with it and really didnt look to much further. With this code added in pet classes will no longer be able to raise a pet, The spell goes off just as it should but the pet just never appears, and the regent is also consumed. I Ran out of time to do any further testing on this, sorry :(

*edit* this patch maybe fine for the stock source, I do have some custom code. The only thing i tested was pets work with the patch commented out, but with this active again pets no longer work.
Reply With Quote
  #2  
Old 07-06-2009, 05:40 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

That's... odd... do pets somehow make use of the lastName field?
Reply With Quote
  #3  
Old 07-06-2009, 06:14 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

technicly pets should not be using the "hosile" tag. Even if its an npc's pet, the npc should be taged "hostile" , not pet. Pet is just pet
Reply With Quote
  #4  
Old 07-06-2009, 06:28 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Right, and pets generally con as indifferent anyway, which would prevent them from ever getting to the tagging portion, which only activates for Glares Threateningly or Ready to Attack.
Reply With Quote
  #5  
Old 07-06-2009, 06:44 PM
Kobaz
Hill Giant
 
Join Date: Nov 2008
Location: Gold Coast, Oz
Posts: 119
Default

Testing with an otherwise stock server, this change does indeed stop pets being raised. It's a shame, as it's the kind of thing that would make the game more friendly for very young players.
Reply With Quote
  #6  
Old 07-06-2009, 07:50 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Roger that.

I'll have to take a deeper look to figure out what could possibly be going wrong with such a simple little piece of code.
Reply With Quote
  #7  
Old 07-06-2009, 11:02 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Okay, apparently the problem was caused by a call to GetReverseFactionCon() for a non-player entity.

Fixed with the following code change:

File: mob.cpp, Line 817 - mob::FillSpawnStruct()
Code:
  if (ForWho && ForWho->IsClient() && RuleB(World, FlagHostileNPCs))
  {
    switch (ForWho->CastToClient()->GetReverseFactionCon(this))
    {
      case FACTION_THREATENLY:
      case FACTION_SCOWLS:
        memcpy_s(ns->spawn.lastName, sizeof(ns->spawn.lastName), "Hostile", 8);
        break;
    }
  }
On an unrelated note, I found that if you have a pet, you can aggro hostile NPCs even with the GM flag on. LOL.

It's hard to tell whether the pet's aggroing the NPC or the NPC is aggroing on the pet.
Reply With Quote
Reply


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 07:19 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