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)

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 12-15-2007, 01:28 AM
ven-elexver
Banned
 
Join Date: Dec 2007
Posts: 64
Default

HI. Yea a noob found your post haha so i have a server up well a out of the box peq i have done nothing to even say (i have a server running) just did a step by step set up But i would like to have Gm events that would give higher exp maybe for my whole server /all zones But i look at this post and its all greek to me Could someone dumb down how to set and unset up the exp for peq DB server ? (will need to be a step by step ) Thanks to any that has time to help noobs like me
Reply With Quote
  #3  
Old 12-17-2007, 07:04 AM
Teremarr
Fire Beetle
 
Join Date: Dec 2006
Posts: 3
Default

Well, what you are asking for is pretty specific (creating "specialized" exp rates for GM events). As for a noob-guide, any guide would require you to get a handle on SQL and learn the MySQL query tool. (The MySQL query tool was installed right after the MySQL database, if you are following the PDF guide for EQEmu setup.) Once you learn how to search for values and edit them with the query tool, look at the Zone table - that has the zone-wide XP multipliers in it. As for something specialized, like GM events, you will defiantely have to "un-noob" yerself, learning SQL, Perl scripting, and maybe C++. Try just reading through the Wiki, and looking at the raw data in the database. You should start to recognize things.
Reply With Quote
  #4  
Old 12-17-2007, 08:13 AM
Bishop4351
Sarnak
 
Join Date: Sep 2006
Location: Texas
Posts: 49
Default

If nothing else get phpMyAdmin installed and start looking it over. Some of the tables are hard to read but most are very straight forward.
Reply With Quote
  #5  
Old 12-21-2007, 12:29 AM
ven-elexver
Banned
 
Join Date: Dec 2007
Posts: 64
Default

Thanks for the info on this i use some of the edit software you named but as for c++ your over my head But sounds like i maybe could use Mysql,Q or Navicat to edit the exp rate for a zone With a little more reading in on the topic
but a magic button for all zones would be nice lol But ill keep looking and i will look at the zone Tables see if i can find the EXP rate for a zone and play with it a little TY for the help
Reply With Quote
  #6  
Old 12-26-2007, 08:10 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Did this fix ever make it into the core? I cannot find it in the changelogs. It would be a nice addition, if not.
Reply With Quote
  #7  
Old 12-26-2007, 08:24 AM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default

Quote:
Originally Posted by John Adams View Post
Did this fix ever make it into the core? I cannot find it in the changelogs. It would be a nice addition, if not.
yes it did.
http://eqemulator.cvs.sourceforge.ne...r1=1.9&r2=1.10
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com
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 12:06 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3