mirror of
https://github.com/evennia/evennia.git
synced 2026-03-17 05:16:31 +01:00
Fixed a bug in object's __eq__ that returned erroneous fails.
This commit is contained in:
parent
2a2b3b5ce6
commit
0d1f9d5bdc
2 changed files with 5 additions and 5 deletions
|
|
@ -362,13 +362,13 @@ class Object(TypeClass):
|
|||
parent doesn't work.
|
||||
"""
|
||||
try:
|
||||
return _GA(self, "dbid") == other \
|
||||
or _GA(self, "dbid") == _GA(other, "dbid")
|
||||
return _GA(_GA(self, "dbobj"),"dbid") == other \
|
||||
or _GA(_GA(self, "dbobj"),"dbid") == _GA(_GA(other,"dbobj"),"dbid")
|
||||
except AttributeError:
|
||||
# compare players instead
|
||||
try:
|
||||
return _GA(_GA(self, "player"),"uid") == other \
|
||||
or _GA(_GA(self, "player"),"uid") == _GA(_GA(other, "player"),"uid")
|
||||
return _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == other \
|
||||
or _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == _GA(_GA(other, "player"),"uid")
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue