Fixed an old bug in waitingroom where NPCs weren't appearing into their chatrooms.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16461 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
62338c3fd1
commit
c1990d8893
@ -23,7 +23,7 @@
|
|||||||
bat_room,86,227,4 script Lieutenant Ator 418,{
|
bat_room,86,227,4 script Lieutenant Ator 418,{
|
||||||
end;
|
end;
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_b01::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit","");
|
set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit","");
|
||||||
@ -33,7 +33,7 @@ OnEnterBG:
|
|||||||
bat_room,85,204,0 script Lieutenant Thelokus 414,{
|
bat_room,85,204,0 script Lieutenant Thelokus 414,{
|
||||||
end;
|
end;
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_b01::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit","");
|
set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit","");
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
bat_room,142,227,4 script Lieutenant Huvas 418,{
|
bat_room,142,227,4 script Lieutenant Huvas 418,{
|
||||||
end;
|
end;
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_b02::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit","");
|
set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit","");
|
||||||
@ -34,7 +34,7 @@ OnEnterBG:
|
|||||||
bat_room,142,204,0 script Lieutenant Yukon 414,{
|
bat_room,142,204,0 script Lieutenant Yukon 414,{
|
||||||
end;
|
end;
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_b02::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit","");
|
set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit","");
|
||||||
|
@ -25,7 +25,7 @@ bat_room,169,226,5 script KVM Waiting Room#a::KvM01R_Guillaume 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnGuillaumeJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnGuillaumeJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -39,7 +39,7 @@ bat_room,169,205,3 script KVM Waiting Room#b::KvM01R_Croix 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnCroixJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnCroixJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -27,7 +27,7 @@ bat_room,197,226,5 script KVM Waiting Room#a2::KvM02R_Guillaume 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnGuillaumeJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM02_BG::OnGuillaumeJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -41,7 +41,7 @@ bat_room,197,205,3 script KVM Waiting Room#b2::KvM02R_Croix 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnCroixJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM02_BG::OnCroixJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -26,7 +26,7 @@ bat_room,225,226,5 script KVM Waiting Room#a3::KvM03R_Guillaume 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnGuillaumeJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM03_BG::OnGuillaumeJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -40,7 +40,7 @@ bat_room,225,205,3 script KVM Waiting Room#b3::KvM03R_Croix 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnCroixJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM03_BG::OnCroixJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -24,7 +24,7 @@ bat_room,57,227,5 script Lieutenant Kalos 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_a01::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -36,7 +36,7 @@ bat_room,58,204,1 script Lieutenant Eyor 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_a01::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -23,7 +23,7 @@ bat_room,114,227,5 script Lieutenant Rundel 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_a02::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -35,7 +35,7 @@ bat_room,114,204,1 script Lieutenant Guerrit 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_a02::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -358,7 +358,7 @@ poring_w01,91,97,3 script Poring#wop_door_all 1002,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "[Recruiting 10 Battle Participants]",10,"Poring#wop_door_all::OnStartArena",10,500,9;
|
waitingroom "[Recruiting 10 Battle Participants]",11,"Poring#wop_door_all::OnStartArena",10,500,9;
|
||||||
enablewaitingroomevent;
|
enablewaitingroomevent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ poring_w01,91,68,5 script Poring#wop_door_a 1002,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "[Angeling Team Recruiter]",5,"Poring#wop_door_a::OnStartArena",5,0,9;
|
waitingroom "[Angeling Team Recruiter]",6,"Poring#wop_door_a::OnStartArena",5,0,9;
|
||||||
enablewaitingroomevent;
|
enablewaitingroomevent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -473,7 +473,7 @@ poring_w01,112,68,3 script Poring#wop_door_d 1002,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "[Deviling Team Recruiter]",5,"Poring#wop_door_d::OnStartArena",5,0,9;
|
waitingroom "[Deviling Team Recruiter]",6,"Poring#wop_door_d::OnStartArena",5,0,9;
|
||||||
enablewaitingroomevent;
|
enablewaitingroomevent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
bat_room,86,227,4 script Lieutenant Ator 418,{
|
bat_room,86,227,4 script Lieutenant Ator 418,{
|
||||||
end;
|
end;
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_b01::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit","");
|
set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit","");
|
||||||
@ -33,7 +33,7 @@ OnEnterBG:
|
|||||||
bat_room,85,204,0 script Lieutenant Thelokus 414,{
|
bat_room,85,204,0 script Lieutenant Thelokus 414,{
|
||||||
end;
|
end;
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_b01::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit","");
|
set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit","");
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
bat_room,142,227,4 script Lieutenant Huvas 418,{
|
bat_room,142,227,4 script Lieutenant Huvas 418,{
|
||||||
end;
|
end;
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_b02::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit","");
|
set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit","");
|
||||||
@ -34,7 +34,7 @@ OnEnterBG:
|
|||||||
bat_room,142,204,0 script Lieutenant Yukon 414,{
|
bat_room,142,204,0 script Lieutenant Yukon 414,{
|
||||||
end;
|
end;
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_b02::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit","");
|
set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit","");
|
||||||
|
@ -25,7 +25,7 @@ bat_room,169,226,5 script KVM Waiting Room#a::KvM01R_Guillaume 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnGuillaumeJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnGuillaumeJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -39,7 +39,7 @@ bat_room,169,205,3 script KVM Waiting Room#b::KvM01R_Croix 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnCroixJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM01_BG::OnCroixJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -27,7 +27,7 @@ bat_room,197,226,5 script KVM Waiting Room#a2::KvM02R_Guillaume 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnGuillaumeJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM02_BG::OnGuillaumeJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -41,7 +41,7 @@ bat_room,197,205,3 script KVM Waiting Room#b2::KvM02R_Croix 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnCroixJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM02_BG::OnCroixJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -26,7 +26,7 @@ bat_room,225,226,5 script KVM Waiting Room#a3::KvM03R_Guillaume 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnGuillaumeJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM03_BG::OnGuillaumeJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -40,7 +40,7 @@ bat_room,225,205,3 script KVM Waiting Room#b3::KvM03R_Croix 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnCroixJoin",1;
|
waitingroom "Battle Station 5 Players",6,"KvM03_BG::OnCroixJoin",1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -24,7 +24,7 @@ bat_room,57,227,5 script Lieutenant Kalos 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_a01::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -36,7 +36,7 @@ bat_room,58,204,1 script Lieutenant Eyor 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_a01::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -23,7 +23,7 @@ bat_room,114,227,5 script Lieutenant Rundel 418,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_a02::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
@ -35,7 +35,7 @@ bat_room,114,204,1 script Lieutenant Guerrit 414,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80;
|
waitingroom "Battle Station",11,"start#bat_a02::OnReadyCheck",1,0,80;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OnEnterBG:
|
OnEnterBG:
|
||||||
|
@ -358,7 +358,7 @@ poring_w01,91,97,3 script Poring#wop_door_all 1002,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "[Recruiting 10 Battle Participants]",10,"Poring#wop_door_all::OnStartArena",10,500,9;
|
waitingroom "[Recruiting 10 Battle Participants]",11,"Poring#wop_door_all::OnStartArena",10,500,9;
|
||||||
enablewaitingroomevent;
|
enablewaitingroomevent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ poring_w01,91,68,5 script Poring#wop_door_a 1002,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "[Angeling Team Recruiter]",5,"Poring#wop_door_a::OnStartArena",5,0,9;
|
waitingroom "[Angeling Team Recruiter]",6,"Poring#wop_door_a::OnStartArena",5,0,9;
|
||||||
enablewaitingroomevent;
|
enablewaitingroomevent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -473,7 +473,7 @@ poring_w01,112,68,3 script Poring#wop_door_d 1002,{
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
OnInit:
|
OnInit:
|
||||||
waitingroom "[Deviling Team Recruiter]",5,"Poring#wop_door_d::OnStartArena",5,0,9;
|
waitingroom "[Deviling Team Recruiter]",6,"Poring#wop_door_d::OnStartArena",5,0,9;
|
||||||
enablewaitingroomevent;
|
enablewaitingroomevent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass)
|
|||||||
nullpo_ret(sd);
|
nullpo_ret(sd);
|
||||||
cd = (struct chat_data*)map_id2bl(chatid);
|
cd = (struct chat_data*)map_id2bl(chatid);
|
||||||
|
|
||||||
if( cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->state.vending || sd->state.buyingstore || sd->chatID || cd->users >= cd->limit )
|
if( cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->state.vending || sd->state.buyingstore || sd->chatID || ((cd->owner->type == BL_NPC) ? cd->users+1 : cd->users) >= cd->limit )
|
||||||
{
|
{
|
||||||
clif_joinchatfail(sd,0);
|
clif_joinchatfail(sd,0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -321,9 +321,16 @@ static int clif_send_sub(struct block_list *bl, va_list ap)
|
|||||||
break;
|
break;
|
||||||
case AREA_WOSC:
|
case AREA_WOSC:
|
||||||
{
|
{
|
||||||
struct map_session_data *ssd = (struct map_session_data *)src_bl;
|
if(src_bl->type == BL_PC){
|
||||||
if (ssd && (src_bl->type == BL_PC) && sd->chatID && (sd->chatID == ssd->chatID))
|
struct map_session_data *ssd = (struct map_session_data *)src_bl;
|
||||||
|
if (ssd && sd->chatID && (sd->chatID == ssd->chatID))
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
else if(src_bl->type == BL_NPC) {
|
||||||
|
struct npc_data *nd = (struct npc_data *)src_bl;
|
||||||
|
if (nd && sd->chatID && (sd->chatID == nd->chat_id))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -3512,7 +3519,7 @@ void clif_dispchat(struct chat_data* cd, int fd)
|
|||||||
WBUFL(buf, 4) = cd->owner->id;
|
WBUFL(buf, 4) = cd->owner->id;
|
||||||
WBUFL(buf, 8) = cd->bl.id;
|
WBUFL(buf, 8) = cd->bl.id;
|
||||||
WBUFW(buf,12) = cd->limit;
|
WBUFW(buf,12) = cd->limit;
|
||||||
WBUFW(buf,14) = cd->users;
|
WBUFW(buf,14) = (cd->owner->type == BL_NPC) ? cd->users+1 : cd->users;
|
||||||
WBUFB(buf,16) = type;
|
WBUFB(buf,16) = type;
|
||||||
memcpy((char*)WBUFP(buf,17), cd->title, strlen(cd->title)); // not zero-terminated
|
memcpy((char*)WBUFP(buf,17), cd->title, strlen(cd->title)); // not zero-terminated
|
||||||
|
|
||||||
@ -3550,7 +3557,7 @@ void clif_changechatstatus(struct chat_data* cd)
|
|||||||
WBUFL(buf, 4) = cd->owner->id;
|
WBUFL(buf, 4) = cd->owner->id;
|
||||||
WBUFL(buf, 8) = cd->bl.id;
|
WBUFL(buf, 8) = cd->bl.id;
|
||||||
WBUFW(buf,12) = cd->limit;
|
WBUFW(buf,12) = cd->limit;
|
||||||
WBUFW(buf,14) = cd->users;
|
WBUFW(buf,14) = (cd->owner->type == BL_NPC) ? cd->users+1 : cd->users;
|
||||||
WBUFB(buf,16) = type;
|
WBUFB(buf,16) = type;
|
||||||
memcpy((char*)WBUFP(buf,17), cd->title, strlen(cd->title)); // not zero-terminated
|
memcpy((char*)WBUFP(buf,17), cd->title, strlen(cd->title)); // not zero-terminated
|
||||||
|
|
||||||
@ -3612,7 +3619,7 @@ void clif_joinchatfail(struct map_session_data *sd,int flag)
|
|||||||
void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
|
void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int i;
|
int i,t;
|
||||||
|
|
||||||
nullpo_retv(sd);
|
nullpo_retv(sd);
|
||||||
nullpo_retv(cd);
|
nullpo_retv(cd);
|
||||||
@ -3620,13 +3627,24 @@ void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
|
|||||||
fd = sd->fd;
|
fd = sd->fd;
|
||||||
if (!session_isActive(fd))
|
if (!session_isActive(fd))
|
||||||
return;
|
return;
|
||||||
WFIFOHEAD(fd, 8 + (28*cd->users));
|
t = (int)(cd->owner->type == BL_NPC);
|
||||||
|
WFIFOHEAD(fd, 8 + (28*(cd->users+t)));
|
||||||
WFIFOW(fd, 0) = 0xdb;
|
WFIFOW(fd, 0) = 0xdb;
|
||||||
WFIFOW(fd, 2) = 8 + (28*cd->users);
|
WFIFOW(fd, 2) = 8 + (28*(cd->users+t));
|
||||||
WFIFOL(fd, 4) = cd->bl.id;
|
WFIFOL(fd, 4) = cd->bl.id;
|
||||||
|
|
||||||
|
if(cd->owner->type == BL_NPC){
|
||||||
|
WFIFOL(fd, 30) = 1;
|
||||||
|
WFIFOL(fd, 8) = 0;
|
||||||
|
memcpy(WFIFOP(fd, 12), ((struct npc_data *)cd->owner)->name, NAME_LENGTH);
|
||||||
|
for (i = 0; i < cd->users; i++) {
|
||||||
|
WFIFOL(fd, 8+(i+1)*28) = 1;
|
||||||
|
memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH);
|
||||||
|
}
|
||||||
|
} else
|
||||||
for (i = 0; i < cd->users; i++) {
|
for (i = 0; i < cd->users; i++) {
|
||||||
WFIFOL(fd, 8+i*28) = (i != 0 || cd->owner->type == BL_NPC);
|
WFIFOL(fd, 8+i*28) = (i != 0 || cd->owner->type == BL_NPC);
|
||||||
memcpy(WFIFOP(fd, 8+i*28+4), cd->usersd[i]->status.name, NAME_LENGTH);
|
memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH);
|
||||||
}
|
}
|
||||||
WFIFOSET(fd, WFIFOW(fd, 2));
|
WFIFOSET(fd, WFIFOW(fd, 2));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user