def onUnitPlayerBecomeCreator(self, pInfo): if pInfo.isCurrentPlayer(): self._showLeadershipNotification() chat = self.chat if chat: chat.as_addMessageS( messages.getUnitPlayerNotification( settings.UNIT_NOTIFICATION_KEY.GIVE_LEADERSHIP, pInfo))
def onUnitPlayerBecomeCreator(self, pInfo): if pInfo.isCurrentPlayer(): self._showLeadershipNotification() chat = self.chat if chat: chat.as_addMessageS( messages.getUnitPlayerNotification(settings.UNIT_NOTIFICATION_KEY.GIVE_LEADERSHIP, pInfo) )
def __addPlayerNotification(self, key, pInfo): chat = self.chat if chat and not pInfo.isCurrentPlayer(): chat.as_addMessageS(messages.getUnitPlayerNotification(key, pInfo))