diff --git a/ChangeLog b/ChangeLog index 6e0e1418e..de03974ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-05-20 23:45 Daniel Hawkins + + * python/dialog/npc_dialog.py: Replace deprecated call to dict.has_key() + * python/CFDialog.py: Replace deprecated call to dict.has_key() + 2016-05-17 17:26 Daniel Hawkins * scorn/misc/HouseofHealing: Made the information books start identified. diff --git a/python/CFDialog.py b/python/CFDialog.py index 7957e2c46..7c0079fab 100644 --- a/python/CFDialog.py +++ b/python/CFDialog.py @@ -212,7 +212,7 @@ class Dialog: key = self.uniqueKey() replies = None - if Crossfire.GetPrivateDictionary().has_key(key): + if key in Crossfire.GetPrivateDictionary(): replies = Crossfire.GetPrivateDictionary()[key] Crossfire.GetPrivateDictionary()[key] = None diff --git a/python/dialog/npc_dialog.py b/python/dialog/npc_dialog.py index a9a220606..93d89a10b 100644 --- a/python/dialog/npc_dialog.py +++ b/python/dialog/npc_dialog.py @@ -103,7 +103,7 @@ index = 0; for jsonRule in dialogs: replies = None - if jsonRule.has_key('replies'): + if 'replies' in jsonRule: replies = jsonRule['replies'] rule = DialogRule(jsonRule["match"], jsonRule["pre"],