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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2013, 09:05 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default Swarm Pets Not Giving Experience

Not sure if this is intended? But swarm pets will allow loot but do not grant experience

Here is what I changed to fix it.

attack.cpp line 2088 (OLD CODE)
Code:
if(give_exp && give_exp->HasOwner()) {

attack.cpp line 2088 (REPLACE WITH THIS)
Code:
if(give_exp && give_exp->HasOwner() || (give_exp && entity_list.GetMob(give_exp->CastToNPC()->GetSwarmOwner()))) {

Swarmpets do not "HasOwner" so they never passed that check but later in the code it was correct for allowing loot.

With this fix they will correctly give loot and EXP! (if the swarmpet out damages the group that is they are currently Kill stealing EXP ONLY ... loot is fine)

I would submit this myself but my GitHub keeps giving me errors :(
Reply With Quote
  #2  
Old 08-14-2013, 10:56 AM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

Didn't you say you installed TortoiseGit? Right click the top level folder and choose TortoiseGit->Diff
More people will care if you submit in that format. Cheers mate.
__________________

Reply With Quote
  #3  
Old 08-14-2013, 11:50 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Like this? :p


Code:
 zone/attack.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zone/attack.cpp b/zone/attack.cpp
index 61da974..6886b70 100644
--- a/zone/attack.cpp
+++ b/zone/attack.cpp
@@ -2126,7 +2126,7 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
 	if(give_exp == nullptr)
 		give_exp = killer;
 
-	if(give_exp && give_exp->HasOwner()) {
+	if(give_exp && give_exp->HasOwner() || (give_exp && entity_list.GetMob(give_exp->CastToNPC()->GetSwarmOwner()))) {
 
 		bool ownerInGroup = false;
 		if((give_exp->HasGroup() && give_exp->GetGroup()->IsGroupMember(give_exp->GetUltimateOwner()))
Reply With Quote
  #4  
Old 08-14-2013, 07:44 PM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

Hey you know I dont mind find/replacing but the big boys and girls around here prefer that there .diff/.patch file if you know what I mean
__________________

Reply With Quote
  #5  
Old 08-15-2013, 02:37 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

Actually, with git, it is better to simply create a pull request. Then the change can be immediately applied by someone with commit rights.
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 10:20 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3