Commit d02368d3cf34ad5ca22e5e15cf3d69f04ab7b2d8
1 parent
0719a220
数据保护
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
src/models/RolePlugin.lua
@@ -260,6 +260,7 @@ function RolePlugin.bind(Role) | @@ -260,6 +260,7 @@ function RolePlugin.bind(Role) | ||
260 | 260 | ||
261 | function Role:addItem(params) | 261 | function Role:addItem(params) |
262 | params = params or {} | 262 | params = params or {} |
263 | + params.count = math.floor(params.count or 0) | ||
263 | if params.itemId == ItemId.Diamond then | 264 | if params.itemId == ItemId.Diamond then |
264 | self:gainDiamond(params) | 265 | self:gainDiamond(params) |
265 | return | 266 | return |