Fix for Berserker 'Piercing' skill issues

This commit is contained in:
Uleat 2016-01-26 15:08:41 -05:00
parent 15c92f019a
commit 1b7841f683
18 changed files with 66 additions and 29 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 01/26/2016 ==
Uleat: Fix for Berserker 'Piercing' skill issues. Server Admins: If you run custom skill sets, this patch touches the code segments that you will need to modify if you have changed the default berserker 1H-/2H-piercing skill values.
== 01/13/2016 ==
Kinglykrab: Modified #flag so you can refresh your target's account status (GM status level) without them having to relog.
- Just target the person whose flag you want to refresh and type #flag.

View File

@ -799,10 +799,10 @@ static const uint8 SkillDamageTypes[HIGHEST_SKILL + 1] = // change to _SkillServ
/*Intimidation*/ DamageTypeUnknown,
/*Berserking*/ DamageTypeUnknown,
/*Taunt*/ DamageTypeUnknown,
/*Frenzy*/ 74 //,
// /*RemoveTrap*/ DamageTypeUnknown, // Needs research (set for SenseTrap value)
// /*TripleAttack*/ DamageTypeUnknown, // Needs research (set for DoubleAttack value)
// /*2HPiercing*/ 36 // Needs research (set for 1HPiercing value - similar to slash/blunt)
/*Frenzy*/ 74,
/*RemoveTrap*/ DamageTypeUnknown, // Needs research (set for SenseTrap value)
/*TripleAttack*/ DamageTypeUnknown, // Needs research (set for DoubleAttack value)
/*2HPiercing*/ 36 // Needs research (set for 1HPiercing value - similar to slash/blunt)
};
/*

View File

@ -186,6 +186,8 @@ namespace RoF2 {
static const size_t POTION_BELT_ITEM_COUNT = 5;
static const size_t TEXT_LINK_BODY_LENGTH = 56;
static const size_t PLAYER_PROFILE_SKILL_MAX = Skill2HPiercing;
}
namespace limits {

View File

@ -185,6 +185,8 @@ namespace RoF {
static const size_t POTION_BELT_ITEM_COUNT = 5;
static const size_t TEXT_LINK_BODY_LENGTH = 55;
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillTripleAttack;
}
namespace limits {

View File

@ -182,6 +182,8 @@ namespace SoD {
static const size_t POTION_BELT_ITEM_COUNT = 5;
static const size_t TEXT_LINK_BODY_LENGTH = 50;
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillTripleAttack;
}
namespace limits {

View File

@ -182,6 +182,8 @@ namespace SoF {
static const size_t POTION_BELT_ITEM_COUNT = 5;
static const size_t TEXT_LINK_BODY_LENGTH = 50;
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillTripleAttack;
}
namespace limits {

View File

@ -181,6 +181,8 @@ namespace Titanium {
static const size_t POTION_BELT_ITEM_COUNT = 4;
static const size_t TEXT_LINK_BODY_LENGTH = 45;
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillFrenzy;
}
namespace limits {

View File

@ -182,6 +182,8 @@ namespace UF {
static const size_t POTION_BELT_ITEM_COUNT = 5;
static const size_t TEXT_LINK_BODY_LENGTH = 50;
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillTripleAttack;
}
namespace limits {

View File

@ -71,7 +71,7 @@ float EQEmu::GetSkillMeleePushForce(SkillUseTypes skill)
case SkillEagleStrike:
case SkillKick:
case SkillTigerClaw:
//case Skill2HPiercing:
case Skill2HPiercing:
return 0.2f;
case SkillArchery:
return 0.15f;

View File

@ -114,7 +114,7 @@ enum SkillUseTypes
/*13049*/ SkillTripleAttack,
// RoF2+ specific skills
// /*00789*/ Skill2HPiercing,
/*00789*/ Skill2HPiercing,
// /*01216*/ SkillNone, // This needs to move down as new skills are added
/*00000*/ _EmuSkillCount // move to last position of active enumeration labels
@ -171,7 +171,7 @@ enum SkillUseTypes
};
// temporary until it can be sorted out...
#define HIGHEST_SKILL SkillTripleAttack
#define HIGHEST_SKILL Skill2HPiercing
// Spell Effects use this value to determine if an effect applies to all skills.
#define ALL_SKILLS -1

View File

@ -1814,6 +1814,11 @@ void Client::SetClassStartingSkills(PlayerProfile_Struct *pp)
pp->skills[i] = database.GetSkillCap(pp->class_, (SkillUseTypes)i, 1);
}
}
if (cle->GetClientVersion() < static_cast<uint8>(ClientVersion::RoF2) && pp->class_ == BERSERKER) {
pp->skills[Skill1HPiercing] = pp->skills[Skill2HPiercing];
pp->skills[Skill2HPiercing] = 0;
}
}
void Client::SetRaceStartingSkills( PlayerProfile_Struct *pp )

