mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06: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'):
|
||||
self.sendUpdate('teleportResponse', [ fromId, 0, 0, 0, 0 ])
|
||||
return
|
||||
|
||||
friend = base.cr.identifyFriend(fromId)
|
||||
|
||||
if not base.localAvatar.getTeleportAvailable() or base.localAvatar.ghostMode:
|
||||
if hasattr(base.cr.identifyFriend(fromId), 'getName'):
|
||||
base.localAvatar.setSystemMessage(fromId, OTPLocalizer.WhisperFailedVisit % base.cr.identifyFriend(fromId).getName())
|
||||
if hasattr(friend, 'getName'):
|
||||
base.localAvatar.setSystemMessage(fromId, OTPLocalizer.WhisperFailedVisit % friend.getName())
|
||||
self.sendUpdate('teleportResponse', [ fromId, 0, 0, 0, 0 ])
|
||||
return
|
||||
|
||||
hoodId = base.cr.playGame.getPlaceId()
|
||||
if hasattr(base.cr.identifyFriend(fromId), 'getName'):
|
||||
base.localAvatar.setSystemMessage(fromId, OTPLocalizer.WhisperComingToVisit % base.cr.identifyFriend(fromId).getName())
|
||||
if hasattr(friend, 'getName'):
|
||||
base.localAvatar.setSystemMessage(fromId, OTPLocalizer.WhisperComingToVisit % friend.getName())
|
||||
self.sendUpdate('teleportResponse', [
|
||||
fromId,
|
||||
base.localAvatar.getTeleportAvailable(),
|
||||
|
|
|
@ -478,7 +478,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
return isinstance(source, (DistributedToon, FriendHandle.FriendHandle))
|
||||
|
||||
def setWhisperSCEmoteFrom(self, fromId, emoteId):
|
||||
handle = base.cr.identifyFriend(fromId)
|
||||
handle = base.cr.identifyAvatar(fromId)
|
||||
if handle == None:
|
||||
return
|
||||
if not self._isValidWhisperSource(handle):
|
||||
|
@ -490,7 +490,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
if base.localAvatar.isIgnored(fromId):
|
||||
return
|
||||
if base.localAvatar.sleepFlag == 1:
|
||||
if not base.cr.identifyAvatar(fromId) == base.localAvatar:
|
||||
if not handle == base.localAvatar:
|
||||
base.cr.ttsFriendsManager.d_sleepAutoReply(fromId)
|
||||
chatString = SCDecoders.decodeSCEmoteWhisperMsg(emoteId, handle.getName())
|
||||
if chatString:
|
||||
|
@ -499,7 +499,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
return
|
||||
|
||||
def setWhisperSCFrom(self, fromId, msgIndex):
|
||||
handle = base.cr.identifyFriend(fromId)
|
||||
handle = base.cr.identifyAvatar(fromId)
|
||||
if handle == None:
|
||||
return
|
||||
if not self._isValidWhisperSource(handle):
|
||||
|
@ -511,7 +511,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
if base.localAvatar.isIgnored(fromId):
|
||||
return
|
||||
if base.localAvatar.sleepFlag == 1:
|
||||
if not base.cr.identifyAvatar(fromId) == base.localAvatar:
|
||||
if not handle == base.localAvatar:
|
||||
base.cr.ttsFriendsManager.d_sleepAutoReply(fromId)
|
||||
chatString = SCDecoders.decodeSCStaticTextMsg(msgIndex)
|
||||
if chatString:
|
||||
|
@ -536,7 +536,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
)
|
||||
|
||||
def setWhisperSCToontaskFrom(self, fromId, taskId, toNpcId, toonProgress, msgIndex):
|
||||
sender = base.cr.identifyFriend(fromId)
|
||||
sender = base.cr.identifyAvatar(fromId)
|
||||
if sender is None:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue