mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
[Feature] Add support for -1 extradmgskill to allow all skills to be scaled. (#3136)
* [Feature] Add support for -1 extradmgskill to allow all skills to be scaled. - `$mob->GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`. - `statbonuses:GetSkillDamageAmount(skill_id)` now uses `-1` properly. - `mob:GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`. - A `-1` value in `extradmgskill` denotes the ability to scale all skills at once. - Consolidated `AddItemBonuses()`, `AdditiveWornBonuses()`, `CalcItemBonuses()`, and `CalcRecommendedLevelBonus()` to mob-based methods to avoid code duplication. - Bots, NPCs, and Mercs can now use additive worn effects if the rule is enabled, as well as all other proper stat bonuses that only clients had before. - No SQL update required to change `extradmgskill` and `extradmgamt` to `int` as they already are this type in the database, just had to adjust `item_data.h` and `shareddb.cpp`. * Update mob.cpp * Cleanup. * Cleanup. * Move #include <vector> to header. * Add method for GetExtraDamageSkills * fix additembonuses * Update bonuses.cpp * Update mob.cpp * Out of bounds. * Update bonuses.cpp --------- Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
This commit is contained in:
+4
-2
@@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace EQ
|
||||
@@ -170,6 +171,7 @@ namespace EQ
|
||||
bool IsMeleeDmg(SkillType skill);
|
||||
|
||||
extern const std::map<SkillType, std::string>& GetSkillTypeMap();
|
||||
extern const std::vector<SkillType>& GetExtraDamageSkills();
|
||||
|
||||
std::string GetSkillName(SkillType skill);
|
||||
} /*skills*/
|
||||
@@ -305,7 +307,7 @@ namespace EQ
|
||||
|
||||
uint32 operator[](int skill_id) const { return const_cast<SkillProfile*>(this)->GetSkill(skill_id); }
|
||||
};
|
||||
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_SKILLS_H*/
|
||||
|
||||
Reference in New Issue
Block a user