Browse Source

start of item exp mod support

In support of Issue #116
Image 1 year ago
parent
commit
170c9a67ac
2 changed files with 5 additions and 1 deletions
  1. 4 0
      EQ2/source/WorldServer/Player.cpp
  2. 1 1
      EQ2/source/WorldServer/World.cpp

+ 4 - 0
EQ2/source/WorldServer/Player.cpp

@@ -3490,6 +3490,8 @@ int32 Player::GetTSXP() {
 }
 
 bool Player::AddXP(int32 xp_amount){
+	xp_amount += ((xp_amount) * stats[ITEM_STAT_COMBATEXPMOD]) / 100;
+
 	float current_xp_percent = ((float)GetXP()/(float)GetNeededXP())*100;
 	float miniding_min_percent = ((int)(current_xp_percent/10)+1)*10;
 	while((xp_amount + GetXP()) >= GetNeededXP()){
@@ -3513,6 +3515,8 @@ bool Player::AddXP(int32 xp_amount){
 }
 
 bool Player::AddTSXP(int32 xp_amount){
+	xp_amount += ((xp_amount)*stats[ITEM_STAT_TRADESKILLEXPMOD]) / 100;
+
 	float current_xp_percent = ((float)GetTSXP()/(float)GetNeededTSXP())*100;
 	float miniding_min_percent = ((int)(current_xp_percent/10)+1)*10;
 	while((xp_amount + GetTSXP()) >= GetNeededTSXP()){

+ 1 - 1
EQ2/source/WorldServer/World.cpp

@@ -1974,7 +1974,7 @@ void World::PopulateTOVStatMap() {
 	tov_itemstat_conversion[24] = TOV_ITEM_STAT_HATEGAINMOD;
 	tov_itemstat_conversion[25] = TOV_ITEM_STAT_COMBATEXPMOD;
 	tov_itemstat_conversion[26] = TOV_ITEM_STAT_TRADESKILLEXPMOD;
-	tov_itemstat_conversion[27] = TOV_ITEM_STAT_ACHIEVEMENTEXPMOD	;
+	tov_itemstat_conversion[27] = TOV_ITEM_STAT_ACHIEVEMENTEXPMOD;
 	tov_itemstat_conversion[28] = TOV_ITEM_STAT_SIZEMOD;
 	tov_itemstat_conversion[29] = TOV_ITEM_STAT_DPS;
 	tov_itemstat_conversion[30] = 698;