Commit e7c05b3
committed
Refactor bank stack withdraw logic
- Reworked bank stacked withdraw flow to be DB-authoritative with cache reconciliation
- Added inventory rails to prevent over-withdraw, slot overflow, and multi-stack loss
- Implemented merge-first logic with fallback to empty inventory slot when required
- Ensured consistent behavior across NPC withdraw, bundled withdraw, and edge cases
- Left SQL procedures unchanged; correctness enforced at code boundary
- Introduced PlayerSaveDirty flag on Aisling to track unsaved state
- Added PlayerDirtySaveComponent to persist only dirty players on a short interval
- Dirty flag is set on GiveTo() and cleared after successful DB commit
- Avoids unnecessary full-server saves while preserving crash safety guarantees
Overall:
- Banking is now deterministic, loss-safe, and MMO-consistent
- Player saving is more granular, efficient, and intention-driven1 parent 6057fb1 commit e7c05b3
File tree
12 files changed
+1515
-435
lines changed- Server.Configurations/ZolianPlayers
- Zolian.Server.Base
- Database
- Enums
- GameScripts/Mundanes/Generic
- Managers
- Network
- Components
- Server
- Sprites/Entity
- Types
12 files changed
+1515
-435
lines changedLines changed: 396 additions & 66 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
25 | 43 | | |
26 | 44 | | |
27 | 45 | | |
| |||
35 | 53 | | |
36 | 54 | | |
37 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
38 | 69 | | |
39 | 70 | | |
40 | 71 | | |
| |||
57 | 88 | | |
58 | 89 | | |
59 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
60 | 113 | | |
61 | 114 | | |
62 | 115 | | |
| |||
79 | 132 | | |
80 | 133 | | |
81 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
82 | 157 | | |
83 | 158 | | |
84 | 159 | | |
| |||
94 | 169 | | |
95 | 170 | | |
96 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
97 | 187 | | |
98 | 188 | | |
99 | 189 | | |
| |||
115 | 205 | | |
116 | 206 | | |
117 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
118 | 230 | | |
0 commit comments