jhakonen / wot-teamspeak-mod

Mod for integrating TeamSpeak into World of Tanks
GNU Lesser General Public License v2.1
36 stars 8 forks source link

Bug with tessumod in 1.10.0.4 #40

Open Willster419 opened 4 years ago

Willster419 commented 4 years ago

Hi, There's a bug with the mod in 1.10.0.4:

2020-10-09 14:48:09.687: ERROR: [EXCEPTION] (scripts/common/Event.py, 46):
Traceback (most recent call last):
  File "scripts/common/Event.py", line 44, in __call__
  File "scripts/client/gui/Scaleform/daapi/view/battle/shared/minimap/plugins.py", line 568, in __onMinimapFeedbackReceived
ValueError: too many values to unpack

2020-10-09 14:48:09.687: ERROR: Traceback (most recent call last):
2020-10-09 14:48:09.687: ERROR:   File "/res/scripts/client/gui/mods/tessumod/utils.py", line 354, in _repeat
2020-10-09 14:48:09.687: ERROR:   File "/res/scripts/client/gui/mods/tessumod/utils.py", line 363, in _updateMinimap
2020-10-09 14:48:09.687: ERROR:   File "scripts/common/Event.py", line 44, in __call__
2020-10-09 14:48:09.687: ERROR:   File "scripts/client/gui/Scaleform/daapi/view/battle/shared/minimap/plugins.py", line 568, in __onMinimapFeedbackReceived
2020-10-09 14:48:09.687: ERROR: ValueError: too many values to unpack

My guess is the method args needs to be updated?

Willster419 commented 4 years ago

here's the latest plugins.py plugins.py.txt

jhakonen commented 4 years ago

Looks like the updated game code now expects the last parameter, value, to be a a list or tuple, and the marker is the 2nd value in the list/tuple. So this:

g_sessionProvider.shared.feedback.onMinimapFeedbackReceived(
    FEEDBACK_EVENT_ID.MINIMAP_SHOW_MARKER, self._vehicle_id, self._action)

Needs to be this:

g_sessionProvider.shared.feedback.onMinimapFeedbackReceived(
    FEEDBACK_EVENT_ID.MINIMAP_SHOW_MARKER, self._vehicle_id, (???, self._action))

Not sure what the 1st value should be.

Also note that I'm not really finding much time to work on this anymore. So it might take a while before I can fix this. I should probably just mark this mod as unmaintained as I'm not really giving it the attention anymore that it should receive.

negril commented 3 years ago

The code in 1.9:

    def __onMinimapFeedbackReceived(self, eventID, entityID, value):
        if eventID == FEEDBACK_EVENT_ID.MINIMAP_SHOW_MARKER and self.__animationID:
            if avatar_getter.getVehicleIDAttached() == entityID:
                self._invoke(self.__animationID, 'setAnimation', value)

The code in 1.10.1:

    def __onMinimapFeedbackReceived(self, eventID, entityID, value):
        if eventID == FEEDBACK_EVENT_ID.MINIMAP_SHOW_MARKER and entityID != self.__playerVehicleID:
            if entityID in self._entries:
                entry = self._entries[entityID]
                if (self.__isObserver or not avatar_getter.isVehicleAlive()) and avatar_getter.getVehicleIDAttached() == entityID:
                    return
                marker, _ = entry.isInAoI() and value
                self._invoke(entry.getID(), 'setAnimation', marker)

as seen here: https://github.com/StranikS-Scan/WorldOfTanks-Decompiled/blob/1.10.1/source/res/scripts/client/gui/Scaleform/daapi/view/battle/shared/minimap/plugins.py#L932

I'd assume (self._action, None) should work?