Jump to content

[PATCH for DB-devs] Additional DB errors related to achievs


Schmoozerd

Recommended Posts

I noted today that for a few achievement criteria types we require entries in

`achievement_criteria_requirement` in the world-db, but that we don't throw errors them if they don't have db entries.

This patch would add throwing errors for criterias of types

* ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET

* ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2

* ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN

However I see no use to directly push this patch in haste.

So I suggest you use this patch locally, add db-entries (likely (id, 0, 0, 0) or (id, 11, 0, 0) ) for missing types, and when you have released updatepacks which fix them you notify and I can push this change to master.

diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp
index ca38d9f..fc21e3e 100644
--- a/src/game/AchievementMgr.cpp
+++ b/src/game/AchievementMgr.cpp
@@ -2345,8 +2345,6 @@ void AchievementGlobalMgr::LoadAchievementCriteriaRequirements()
                if(!criteria->win_bg.additionalRequirement1_type && !criteria->win_bg.additionalRequirement2_type)
                    continue;
                break;
-            case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE:
-                break;                                      // any cases
            case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST:
            {
                AchievementEntry const* achievement = sAchievementStore.LookupEntry(criteria->referredAchievement);
@@ -2367,32 +2365,35 @@ void AchievementGlobalMgr::LoadAchievementCriteriaRequirements()
                        continue;
                }
            }
-            case ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING:
-                break;                                      // any cases
-            case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL:      // any cases
-                break;
            case ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA: // need skip generic cases
                if(criteria->win_rated_arena.flag!=ACHIEVEMENT_CRITERIA_CONDITION_NO_LOOSE)
                    continue;
                break;
-            case ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM: // any cases
-                break;
            case ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE:        // need skip generic cases
                if(criteria->do_emote.count==0)
                    continue;
                break;
-            case ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL:// any cases
-                break;
            case ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL:        // skip statistics
                if(criteria->win_duel.duelCount==0)
                    continue;
                break;
-            case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2:     // any cases
-                break;
            case ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE:       // need skip generic cases
                if(criteria->loot_type.lootTypeCount!=1)
                    continue;
                break;
+
+            // any cases
+            case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE:
+            case ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING:
+            case ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET:
+            case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL:
+            case ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM:
+            case ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2:
+            case ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL:
+            case ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN:
+            case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2:
+                break;
+
            default:                                        // type not use DB data, ignore
                continue;
        }

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use