(lockId string, difficulty int)
| 323 | } |
| 324 | |
| 325 | func (c *Character) HasKey(lockId string, difficulty int) (hasKey bool, hasSequence bool) { |
| 326 | |
| 327 | sequence := util.GetLockSequence(lockId, difficulty, string(configs.GetServerConfig().Seed)) |
| 328 | |
| 329 | // Check whether they ahve a key for this lock |
| 330 | return c.GetKey(`key-`+lockId) != ``, c.GetKey(lockId) == sequence |
| 331 | } |
| 332 | |
| 333 | func (c *Character) KeyCount() int { |
| 334 | if c.KeyRing == nil { |
no test coverage detected