优化聊天气泡
This commit is contained in:
@@ -911,7 +911,7 @@ Desk.send_text=function(_msg){//发送消息
|
||||
if(!_msg.data.type){
|
||||
var pobj = Desk.GetPlayerBySeat(_msg.data.seat);
|
||||
GameUI.playTextVoice(_msg.data.text,pobj.sex);
|
||||
GameUI.ShowChat(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),_msg.data.text);
|
||||
GameUI.ShowChat(_msg.data.seat,_msg.data.text);
|
||||
GameUI.addCommunion(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),1,_msg.data.text,0,null,pobj.sex);
|
||||
}else if(_msg.data.type == 1){//全服公告
|
||||
GameUI.CloseChat();
|
||||
@@ -929,7 +929,7 @@ Desk.send_text=function(_msg){//发送消息
|
||||
var idx = Number(_msg.data.text);
|
||||
_msg.data.text = Game_Config.Info.TextContent[(idx - 1)%Game_Config.Info.TextContent.length];
|
||||
GameUI.playTextVoice(_msg.data.text);
|
||||
GameUI.ShowChat(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),_msg.data.text);
|
||||
GameUI.ShowChat(_msg.data.seat,_msg.data.text);
|
||||
GameUI.addCommunion(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),1,_msg.data.text,0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5779,7 +5779,12 @@ GameUI.ShowEmotion = function(v, ind) {
|
||||
|
||||
}
|
||||
|
||||
GameUI.ShowChat = function(v, text) {
|
||||
GameUI.ShowChat = function(seat, text) {
|
||||
if (Game_Modify.ShowChat) {
|
||||
Game_Modify.ShowChat(seat, text);
|
||||
return;
|
||||
}
|
||||
var v = Logic.ChangeToStatus(C_Player.seat,seat);
|
||||
text = String(text);
|
||||
set_self(204, 7, "", 0, 0);
|
||||
if (v == 0) {
|
||||
@@ -6085,6 +6090,7 @@ GameUI.play_voice = function(_msg, type, v) {
|
||||
|
||||
function gameui_play_voice(v) {
|
||||
v = Number(v);
|
||||
|
||||
var bTemp = false;
|
||||
if (v >= ConstVal.Com_History.content_tag) {
|
||||
bTemp = true;
|
||||
@@ -6092,6 +6098,10 @@ function gameui_play_voice(v) {
|
||||
if (bTemp) {
|
||||
play_ani(1, ConstVal.Com_History.f_spid + "add" + v, 43, 1, 3, 0, 600, 0, 0, 0, 0, 0, 0);
|
||||
} else {
|
||||
if(Game_Modify.gameui_play_voice){
|
||||
Game_Modify.gameui_play_voice(v);
|
||||
return;
|
||||
}
|
||||
var x = Game_Config.Voice.VoiceLoc[v][0];
|
||||
var y = Game_Config.Voice.VoiceLoc[v][1];
|
||||
var dis_x = Game_Config.Voice.VoiceDis[0];
|
||||
@@ -6128,10 +6138,15 @@ function gameui_stop_voice(v) {
|
||||
if (v >= ConstVal.Com_History.content_tag) {
|
||||
bTemp = true;
|
||||
}
|
||||
|
||||
if (bTemp) {
|
||||
play_ani(0, ConstVal.Com_History.f_spid + "add" + v, 43, 1, 3, 0, 600, 0, 0, 0, 0, 0, 0);
|
||||
set_self(ConstVal.Com_History.f_spid + "add" + v, 43, 3, 0, 0);
|
||||
} else {
|
||||
if(Game_Modify.gameui_stop_voice){
|
||||
Game_Modify.gameui_stop_voice(v);
|
||||
return;
|
||||
}
|
||||
set_self(612 + v, 37, 0, 0, 0);
|
||||
set_self(642 + v, 37, 0, 0, 0);
|
||||
play_ani(0, 642 + v, 43);
|
||||
|
||||
Reference in New Issue
Block a user