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
  #1  
Old 08-25-2007, 10:44 AM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default Fix: Zone_Exp_Multiplier not used to factor XP

When I set up my server with the intention of having "hotspot" zones, I noticed that the zone_exp_multiplier from the zone table was not being used to calculated the xp for a kill.

I'm sure there are better ways to do this, but here's what I changed in my code to make this work:

I made the following change to the void Client::AddEXP function within exp.cpp

Code:
void Client::AddEXP(int32 add_exp, int8 conlevel, bool resexp) {
	if (m_epp.perAA<0 || m_epp.perAA>100)
		m_epp.perAA=0;	// stop exploit with sanity check
	
	int32 add_aaxp;
	if(resexp) {
		add_aaxp = 0;
	} else {
		//figure out how much of this goes to AAs
		add_aaxp = add_exp * m_epp.perAA / 100;
		//take that ammount away from regular exp
		add_exp -= add_aaxp;
	
		float totalmod = 1.0;
		//get modifiers
		if (zone->GetEXPMod() > 0) {
			totalmod = zone->GetEXPMod();
		//Lieka:  Add in the zone_exp_multiplier value from the database
			totalmod *= zone->newzone_data.zone_exp_multiplier;
		}

		if(RuleR(Character, ExpMultiplier) >= 0){
			totalmod *= RuleR(Character, ExpMultiplier);
		}
		

		add_exp = int32(float(add_exp) * totalmod);
Thanks,
Daxum
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)

Last edited by TheLieka; 08-25-2007 at 06:47 PM..
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:42 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