Skip to content

Commit

Permalink
Merge pull request #1333 from WinterSolstice8/feature/enable_rune_fen…
Browse files Browse the repository at this point in the history
…cer_merits

Enable Rune Fencer merits
  • Loading branch information
claywar authored Feb 27, 2022
2 parents 9c64f9e + 7bdc3e7 commit 2a25a07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions sql/merits.sql
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ INSERT INTO `merits` VALUES (1730,'ecliptic_attrition_recast',5,10,1048576,6,26)
INSERT INTO `merits` VALUES (1732,'life_cycle_recast',5,20,1048576,6,26);
INSERT INTO `merits` VALUES (1734,'blaze_of_glory_recast',5,20,1048576,6,26);
INSERT INTO `merits` VALUES (1736,'dematerialize_recast',5,20,1048576,6,26);
INSERT INTO `merits` VALUES (1792,'rune_enchantment_effect',5,2,2097152,6,27);
INSERT INTO `merits` VALUES (1794,'vallation_effect',5,1,2097152,6,27);
INSERT INTO `merits` VALUES (1796,'lunge_effect',5,3,2097152,6,27);
INSERT INTO `merits` VALUES (1798,'pflug_effect',5,1,2097152,6,27);
INSERT INTO `merits` VALUES (1800,'gambit_recast',5,10,2097152,6,27);
INSERT INTO `merits` VALUES (2048,'warriors_charge',5,5,1,7,31);
INSERT INTO `merits` VALUES (2050,'tomahawk',5,15,1,7,31);
INSERT INTO `merits` VALUES (2052,'savagery',5,100,1,7,31);
Expand Down Expand Up @@ -306,3 +311,7 @@ INSERT INTO `merits` VALUES (3392,'mending_halation',5,5,1048576,7,52);
INSERT INTO `merits` VALUES (3394,'radial_arcana',5,3,1048576,7,52);
INSERT INTO `merits` VALUES (3396,'curative_recantation',5,5,1048576,7,52);
INSERT INTO `merits` VALUES (3398,'primeval_zeal',5,10,1048576,7,52);
INSERT INTO `merits` VALUES (3456,'battuta',5,4,2097152,7,53);
INSERT INTO `merits` VALUES (3458,'rayke',5,3,2097152,7,53);
INSERT INTO `merits` VALUES (3460,'inspiration',5,10,2097152,7,53);
INSERT INTO `merits` VALUES (3462,'sleight_of_sword',5,5,2097152,7,53);
10 changes: 5 additions & 5 deletions src/map/merit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static const MeritCategoryInfo_t meritCatInfo[] = {
{ 14, 15, 8 }, // MCATEGORY_WS catNumber 25

{ 5, 10, 6 }, // MCATEGORY_GEO_1 catNumber 26
{ 0, 0, 6 }, // MCATEGORY_RUN_1 catNumber 27 (not in yet)
{ 5, 10, 6 }, // MCATEGORY_RUN_1 catNumber 27

{ 0, 0, 8 }, // MCATEGORY_UNK_0 catNumber 28
{ 0, 0, 8 }, // MCATEGORY_UNK_1 catNumber 29
Expand Down Expand Up @@ -145,7 +145,7 @@ static const MeritCategoryInfo_t meritCatInfo[] = {
{ 6, 10, 7 }, // MCATEGORY_SHC_2 catNumber 50
{ 0, 0, 8 }, // MCATEGORY_UNK_3 catNumber 51
{ 4, 10, 7 }, // MCATEGORY_GEO_2 catNumber 52
{ 0, 0, 7 }, // MCATEGORY_RUN_2 catNumber 53 (not in yet)
{ 4, 10, 7 }, // MCATEGORY_RUN_2 catNumber 53
};

#define GetMeritCategory(merit) (((merit) >> 6) - 1) // получаем категорию из merit
Expand Down Expand Up @@ -200,9 +200,9 @@ void CMeritPoints::LoadMeritPoints(uint32 charid)

for (uint16 i = 0; i < MERITS_COUNT; ++i)
{
if ((catNumber <= maxCatCount && i == meritNameSpace::groupOffset[catNumber]) || (catNumber > 26 && catNumber < 31) || catNumber == 51)
if ((catNumber <= maxCatCount && i == meritNameSpace::groupOffset[catNumber]) || (catNumber > 27 && catNumber < 31) || catNumber == 51) // Increment category number if known (or known unknown)
{
if ((catNumber > 26 && catNumber < 31) || catNumber == 51)
if ((catNumber > 27 && catNumber < 31) || catNumber == 51) // 28-30 are UNK, 51 is UNK.
{
Categories[catNumber] = &merits[163]; // point these to valid merits to prevent crash
}
Expand Down Expand Up @@ -352,7 +352,7 @@ bool CMeritPoints::IsMeritExist(MERIT_TYPE merit)
{
return false;
}
if ((int16)merit >= MCATEGORY_COUNT)
if ((int16)merit > MCATEGORY_COUNT)
{
return false;
}
Expand Down

0 comments on commit 2a25a07

Please sign in to comment.