mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-28 15:57:58 +00:00
[Feature] Evolving Item Support for RoF2 (#4496)
* basic evolving items framework created * Implement evolving tab in the inventory window * Implement experience and number of kills * Move zone evolving map to a evolvingitemsmanager class * rework gm commands * rework GetInventory * wip * wip loot testing * Fix Duplicate Message * reworked evolving item looting, swapping, etc * reworked const functions for evolving methods * Functioning Player Trade of evolving items test item_id is 89550 * First pass of Final Result link working * First pass of item upgrading when reaching 100% * Add strings and logic for displaying the evolving item xp transfer window in Corathus * Prototype of xp transfer window sending items * WIP for evolve xp transfer * WIP for evolve xp transfer. First tests passed * XP Transfer Cleanup * XP Transfer Cleanup * Add Rule for evolving items equip timer/ default is 30 secs * Add logging and player events Add logging and player events * Formatting * Database updates * Updates for linux build * Perl/Cleanup * Command cleanup * Lua * Added a crash condition check if final item id is blank or not found. * Review Changes Updates to resolve review comments and a rebase. * migrate to content_db for items_evolving_details migrate to content_db for items_evolving_details * Simplify, don't hit database unless evolving * Update 2025_01_19_items_evolving_details.sql * Update client.cpp * Update manifest with items_evolving_details * character_id vs char_id * Remove _Struct from structs * Remove license header in evolving.cpp * Move evolving constants from eq_constants.h to evolving.h since it is more specific * Update database_schema.h * General cleanup * Be more specific with `evolving_items` vs `evolving` --------- Co-authored-by: Kinglykrab <kinglykrab@gmail.com> Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+6
-5
@@ -497,7 +497,7 @@ void Client::CalculateExp(uint64 in_add_exp, uint64 &add_exp, uint64 &add_aaxp,
|
||||
add_exp = GetEXP() + add_exp;
|
||||
}
|
||||
|
||||
void Client::AddEXP(ExpSource exp_source, uint64 in_add_exp, uint8 conlevel, bool resexp) {
|
||||
void Client::AddEXP(ExpSource exp_source, uint64 in_add_exp, uint8 conlevel, bool resexp, NPC* npc) {
|
||||
if (!IsEXPEnabled()) {
|
||||
return;
|
||||
}
|
||||
@@ -574,10 +574,10 @@ void Client::AddEXP(ExpSource exp_source, uint64 in_add_exp, uint8 conlevel, boo
|
||||
}
|
||||
|
||||
// Now update our character's normal and AA xp
|
||||
SetEXP(exp_source, exp, aaexp, resexp);
|
||||
SetEXP(exp_source, exp, aaexp, resexp, npc);
|
||||
}
|
||||
|
||||
void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool isrezzexp) {
|
||||
void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool isrezzexp, NPC* npc) {
|
||||
uint64 current_exp = GetEXP();
|
||||
uint64 current_aa_exp = GetAAXP();
|
||||
uint64 total_current_exp = current_exp + current_aa_exp;
|
||||
@@ -677,6 +677,7 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
|
||||
}
|
||||
}
|
||||
}
|
||||
ProcessEvolvingItem(exp_gained, npc);
|
||||
} else if(total_add_exp < total_current_exp) { //only loss message if you lose exp, no message if you gained/lost nothing.
|
||||
uint64 exp_lost = current_exp - set_exp;
|
||||
float exp_percent = (float)((float)exp_lost / (float)(GetEXPForLevel(GetLevel() + 1) - GetEXPForLevel(GetLevel())))*(float)100;
|
||||
@@ -1205,7 +1206,7 @@ void Group::SplitExp(ExpSource exp_source, const uint64 exp, Mob* other) {
|
||||
if (diff >= max_diff) {
|
||||
const uint64 tmp = (m->GetLevel() + 3) * (m->GetLevel() + 3) * 75 * 35 / 10;
|
||||
const uint64 tmp2 = group_experience / member_count;
|
||||
m->CastToClient()->AddEXP(exp_source, tmp < tmp2 ? tmp : tmp2, consider_level);
|
||||
m->CastToClient()->AddEXP(exp_source, tmp < tmp2 ? tmp : tmp2, consider_level, false, other->CastToNPC());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1256,7 +1257,7 @@ void Raid::SplitExp(ExpSource exp_source, const uint64 exp, Mob* other) {
|
||||
if (diff >= max_diff) {
|
||||
const uint64 tmp = (m.member->GetLevel() + 3) * (m.member->GetLevel() + 3) * 75 * 35 / 10;
|
||||
const uint64 tmp2 = (raid_experience / member_modifier) + 1;
|
||||
m.member->AddEXP(exp_source, tmp < tmp2 ? tmp : tmp2, consider_level);
|
||||
m.member->AddEXP(exp_source, tmp < tmp2 ? tmp : tmp2, consider_level, false, other->CastToNPC());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user