diff --git a/swf-src/AvatarWorldView.as b/swf-src/AvatarWorldView.as index 6c9b3d1..0f5020c 100644 --- a/swf-src/AvatarWorldView.as +++ b/swf-src/AvatarWorldView.as @@ -2095,7 +2095,7 @@ package avatar _splash.showShadow(false); } _currPetName = LocalizationManager.translatePetName(param5); - _namebar.setAvName(_currPetName); + setPetFormName(); } else { @@ -2152,7 +2152,7 @@ package avatar { _splash.showShadow(false); } - _namebar.setAvName(_currPetName); + setPetFormName(); } else { @@ -2171,6 +2171,21 @@ package avatar return _shouldShowPetOnly; } + // the name over the pet in its form, as the settings menu's Usernames / + // Animal Names switch says: the player's username (the default), or + // the pet's name + private function setPetFormName() : void + { + if(Utility.isSettingOn(MySettings.SETTINGS_USERNAME_BADGE)) + { + _namebar.setAvName(_avatar,true,gMainFrame.userInfo.getUserInfoByUserName(_avatar.userName)); + } + else + { + _namebar.setAvName(_currPetName ? _currPetName : _avatar.avName); + } + } + // chat balloons and emotes sit over the pet in its form, as the // party's do (AvatarUtility's pet offsets) private function placeChatBalloon() : void @@ -2687,7 +2702,11 @@ package avatar public function updateNameBarName() : void { - if(_namebar) + if(_namebar && _shouldShowPetOnly) + { + setPetFormName(); + } + else if(_namebar) { _namebar.setAvName(_avatar,Utility.isSettingOn(MySettings.SETTINGS_USERNAME_BADGE),gMainFrame.userInfo.getUserInfoByUserName(_avatar.userName)); } @@ -2714,9 +2733,9 @@ package avatar { _namebar.setColorAndBadge(0); _namebar.setColorBadgeAndXp(0,0,_isMember); - if(_shouldShowPetOnly && _currPetName) + if(_shouldShowPetOnly) { - _namebar.setAvName(_currPetName); + setPetFormName(); } else {