Converted SkillType typedef enumeration to SkillUseTypes enumeration

This commit is contained in:
Uleat
2013-10-27 13:03:41 -04:00
parent 3e6be197e6
commit e3805d5920
43 changed files with 1119 additions and 949 deletions
+89 -81
View File
@@ -547,88 +547,96 @@ enum GroupUpdateAction
GUA_Started = 9
};
//0x1c is something...
static const uint8 FallingDamageType = 0xFC;
static const uint8 SpellDamageType = 0xe7;
static const uint8 DamageTypeUnknown = 0xFF;
static const uint8 DamageTypeSomething = 0x1C; //0x1c is something...
static const uint8 DamageTypeFalling = 0xFC;
static const uint8 DamageTypeSpell = 0xE7;
static const uint8 DamageTypeUnknown = 0xFF;
//indexed by 'SkillType'
static const uint8 SkillDamageTypes[HIGHEST_SKILL+1] = {
/* _1H_BLUNT */ 0,
/* _1H_SLASHING */ 1,
/* _2H_BLUNT */ 0,
/* _2H_SLASHING */ 1,
/* ABJURE */ SpellDamageType,
/* ALTERATION */ SpellDamageType,
/* APPLY_POISON */ DamageTypeUnknown,
/* ARCHERY */ 7,
/* BACKSTAB */ 8,
/* BIND_WOUND */ DamageTypeUnknown,
/* BASH */ 10,
/* BLOCKSKILL */ DamageTypeUnknown,
/* BRASS_INSTRUMENTS */ SpellDamageType,
/* CHANNELING */ DamageTypeUnknown,
/* CONJURATION */ SpellDamageType,
/* DEFENSE */ DamageTypeUnknown,
/* DISARM */ DamageTypeUnknown,
/* DISARM_TRAPS */ DamageTypeUnknown,
/* DIVINATION */ SpellDamageType,
/* DODGE */ DamageTypeUnknown,
/* DOUBLE_ATTACK */ DamageTypeUnknown,
/* DRAGON_PUNCH */ 21,
/* DUAL_WIELD */ DamageTypeUnknown,
/* EAGLE_STRIKE */ 23,
/* EVOCATION */ SpellDamageType,
/* FEIGN_DEATH */ 4,
/* FLYING_KICK */ 30,
/* FORAGE */ DamageTypeUnknown,
/* HAND_TO_HAND */ 4,
/* HIDE */ DamageTypeUnknown,
/* KICK */ 30,
/* MEDITATE */ DamageTypeUnknown,
/* MEND */ DamageTypeUnknown,
/* OFFENSE */ DamageTypeUnknown,
/* PARRY */ DamageTypeUnknown,
/* PICK_LOCK */ DamageTypeUnknown,
/* PIERCING */ 36,
/* RIPOSTE */ DamageTypeUnknown,
/* ROUND_KICK */ 30,
/* SAFE_FALL */ DamageTypeUnknown,
/* SENSE_HEADING */ DamageTypeUnknown,
/* SINGING */ SpellDamageType,
/* SNEAK */ DamageTypeUnknown,
/* SPECIALIZE_ABJURE */ DamageTypeUnknown,
/* SPECIALIZE_ALTERATION */ DamageTypeUnknown,
/* SPECIALIZE_CONJURATION */ DamageTypeUnknown,
/* SPECIALIZE_DIVINATION */ DamageTypeUnknown,
/* SPECIALIZE_EVOCATION */ DamageTypeUnknown,
/* PICK_POCKETS */ DamageTypeUnknown,
/* STRINGED_INSTRUMENTS */ SpellDamageType,
/* SWIMMING */ DamageTypeUnknown,
/* THROWING */ 51,
/* TIGER_CLAW */ 23,
/* TRACKING */ DamageTypeUnknown,
/* WIND_INSTRUMENTS */ SpellDamageType,
/* FISHING */ DamageTypeUnknown,
/* MAKE_POISON */ DamageTypeUnknown,
/* TINKERING */ DamageTypeUnknown,
/* RESEARCH */ DamageTypeUnknown,
/* ALCHEMY */ DamageTypeUnknown,
/* BAKING */ DamageTypeUnknown,
/* TAILORING */ DamageTypeUnknown,
/* SENSE_TRAPS */ DamageTypeUnknown,
/* BLACKSMITHING */ DamageTypeUnknown,
/* FLETCHING */ DamageTypeUnknown,
/* BREWING */ DamageTypeUnknown,
/* ALCOHOL_TOLERANCE */ DamageTypeUnknown,
/* BEGGING */ DamageTypeUnknown,
/* JEWELRY_MAKING */ DamageTypeUnknown,
/* POTTERY */ DamageTypeUnknown,
/* PERCUSSION_INSTRUMENTS */ SpellDamageType,
/* INTIMIDATION */ DamageTypeUnknown,
/* BERSERKING */ DamageTypeUnknown,
/* TAUNT */ DamageTypeUnknown,
/* FRENZY */ 74
/*
** Skill damage types
**
** (indexed by 'Skill' of SkillUseTypes)
*/
static const uint8 SkillDamageTypes[HIGHEST_SKILL + 1] = // change to _SkillServerArraySize once activated
{
/*1HBlunt*/ 0,
/*1HSlashing*/ 1,
/*2HBlunt*/ 0,
/*2HSlashing*/ 1,
/*Abjuration*/ DamageTypeSpell,
/*Alteration*/ DamageTypeSpell,
/*ApplyPoison*/ DamageTypeUnknown,
/*Archery*/ 7,
/*Backstab*/ 8,
/*BindWound*/ DamageTypeUnknown,
/*Bash*/ 10,
/*Block*/ DamageTypeUnknown,
/*BrassInstruments*/ DamageTypeSpell,
/*Channeling*/ DamageTypeUnknown,
/*Conjuration*/ DamageTypeSpell,
/*Defense*/ DamageTypeUnknown,
/*Disarm*/ DamageTypeUnknown,
/*DisarmTraps*/ DamageTypeUnknown,
/*Divination*/ DamageTypeSpell,
/*Dodge*/ DamageTypeUnknown,
/*DoubleAttack*/ DamageTypeUnknown,
/*DragonPunch*/ 21,
/*DualWield*/ DamageTypeUnknown,
/*EagleStrike*/ 23,
/*Evocation*/ DamageTypeSpell,
/*FeignDeath*/ 4,
/*FlyingKick*/ 30,
/*Forage*/ DamageTypeUnknown,
/*HandtoHand*/ 4,
/*Hide*/ DamageTypeUnknown,
/*Kick*/ 30,
/*Meditate*/ DamageTypeUnknown,
/*Mend*/ DamageTypeUnknown,
/*Offense*/ DamageTypeUnknown,
/*Parry*/ DamageTypeUnknown,
/*PickLock*/ DamageTypeUnknown,
/*1HPiercing*/ 36,
/*Riposte*/ DamageTypeUnknown,
/*RoundKick*/ 30,
/*SafeFall*/ DamageTypeUnknown,
/*SsenseHeading*/ DamageTypeUnknown,
/*Singing*/ DamageTypeSpell,
/*Sneak*/ DamageTypeUnknown,
/*SpecializeAbjure*/ DamageTypeUnknown,
/*SpecializeAlteration*/ DamageTypeUnknown,
/*SpecializeConjuration*/ DamageTypeUnknown,
/*SpecializeDivination*/ DamageTypeUnknown,
/*SpecializeEvocation*/ DamageTypeUnknown,
/*PickPockets*/ DamageTypeUnknown,
/*StringedInstruments*/ DamageTypeSpell,
/*Swimming*/ DamageTypeUnknown,
/*Throwing*/ 51,
/*TigerClaw*/ 23,
/*Tracking*/ DamageTypeUnknown,
/*WindInstruments*/ DamageTypeSpell,
/*Fishing*/ DamageTypeUnknown,
/*MakePoison*/ DamageTypeUnknown,
/*Tinkering*/ DamageTypeUnknown,
/*Research*/ DamageTypeUnknown,
/*Alchemy*/ DamageTypeUnknown,
/*Baking*/ DamageTypeUnknown,
/*Tailoring*/ DamageTypeUnknown,
/*SenseTraps*/ DamageTypeUnknown,
/*Blacksmithing*/ DamageTypeUnknown,
/*Fletching*/ DamageTypeUnknown,
/*Brewing*/ DamageTypeUnknown,
/*AlcoholTolerance*/ DamageTypeUnknown,
/*Begging*/ DamageTypeUnknown,
/*JewelryMaking*/ DamageTypeUnknown,
/*Pottery*/ DamageTypeUnknown,
/*PercussionInstruments*/ DamageTypeSpell,
/*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)
};
/*
+4 -4
View File
@@ -1475,7 +1475,7 @@ void SharedDatabase::LoadSkillCaps(void *data) {
}
}
uint16 SharedDatabase::GetSkillCap(uint8 Class_, SkillType Skill, uint8 Level) {
uint16 SharedDatabase::GetSkillCap(uint8 Class_, SkillUseTypes Skill, uint8 Level) {
if(!skill_caps_mmf) {
return 0;
}
@@ -1504,7 +1504,7 @@ uint16 SharedDatabase::GetSkillCap(uint8 Class_, SkillType Skill, uint8 Level) {
return skill_caps_table[index];
}
uint8 SharedDatabase::GetTrainLevel(uint8 Class_, SkillType Skill, uint8 Level) {
uint8 SharedDatabase::GetTrainLevel(uint8 Class_, SkillUseTypes Skill, uint8 Level) {
if(!skill_caps_mmf) {
return 0;
}
@@ -1682,9 +1682,9 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].basediff=atoi(row[99]);
int tmp_skill = atoi(row[100]);;
if(tmp_skill < 0 || tmp_skill > HIGHEST_SKILL)
sp[tempid].skill = BEGGING; /* not much better we can do. */
sp[tempid].skill = SkillBegging; /* not much better we can do. */ // can probably be changed to client-based 'SkillNone' once activated
else
sp[tempid].skill = (SkillType) tmp_skill;
sp[tempid].skill = (SkillUseTypes) tmp_skill;
sp[tempid].zonetype=atoi(row[101]);
sp[tempid].EnvironmentType=atoi(row[102]);
sp[tempid].TimeOfDay=atoi(row[103]);
+2 -2
View File
@@ -103,8 +103,8 @@ public:
void LoadSkillCaps(void *data);
bool LoadSkillCaps();
uint16 GetSkillCap(uint8 Class_, SkillType Skill, uint8 Level);
uint8 GetTrainLevel(uint8 Class_, SkillType Skill, uint8 Level);
uint16 GetSkillCap(uint8 Class_, SkillUseTypes Skill, uint8 Level);
uint8 GetTrainLevel(uint8 Class_, SkillUseTypes Skill, uint8 Level);
int GetMaxSpellID();
void LoadSpells(void *data, int max_spells);
+160 -2
View File
@@ -18,7 +18,165 @@
#ifndef SKILLS_H
#define SKILLS_H
// Correct Skill Numbers as of 4-14-2002
/*
** This is really messed up... Are we using SkillTypes as a pseudo repository? The 76th skill really throws
** things for standardization...
**
** Below is an attempt to clean this up a little...
*/
/*
** Skill use types
**
** (ref: eqstr_us.txt [05-10-2013])
*/
enum SkillUseTypes : uint32
{
/*13855*/ Skill1HBlunt = 0,
/*13856*/ Skill1HSlashing,
/*13857*/ Skill2HBlunt,
/*13858*/ Skill2HSlashing,
/*13859*/ SkillAbjuration,
/*13861*/ SkillAlteration,
/*13862*/ SkillApplyPoison,
/*13863*/ SkillArchery,
/*13864*/ SkillBackstab,
/*13866*/ SkillBindWound,
/*13867*/ SkillBash,
/*13871*/ SkillBlock,
/*13872*/ SkillBrassInstruments,
/*13874*/ SkillChanneling,
/*13875*/ SkillConjuration,
/*13876*/ SkillDefense,
/*13877*/ SkillDisarm,
/*13878*/ SkillDisarmTraps,
/*13879*/ SkillDivination,
/*13880*/ SkillDodge,
/*13881*/ SkillDoubleAttack,
/*13882*/ SkillDragonPunch, /*13924 SkillTailRake*/
/*13883*/ SkillDualWield,
/*13884*/ SkillEagleStrike,
/*13885*/ SkillEvocation,
/*13886*/ SkillFeignDeath,
/*13888*/ SkillFlyingKick,
/*13889*/ SkillForage,
/*13890*/ SkillHandtoHand,
/*13891*/ SkillHide,
/*13893*/ SkillKick,
/*13894*/ SkillMeditate,
/*13895*/ SkillMend,
/*13896*/ SkillOffense,
/*13897*/ SkillParry,
/*13899*/ SkillPickLock,
/*13900*/ Skill1HPiercing, // Changed in RoF2(05-10-2013)
/*13903*/ SkillRiposte,
/*13904*/ SkillRoundKick,
/*13905*/ SkillSafeFall,
/*13906*/ SkillSenseHeading,
/*13908*/ SkillSinging,
/*13909*/ SkillSneak,
/*13910*/ SkillSpecializeAbjure, // No idea why they truncated this one..especially when there are longer ones...
/*13911*/ SkillSpecializeAlteration,
/*13912*/ SkillSpecializeConjuration,
/*13913*/ SkillSpecializeDivination,
/*13914*/ SkillSpecializeEvocation,
/*13915*/ SkillPickPockets,
/*13916*/ SkillStringedInstruments,
/*13917*/ SkillSwimming,
/*13919*/ SkillThrowing,
/*13920*/ SkillTigerClaw,
/*13921*/ SkillTracking,
/*13923*/ SkillWindInstruments,
/*13854*/ SkillFishing,
/*13853*/ SkillMakePoison,
/*13852*/ SkillTinkering,
/*13851*/ SkillResearch,
/*13850*/ SkillAlchemy,
/*13865*/ SkillBaking,
/*13918*/ SkillTailoring,
/*13907*/ SkillSenseTraps,
/*13870*/ SkillBlacksmithing,
/*13887*/ SkillFletching,
/*13873*/ SkillBrewing,
/*13860*/ SkillAlcoholTolerance,
/*13868*/ SkillBegging,
/*13892*/ SkillJewelryMaking,
/*13901*/ SkillPottery,
/*13898*/ SkillPercussionInstruments,
/*13922*/ SkillIntimidation,
/*13869*/ SkillBerserking,
/*13902*/ SkillTaunt,
/*05837*/ SkillFrenzy, // This appears to be the only listed one not grouped with the others
// SoF+ specific skills
// /*03670*/ SkillRemoveTraps,
// /*13049*/ SkillTripleAttack,
// RoF2+ specific skills
// /*00789*/ Skill2HPiercing,
// /*01216*/ SkillNone, // This needs to move down as new skills are added
// Skill Counts
// /*-----*/ _SkillCount_62 = 75, // use for Ti and earlier max skill checks
// /*-----*/ _SkillCount_SoF = 77, // use for SoF thru RoF1 max skill checks
// /*-----*/ _SkillCount_RoF2 = 78, // use for RoF2 max skill checks
// Support values
// /*-----*/ _SkillServerArraySize = _SkillCount_RoF2, // Should reflect last client '_SkillCount'
// /*-----*/ _SkillPacketArraySize = 100, // Currently supported clients appear to iterate full 100 dword buffer range
// Superfluous additions to SkillUseTypes..server-use only
// /*-----*/ ExtSkillGenericTradeskill = 100
/* ([EQClientVersion] [0] - Unknown, [3] - SoF, [7] - RoF2[05-10-2013])
[Skill] [index] | [0] [1] [2] [3] [4] [5] [6] [7]
Frenzy (05837) | --- 074 074 074 074 074 074 074
Remove Traps (03670) | --- --- --- 075 075 075 075 075
Triple Attack (13049) | --- --- --- 076 076 076 076 076
2H Piercing (00789) | --- --- --- --- --- --- --- 077
*/
/*
[SkillCaps.txt] (SoF+)
a^b^c^d(^e) (^e is RoF+, but cursory glance appears to be all zeros)
a - Class
b - Skill
c - Level
d - Max Value
(e - Unknown)
*/
/*
NOTE: Disregard this until it is sorted out
I changed (tradeskill==75) to ExtSkillGenericTradeskill in tradeskills.cpp for both instances. If it's a pseudo-enumeration of
an AA ability, then use the 'ExtSkill' ('ExtentedSkill') prefix with a value >= 100. (current implementation)
We probably need to recode ALL of the skill checks to use the new Skill2HPiercing and ensure that the animation value is
properly changed in the patch files. As far as earlier clients using this new skill, it can be done, but we just need to ensure
that skill address is not inadvertently passed to the client..and we can just send an actual message for the skill-up. Use of a
command can tell the player what that particular skill value is.
Nothing on SkillTripleAttack just yet..haven't looked into its current implementation.
In addition to the above re-coding, we're probably going to need to rework the database pp blob to reserve space for the current
100-dword buffer allocation. This way, we can just add new ones without having to rework it each time.
-U
*/
};
// temporary until it can be sorted out...
#define HIGHEST_SKILL SkillFrenzy
// TODO: add string return for skill names
/*
** Old typedef enumeration
**
*/
/* Correct Skill Numbers as of 4-14-2002
typedef enum {
_1H_BLUNT = 0,
_1H_SLASHING = 1,
@@ -99,6 +257,6 @@ typedef enum {
} SkillType;
#define HIGHEST_SKILL FRENZY
*/
#endif
+1 -1
View File
@@ -641,7 +641,7 @@ struct SPDat_Spell_Struct
/* 086 */ int effectid[EFFECT_COUNT]; // Spell's effects
/* 098 */ SpellTargetType targettype; // Spell's Target
/* 099 */ int basediff; // base difficulty fizzle adjustment
/* 100 */ SkillType skill;
/* 100 */ SkillUseTypes skill;
/* 101 */ int8 zonetype; // 01=Outdoors, 02=dungeons, ff=Any
/* 102 */ int8 EnvironmentType;
/* 103 */ int8 TimeOfDay;