View File

@ -76,7 +76,7 @@ bool Mob::AttackAnimation(SkillUseTypes &skillinuse, int Hand, const ItemInst* w
case ItemType1HPiercing: // Piercing
{
skillinuse = Skill1HPiercing;
type = animPiercing;
type = anim1HPiercing;
break;
}
case ItemType1HBlunt: // 1H Blunt
@ -93,7 +93,10 @@ bool Mob::AttackAnimation(SkillUseTypes &skillinuse, int Hand, const ItemInst* w
}
case ItemType2HPiercing: // 2H Piercing
{
skillinuse = Skill1HPiercing; // change to Skill2HPiercing once activated
if (IsClient() && CastToClient()->GetClientVersion() < ClientVersion::RoF2)
skillinuse = Skill1HPiercing;
else
skillinuse = Skill2HPiercing;
type = anim2HWeapon;
break;
}
@ -127,7 +130,7 @@ bool Mob::AttackAnimation(SkillUseTypes &skillinuse, int Hand, const ItemInst* w
}
case Skill1HPiercing: // Piercing
{
type = animPiercing;
type = anim1HPiercing;
break;
}
case Skill1HBlunt: // 1H Blunt
@ -140,7 +143,7 @@ bool Mob::AttackAnimation(SkillUseTypes &skillinuse, int Hand, const ItemInst* w
type = anim2HSlashing; //anim2HWeapon
break;
}
case 99: // 2H Piercing // change to Skill2HPiercing once activated
case Skill2HPiercing: // 2H Piercing
{
type = anim2HWeapon;
break;
@ -1652,10 +1655,10 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
skillinuse = Skill2HSlashing;
break;
case ItemType1HPiercing:
//skillinuse = Skill1HPiercing;
//break;
skillinuse = Skill1HPiercing;
break;
case ItemType2HPiercing:
skillinuse = Skill1HPiercing; // change to Skill2HPiercing once activated
skillinuse = Skill2HPiercing;
break;
case ItemType1HBlunt:
skillinuse = Skill1HBlunt;
@ -1683,11 +1686,6 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
ItemInst weapon_inst(weapon, charges);
AttackAnimation(skillinuse, Hand, &weapon_inst);
// Remove this once Skill2HPiercing is activated
//Work-around for there being no 2HP skill - We use 99 for the 2HB animation and 36 for pierce messages
if(skillinuse == 99)
skillinuse = static_cast<SkillUseTypes>(36);
//basically "if not immune" then do the attack
if((weapon_damage) > 0) {

View File

@ -1179,7 +1179,7 @@ uint16 Bot::GetPrimarySkillValue() {
break;
}
case ItemType2HPiercing: {
skill = Skill1HPiercing; // change to Skill2HPiercing once activated
skill = Skill2HPiercing;
break;
}
case ItemTypeMartial: {
@ -6493,7 +6493,7 @@ void Bot::RogueBackstab(Mob* other, bool min_damage, int ReuseTime) {
ndamage = -5;
DoSpecialAttackDamage(other, SkillBackstab, ndamage, min_hit, hate, ReuseTime);
DoAnim(animPiercing);
DoAnim(anim1HPiercing);
}
void Bot::RogueAssassinate(Mob* other) {
@ -6505,7 +6505,7 @@ void Bot::RogueAssassinate(Mob* other) {
other->Damage(this, -5, SPELL_UNKNOWN, SkillBackstab);
}
DoAnim(animPiercing);
DoAnim(anim1HPiercing);
}
void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {

View File

@ -2343,11 +2343,17 @@ bool Client::HasSkill(SkillUseTypes skill_id) const {
}
bool Client::CanHaveSkill(SkillUseTypes skill_id) const {
if (GetClientVersion() < ClientVersion::RoF2 && class_ == BERSERKER && skill_id == Skill1HPiercing)
skill_id = Skill2HPiercing;
return(database.GetSkillCap(GetClass(), skill_id, RuleI(Character, MaxLevel)) > 0);
//if you don't have it by max level, then odds are you never will?
}
uint16 Client::MaxSkill(SkillUseTypes skillid, uint16 class_, uint16 level) const {
if (GetClientVersion() < ClientVersion::RoF2 && class_ == BERSERKER && skillid == Skill1HPiercing)
skillid = Skill2HPiercing;
return(database.GetSkillCap(class_, skillid, level));
}
@ -4211,7 +4217,10 @@ uint16 Client::GetPrimarySkillValue()
}
case ItemType2HPiercing: // 2H Piercing
{
skill = Skill1HPiercing; // change to Skill2HPiercing once activated
if (IsClient() && CastToClient()->GetClientVersion() < ClientVersion::RoF2)
skill = Skill1HPiercing;
else
skill = Skill2HPiercing;
break;
}
case ItemTypeMartial: // Hand to Hand
@ -4950,11 +4959,11 @@ void Client::ShowSkillsWindow()
const char* SkillName[] = {"1H Blunt","1H Slashing","2H Blunt","2H Slashing","Abjuration","Alteration","Apply Poison","Archery",
"Backstab","Bind Wound","Bash","Block","Brass Instruments","Channeling","Conjuration","Defense","Disarm","Disarm Traps","Divination",
"Dodge","Double Attack","Dragon Punch","Dual Wield","Eagle Strike","Evocation","Feign Death","Flying Kick","Forage","Hand to Hand",
"Hide","Kick","Meditate","Mend","Offense","Parry","Pick Lock","Piercing","Ripost","Round Kick","Safe Fall","Sense Heading",
"Hide","Kick","Meditate","Mend","Offense","Parry","Pick Lock","1H Piercing","Ripost","Round Kick","Safe Fall","Sense Heading",
"Singing","Sneak","Specialize Abjuration","Specialize Alteration","Specialize Conjuration","Specialize Divination","Specialize Evocation","Pick Pockets",
"Stringed Instruments","Swimming","Throwing","Tiger Claw","Tracking","Wind Instruments","Fishing","Make Poison","Tinkering","Research",
"Alchemy","Baking","Tailoring","Sense Traps","Blacksmithing","Fletching","Brewing","Alcohol Tolerance","Begging","Jewelry Making",
"Pottery","Percussion Instruments","Intimidation","Berserking","Taunt","Frenzy","Remove Traps","Triple Attack"};
"Pottery","Percussion Instruments","Intimidation","Berserking","Taunt","Frenzy","Remove Traps","Triple Attack","2H Piercing"};
for(int i = 0; i <= (int)HIGHEST_SKILL; i++)
Skills[SkillName[i]] = (SkillUseTypes)i;

View File

@ -1553,6 +1553,11 @@ void Client::OPGMTraining(const EQApplicationPacket *app)
//Set it to 1 with CanHaveSkill or you wont be able to train past 1.
}
}
if (GetClientVersion() < ClientVersion::RoF2 && GetClass() == BERSERKER) {
gmtrain->skills[Skill1HPiercing] = gmtrain->skills[Skill2HPiercing];
gmtrain->skills[Skill2HPiercing] = 0;
}
//#pragma GCC pop_options
uchar ending[]={0x34,0x87,0x8a,0x3F,0x01

View File

@ -511,7 +511,7 @@ typedef struct
//make DoAnim take it instead of int, to enforce its use.
enum { //type arguments to DoAnim
animKick = 1,
animPiercing = 2, //might be piercing?
anim1HPiercing = 2, //might be piercing?
anim2HSlashing = 3,
anim2HWeapon = 4,
anim1HWeapon = 5,

View File

@ -5029,7 +5029,10 @@ uint16 Mob::GetSkillByItemType(int ItemType)
case ItemType2HBlunt:
return Skill2HBlunt;
case ItemType2HPiercing:
return Skill1HPiercing; // change to 2HPiercing once activated
if (IsClient() && CastToClient()->GetClientVersion() < ClientVersion::RoF2)
return Skill1HPiercing;
else
return Skill2HPiercing;
case ItemTypeBow:
return SkillArchery;
case ItemTypeLargeThrowing:
@ -5057,6 +5060,8 @@ uint8 Mob::GetItemTypeBySkill(SkillUseTypes skill)
return ItemType2HSlash;
case Skill1HPiercing:
return ItemType1HPiercing;
case Skill2HPiercing: // watch for undesired client behavior
return ItemType2HPiercing;
case Skill1HBlunt:
return ItemType1HBlunt;
case Skill2HBlunt:

View File

@ -660,7 +660,7 @@ void Mob::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
}
DoSpecialAttackDamage(other, SkillBackstab, ndamage, min_hit, hate, ReuseTime, false, false);
DoAnim(animPiercing);
DoAnim(anim1HPiercing);
}
// assassinate [No longer used for regular assassinate 6-29-14]
@ -673,7 +673,7 @@ void Mob::RogueAssassinate(Mob* other)
}else{
other->Damage(this, -5, SPELL_UNKNOWN, SkillBackstab);
}
DoAnim(animPiercing); //piercing animation
DoAnim(anim1HPiercing); //piercing animation
}
void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {