diff --git a/toontown/ai/QuestManagerAI.py b/toontown/ai/QuestManagerAI.py index 0b19cf87..eb873672 100755 --- a/toontown/ai/QuestManagerAI.py +++ b/toontown/ai/QuestManagerAI.py @@ -476,7 +476,20 @@ class QuestManagerAI: pass def toonKilledCogs(self, av, suitsKilled, zoneId, activeToonList): - pass + avQuests = av.getQuests() + questList = [] + + for i in xrange(0, len(avQuests), 5): + questDesc = avQuests[i : i + 5] + questClass = Quests.getQuest(questDesc[QuestIdIndex]) + + if isinstance(questClass, Quests.CogQuest): + for suit in suitsKilled: + for x in xrange(questClass.doesCogCount(av.getDoId(), suit, zoneId, activeToonList)): + questDesc[QuestProgressIndex] += 1 + + questList.append(questDesc) + av.b_setQuests(questList) @magicWord(category=CATEGORY_PROGRAMMER, types=[str, int, int]) def quests(command, arg0=0, arg1=0): diff --git a/toontown/battle/RewardPanel.py b/toontown/battle/RewardPanel.py index 1d2468ed..c95be6a5 100755 --- a/toontown/battle/RewardPanel.py +++ b/toontown/battle/RewardPanel.py @@ -622,16 +622,8 @@ class RewardPanel(DirectFrame): earned = itemList.count(questItem) else: for cogDict in cogList: - if cogDict['isVP']: - num = quest.doesVPCount(avId, cogDict, zoneId, toonShortList) - elif cogDict['isCFO']: - num = quest.doesCFOCount(avId, cogDict, zoneId, toonShortList) - elif cogDict['isCJ']: - num = quest.doesCJCount(avId, cogDict, zoneId, toonShortList) - elif cogDict['isCEO']: - num = quest.doesCEOCount(avId, cogDict, zoneId, toonShortList) - else: - num = quest.doesCogCount(avId, cogDict, zoneId, toonShortList) + num = quest.doesCogCount(avId, cogDict, zoneId, toonShortList) + if num: if base.config.GetBool('battle-passing-no-credit', True): if avId in helpfulToonsList: diff --git a/toontown/quest/Quests.py b/toontown/quest/Quests.py index c0c591d8..cd140a00 100755 --- a/toontown/quest/Quests.py +++ b/toontown/quest/Quests.py @@ -358,18 +358,6 @@ class Quest: def doesCogCount(self, avId, cogDict, zoneId, avList): return 0 - def doesVPCount(self, avId, cogDict, zoneId, avList): - return 0 - - def doesCFOCount(self, avId, cogDict, zoneId, avList): - return 0 - - def doesCJCount(self, avId, cogDict, zoneId, avList): - return 0 - - def doesCEOCount(self, avId, cogDict, zoneId, avList): - return 0 - def doesFactoryCount(self, avId, location, avList): return 0