浏览代码

Database Cache Fix, Pre-Re Monster Cleanup (#8289)

- Fixed a problem that caused the DB cache to always be missing the last entry
- Removed renewal monsters from pre-re/mob_db.yml
Playtester 1 年之前
父节点
当前提交
16e9d52204
共有 2 个文件被更改,包括 1 次插入100 次删除
  1. 0 99
      db/pre-re/mob_db.yml
  2. 1 1
      src/common/database.hpp

+ 0 - 99
db/pre-re/mob_db.yml

@@ -41618,102 +41618,3 @@ Body:
     AttackMotion: 480
     AttackMotion: 480
     DamageMotion: 864
     DamageMotion: 864
     Ai: 20
     Ai: 20
-  - Id: 2158
-    AegisName: S_HORNET
-    Name: Hornet
-    Level: 1
-    Hp: 60
-    BaseExp: 27
-    JobExp: 20
-    Attack: 8
-    Attack2: 9
-    Defense: 2
-    MagicDefense: 5
-    Str: 6
-    Int: 0
-    Dex: 6
-    Luk: 5
-    AttackRange: 1
-    SkillRange: 10
-    ChaseRange: 12
-    Size: Medium
-    Race: Plant
-    Element: Water
-    ElementLevel: 1
-    WalkSpeed: 400
-    AttackDelay: 1872
-    AttackMotion: 672
-    DamageMotion: 480
-    Ai: 02
-  - Id: 2159
-    AegisName: S_GIANT_HORNET
-    Name: Giant Hornet
-    Level: 1
-    Hp: 60
-    BaseExp: 27
-    JobExp: 20
-    Attack: 8
-    Attack2: 9
-    Defense: 2
-    MagicDefense: 5
-    Str: 6
-    Int: 0
-    Dex: 6
-    Luk: 5
-    AttackRange: 1
-    SkillRange: 10
-    ChaseRange: 12
-    Size: Medium
-    Race: Plant
-    Element: Water
-    ElementLevel: 1
-    WalkSpeed: 400
-    AttackDelay: 1872
-    AttackMotion: 672
-    DamageMotion: 480
-    Ai: 02
-  - Id: 2160
-    AegisName: S_LUCIOLA_VESPA
-    Name: Luciola Vespa
-    Level: 1
-    Hp: 60
-    BaseExp: 27
-    JobExp: 20
-    Attack: 8
-    Attack2: 9
-    Defense: 2
-    MagicDefense: 5
-    Str: 6
-    Int: 0
-    Dex: 6
-    Luk: 5
-    AttackRange: 1
-    SkillRange: 10
-    ChaseRange: 12
-    Size: Medium
-    Race: Plant
-    Element: Water
-    ElementLevel: 1
-    WalkSpeed: 400
-    AttackDelay: 1872
-    AttackMotion: 672
-    DamageMotion: 480
-    Ai: 02
-  - Id: 2308
-    AegisName: KO_ZANZOU
-    Name: Zanzou
-    Level: 1
-    Hp: 50
-    Attack: 1
-    Attack2: 1
-    AttackRange: 1
-    SkillRange: 1
-    ChaseRange: 1
-    Size: Medium
-    Race: Demihuman
-    Element: Neutral
-    ElementLevel: 1
-    WalkSpeed: 400
-    AttackDelay: 1872
-    AttackMotion: 672
-    DamageMotion: 480

+ 1 - 1
src/common/database.hpp

@@ -205,7 +205,7 @@ public:
 		}
 		}
 
 
 		// Resize to only fit all existing non null entries
 		// Resize to only fit all existing non null entries
-		this->cache.resize(max_key);
+		this->cache.resize(max_key + 1);
 		// Free the memory that was allocated too much
 		// Free the memory that was allocated too much
 		this->cache.shrink_to_fit();
 		this->cache.shrink_to_fit();
 		this->loaded = true;
 		this->loaded = true;