mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
DANIEL: Fix whispering
This commit is contained in:
parent
eab3216fd8
commit
e082fecf0b
2 changed files with 12 additions and 9 deletions
|
@ -65,15 +65,18 @@ class TTSFriendsManager(DistributedObjectGlobal):
|
||||||
if not hasattr(base.localAvatar, 'getTeleportAvailable') or not hasattr(base.localAvatar, 'ghostMode'):
|
if not hasattr(base.localAvatar, 'getTeleportAvailable') or not hasattr(base.localAvatar, 'ghostMode'):
|
||||||
self.sendUpdate('teleportResponse', [ fromId, 0, 0, 0, 0 ])
|
self.sendUpdate('teleportResponse', [ fromId, 0, 0, 0, 0 ])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
friend = base.cr.identifyFriend(fromId)
|
||||||
|
|
||||||
if not base.localAvatar.getTeleportAvailable() or base.localAvatar.ghostMode:
|
if not base.localAvatar.getTeleportAvailable() or base.localAvatar.ghostMode:
|
||||||
if hasattr(base.cr.identifyFriend(fromId), 'getName'):
|
if hasattr(friend, 'getName'):
|
||||||
base.localAvatar.setSystemMessage(fromId, OTPLocalizer.WhisperFailedVisit % base.cr.identifyFriend(fromId).getName())
|
base.localAvatar.setSystemMessage(fromId, OTPLocalizer.WhisperFailedVisit % friend.getName())
|
||||||
self.sendUpdate('teleportResponse', [ fromId, 0, 0, 0, 0 ])
|
self.sendUpdate('teleportResponse', [ fromId, 0, 0, 0, 0 ])
|
||||||
return
|
return
|
||||||
|
|
||||||
hoodId = base.cr.playGame.getPlaceId()
|
hoodId = base.cr.playGame.getPlaceId()
|
||||||
if hasattr(base.cr.identifyFriend(fromId), 'getName'):
|
if hasattr(friend, 'getName'):
|
||||||
base.localAvatar.setSystemMessage(fromId, OTPLocalizer.WhisperComingToVisit % base.cr.identifyFriend(fromId).getName())
|
base.localAvatar.setSystemMessage(fromId, OTPLocalizer.WhisperComingToVisit % friend.getName())
|
||||||
self.sendUpdate('teleportResponse', [
|
self.sendUpdate('teleportResponse', [
|
||||||
fromId,
|
fromId,
|
||||||
base.localAvatar.getTeleportAvailable(),
|
base.localAvatar.getTeleportAvailable(),
|
||||||
|
|
|
@ -478,7 +478,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
||||||
return isinstance(source, (DistributedToon, FriendHandle.FriendHandle))
|
return isinstance(source, (DistributedToon, FriendHandle.FriendHandle))
|
||||||
|
|
||||||
def setWhisperSCEmoteFrom(self, fromId, emoteId):
|
def setWhisperSCEmoteFrom(self, fromId, emoteId):
|
||||||
handle = base.cr.identifyFriend(fromId)
|
handle = base.cr.identifyAvatar(fromId)
|
||||||
if handle == None:
|
if handle == None:
|
||||||
return
|
return
|
||||||
if not self._isValidWhisperSource(handle):
|
if not self._isValidWhisperSource(handle):
|
||||||
|
@ -490,7 +490,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
||||||
if base.localAvatar.isIgnored(fromId):
|
if base.localAvatar.isIgnored(fromId):
|
||||||
return
|
return
|
||||||
if base.localAvatar.sleepFlag == 1:
|
if base.localAvatar.sleepFlag == 1:
|
||||||
if not base.cr.identifyAvatar(fromId) == base.localAvatar:
|
if not handle == base.localAvatar:
|
||||||
base.cr.ttsFriendsManager.d_sleepAutoReply(fromId)
|
base.cr.ttsFriendsManager.d_sleepAutoReply(fromId)
|
||||||
chatString = SCDecoders.decodeSCEmoteWhisperMsg(emoteId, handle.getName())
|
chatString = SCDecoders.decodeSCEmoteWhisperMsg(emoteId, handle.getName())
|
||||||
if chatString:
|
if chatString:
|
||||||
|
@ -499,7 +499,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
||||||
return
|
return
|
||||||
|
|
||||||
def setWhisperSCFrom(self, fromId, msgIndex):
|
def setWhisperSCFrom(self, fromId, msgIndex):
|
||||||
handle = base.cr.identifyFriend(fromId)
|
handle = base.cr.identifyAvatar(fromId)
|
||||||
if handle == None:
|
if handle == None:
|
||||||
return
|
return
|
||||||
if not self._isValidWhisperSource(handle):
|
if not self._isValidWhisperSource(handle):
|
||||||
|
@ -511,7 +511,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
||||||
if base.localAvatar.isIgnored(fromId):
|
if base.localAvatar.isIgnored(fromId):
|
||||||
return
|
return
|
||||||
if base.localAvatar.sleepFlag == 1:
|
if base.localAvatar.sleepFlag == 1:
|
||||||
if not base.cr.identifyAvatar(fromId) == base.localAvatar:
|
if not handle == base.localAvatar:
|
||||||
base.cr.ttsFriendsManager.d_sleepAutoReply(fromId)
|
base.cr.ttsFriendsManager.d_sleepAutoReply(fromId)
|
||||||
chatString = SCDecoders.decodeSCStaticTextMsg(msgIndex)
|
chatString = SCDecoders.decodeSCStaticTextMsg(msgIndex)
|
||||||
if chatString:
|
if chatString:
|
||||||
|
@ -536,7 +536,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
||||||
)
|
)
|
||||||
|
|
||||||
def setWhisperSCToontaskFrom(self, fromId, taskId, toNpcId, toonProgress, msgIndex):
|
def setWhisperSCToontaskFrom(self, fromId, taskId, toNpcId, toonProgress, msgIndex):
|
||||||
sender = base.cr.identifyFriend(fromId)
|
sender = base.cr.identifyAvatar(fromId)
|
||||||
if sender is None:
|
if sender is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue