(lockId string)
| 305 | } |
| 306 | |
| 307 | func (c *Character) FindKeyInBackpack(lockId string) (items.Item, bool) { |
| 308 | |
| 309 | lockId = strings.ToLower(lockId) |
| 310 | |
| 311 | for _, itm := range c.GetAllBackpackItems() { |
| 312 | itmSpec := itm.GetSpec() |
| 313 | if itmSpec.Type != items.Key { |
| 314 | continue |
| 315 | } |
| 316 | |
| 317 | if itmSpec.KeyLockId == lockId { |
| 318 | return itm, true |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | return items.Item{}, false |
| 323 | } |
| 324 | |
| 325 | func (c *Character) HasKey(lockId string, difficulty int) (hasKey bool, hasSequence bool) { |
| 326 |
no test coverage detected