Added a give command to the default command set. As part of this also fixed some bugs in how object typeclasses were compared.

This commit is contained in:
Griatch 2012-12-08 17:11:22 +01:00
parent 949da47917
commit c615693a2a
8 changed files with 53 additions and 21 deletions

View file

@ -387,13 +387,11 @@ class Object(TypeClass):
parent doesn't work.
"""
try:
return _GA(_GA(self, "dbobj"),"dbid") == other \
or _GA(_GA(self, "dbobj"),"dbid") == _GA(_GA(other,"dbobj"),"dbid")
return _GA(_GA(self, "dbobj"),"dbid") == _GA(_GA(other,"dbobj"),"dbid")
except AttributeError:
# compare players instead
try:
return _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == other \
or _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == _GA(_GA(other, "player"),"uid")
return _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == _GA(_GA(other, "player"),"uid")
except AttributeError:
return False