Jump to content
Korean Random
OlliN

Script issue, help needed

Recommended Posts

 

 

XVMInstalled is true and working print commands are T1 & T2
 

i'm sorry but i don't see T2 printed.

moreover, check missing underscore:

 

 

    XVMInstalled = True except:     XVMInstalled = False
 

 

 

if XVM_Installed:
 

Share this post


Link to post

Short link
Share on other sites

moreover, check missing underscore:

 

 

Just a copy & paste error while writing the post, it's correct in the script.

Share this post


Link to post

Short link
Share on other sites

Can't get the hook working, am I doing something wrong?

import BigWorld
from gui.scaleform.daapi.view.battle.shared.postmortem_panel import PostmortemPanel
from gui.shared.gui_items import Vehicle
from helpers import int2roman
_VEHICLE_SMALL_ICON_RES_PATH = '../maps/icons/vehicle/small/{0}.png'

def new_showOwnDeathInfo(self):
    print 'Test'
    if self.__deathAlreadySet:
        self.as_showDeadReasonS()
    else:
        deathInfo = self.getDeathInfo()
        if deathInfo:
            reason = self.__makeReasonInfo(deathInfo)
            killerVehID = deathInfo['killerVehicle']
            battleCtx = self.sessionProvider.getCtx()
            if killerVehID and not battleCtx.isCurrentPlayer(killerVehID) and battleCtx.getArenaDP().getVehicleInfo(killerVehID).vehicleType.compactDescr:
                showVehicle = True
                vTypeInfoVO = battleCtx.getArenaDP().getVehicleInfo(killerVehID).vehicleType
                vehLvl = int2roman(vTypeInfoVO.level)
                vehImg = _VEHICLE_SMALL_ICON_RES_PATH.format(vTypeInfoVO.iconName)
                vehClass = Vehicle.getTypeBigIconPath(vTypeInfoVO.classTag, False)
                vehName = vTypeInfoVO.shortNameWithPrefix
            else:
                showVehicle = False
                vehLvl = vehImg = vehClass = vehName = None
            self.as_setDeadReasonInfoS(reason, showVehicle, None, vehImg, None, vehName)
            self.__deathAlreadySet = True
        else:
            self.as_setDeadReasonInfoS('', False, None, None, None, None)
    return

PostmortemPanel._PostmortemPanel__showOwnDeathInfo = new_showOwnDeathInfo

Share this post


Link to post

Short link
Share on other sites

 

Can't get the hook working, am I doing something wrong?

from gui.Scaleform.daapi.view.meta.PostmortemPanelMeta import PostmortemPanelMeta

def new_as_setDeadReasonInfoS(self, reason, showVehicle, vehicleLevel, vehicleImg, vehicleType, vehicleName):
    return self.flashObject.as_setDeadReasonInfo(reason, showVehicle, None, vehicleImg, None, vehicleName) if self._isDAAPIInited() else None


PostmortemPanelMeta.as_setDeadReasonInfoS = new_as_setDeadReasonInfoS
Edited by Ekspoint
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

 

Can't get the hook working, am I doing something wrong?

 

I have no idea without datails - how did you load your hook and what is inside python.log?

Edited by aks1983

Share this post


Link to post

Short link
Share on other sites
from gui.Scaleform.daapi.view.meta.PostmortemPanelMeta import PostmortemPanelMeta

def new_as_setDeadReasonInfoS(self, reason, showVehicle, vehicleLevel, vehicleImg, vehicleType, vehicleName):
    return self.flashObject.as_setDeadReasonInfo(reason, showVehicle, None, vehicleImg, None, vehicleName) if self._isDAAPIInited() else None


PostmortemPanelMeta.as_setDeadReasonInfoS = new_as_setDeadReasonInfoS

 

Thanks a lot.

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...