mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Fix for Berserker 'Piercing' skill issues
This commit is contained in:
+10
-12
@@ -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) {
|
||||
|
||||
|
||||
+3
-3
@@ -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) {
|
||||
|
||||
+12
-3
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
+6
-1
@@ -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:
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user