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 01-11-2013, 04:06 PM
Thuz989
Sarnak
 
Join Date: Jan 2006
Posts: 45
Default Questions about exp.cpp

I am trying to figure out a problem im having in this thread here...

http://www.eqemulator.org/forums/showthread.php?t=36253

As part of this i was looking at exp.cpp and i was wondering this...

How is the "conlevel" variable in this set? the default is 0xFF which will stop the con_scaling from working?? It seems like conscaling quit working so im trying to find a workaround but i cant figure out a way to check mob level within this funtion... bleh.

Code:
void Client::AddEXP(int32 in_add_exp, int8 conlevel, bool resexp) {

        int32 add_exp = in_add_exp;



        if(!resexp && (XPRate != 0))
                add_exp = static_cast<int32>(in_add_exp * (static_cast<float>(XPRate) / 100.0f));
        
        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;
                float zemmod = 1.0;
                //get modifiers
                if(RuleR(Character, ExpMultiplier) >= 0){
                        totalmod *= RuleR(Character, ExpMultiplier);
                }

                if(zone->newzone_data.zone_exp_multiplier >= 0){
                        zemmod *= zone->newzone_data.zone_exp_multiplier;
                }

                if(RuleB(Character,UseRaceClassExpBonuses))
                {
                        if(GetBaseRace() == HALFLING){
                                totalmod *= 1.05;
                        }

                        if(GetClass() == ROGUE || GetClass() == WARRIOR){
                                totalmod *= 1.05;
                        }
                }

                if(zone->IsHotzone())
                {
                        totalmod += RuleR(Zone, HotZoneBonus);
                }

                add_exp = int32(float(add_exp) * totalmod * zemmod);
				
			
                if(RuleB(Character,UseXPConScaling))
                {
                        if (conlevel != 0xFF && !resexp) {
                                switch (conlevel)
                                {
                                        case CON_GREEN:
                                                add_exp = 0;
                                                add_aaxp = 0;
                                                return;
                                        case CON_LIGHTBLUE:
                                                        add_exp = add_exp * RuleI(Character, LightBlueModifier)/100;
                                                        add_aaxp = add_aaxp * RuleI(Character, LightBlueModifier)/100;
                                                break;
                                        case CON_BLUE:
                                                        add_exp = add_exp * RuleI(Character, BlueModifier)/100;
                                                        add_aaxp = add_aaxp * RuleI(Character, BlueModifier)/100;
                                                break;
                                        case CON_WHITE:
                                                        add_exp = add_exp * RuleI(Character, WhiteModifier)/100;
                                                        add_aaxp = add_aaxp * RuleI(Character, WhiteModifier)/100;
                                                break;
                                        case CON_YELLOW:
                                                        add_exp = add_exp * RuleI(Character, YellowModifier)/100;
                                                        add_aaxp = add_aaxp * RuleI(Character, YellowModifier)/100;
                                                break;
                                        case CON_RED:
                                                        add_exp = add_exp * RuleI(Character, RedModifier)/100;
                                                        add_aaxp = add_aaxp * RuleI(Character, RedModifier)/100;
                                                break;
                                }
                        }
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 07:33 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