ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/request.C
(Generate patch)

Comparing deliantra/server/socket/request.C (file contents):
Revision 1.50 by root, Thu Dec 21 23:37:06 2006 UTC vs.
Revision 1.51 by root, Fri Dec 22 16:34:00 2006 UTC

569 * it either has to be here or init_sockets needs to be exported. 569 * it either has to be here or init_sockets needs to be exported.
570 */ 570 */
571void 571void
572AddMeCmd (char *buf, int len, client * ns) 572AddMeCmd (char *buf, int len, client * ns)
573{ 573{
574 if (INVOKE_CLIENT (ADDME, ns)) 574 INVOKE_CLIENT (ADDME, ns, ARG_DATA (buf, len));
575 return;
576
577 if (ns->pl || add_player (ns))
578 ns->send_packet ("addme_failed");
579 else
580 ns->send_packet ("addme_success");
581} 575}
582 576
583/** Reply to ExtendedInfos command */ 577/** Reply to ExtendedInfos command */
584void 578void
585ToggleExtendedInfos (char *buf, int len, client * ns) 579ToggleExtendedInfos (char *buf, int len, client * ns)
850 { 844 {
851 case ST_PLAYING: 845 case ST_PLAYING:
852 LOG (llevError, "Got reply message with ST_PLAYING input state\n"); 846 LOG (llevError, "Got reply message with ST_PLAYING input state\n");
853 break; 847 break;
854 848
855 case ST_PLAY_AGAIN:
856 /* We can check this for return value (2==quit). Maybe we
857 * should, and do something appropriate?
858 */
859 receive_play_again (pl->ob, buf[0]);
860 break;
861
862 case ST_ROLL_STAT:
863 key_roll_stat (pl->ob, buf[0]);
864 break;
865
866 case ST_CHANGE_CLASS: 849 case ST_CHANGE_CLASS:
867 key_change_class (pl->ob, buf[0]); 850 key_change_class (pl->ob, buf[0]);
868 break; 851 break;
869 852
870 case ST_CONFIRM_QUIT: 853 case ST_CONFIRM_QUIT:
871 key_confirm_quit (pl->ob, buf[0]); 854 key_confirm_quit (pl->ob, buf[0]);
872 break;
873
874 case ST_CONFIGURE:
875 LOG (llevError, "In client input handling, but into configure state\n");
876 ns->state = ST_PLAYING;
877 break;
878
879 case ST_GET_NAME:
880 receive_player_name (pl->ob, 13);
881 break;
882
883 case ST_GET_PASSWORD:
884 case ST_CONFIRM_PASSWORD:
885 receive_player_password (pl->ob, 13);
886 break; 855 break;
887 856
888 case ST_GET_PARTY_PASSWORD: /* Get password for party */ 857 case ST_GET_PARTY_PASSWORD: /* Get password for party */
889 receive_party_password (pl->ob, 13); 858 receive_party_password (pl->ob, 13);
890 break; 859 break;
1056 AddIfShort (pl->last_stats.sp, pl->ob->stats.sp, CS_STAT_SP); 1025 AddIfShort (pl->last_stats.sp, pl->ob->stats.sp, CS_STAT_SP);
1057 AddIfShort (pl->last_stats.maxsp, pl->ob->stats.maxsp, CS_STAT_MAXSP); 1026 AddIfShort (pl->last_stats.maxsp, pl->ob->stats.maxsp, CS_STAT_MAXSP);
1058 AddIfShort (pl->last_stats.grace, pl->ob->stats.grace, CS_STAT_GRACE); 1027 AddIfShort (pl->last_stats.grace, pl->ob->stats.grace, CS_STAT_GRACE);
1059 AddIfShort (pl->last_stats.maxgrace, pl->ob->stats.maxgrace, CS_STAT_MAXGRACE); 1028 AddIfShort (pl->last_stats.maxgrace, pl->ob->stats.maxgrace, CS_STAT_MAXGRACE);
1060 AddIfShort (pl->last_stats.Str, pl->ob->stats.Str, CS_STAT_STR); 1029 AddIfShort (pl->last_stats.Str, pl->ob->stats.Str, CS_STAT_STR);
1061 AddIfShort (pl->last_stats.Int, pl->ob->stats.Int, CS_STAT_INT);
1062 AddIfShort (pl->last_stats.Pow, pl->ob->stats.Pow, CS_STAT_POW);
1063 AddIfShort (pl->last_stats.Wis, pl->ob->stats.Wis, CS_STAT_WIS);
1064 AddIfShort (pl->last_stats.Dex, pl->ob->stats.Dex, CS_STAT_DEX); 1030 AddIfShort (pl->last_stats.Dex, pl->ob->stats.Dex, CS_STAT_DEX);
1065 AddIfShort (pl->last_stats.Con, pl->ob->stats.Con, CS_STAT_CON); 1031 AddIfShort (pl->last_stats.Con, pl->ob->stats.Con, CS_STAT_CON);
1032 AddIfShort (pl->last_stats.Int, pl->ob->stats.Int, CS_STAT_INT);
1033 AddIfShort (pl->last_stats.Wis, pl->ob->stats.Wis, CS_STAT_WIS);
1034 AddIfShort (pl->last_stats.Pow, pl->ob->stats.Pow, CS_STAT_POW);
1066 AddIfShort (pl->last_stats.Cha, pl->ob->stats.Cha, CS_STAT_CHA); 1035 AddIfShort (pl->last_stats.Cha, pl->ob->stats.Cha, CS_STAT_CHA);
1067 } 1036 }
1068 1037
1069 if (pl->ns->exp64) 1038 if (pl->ns->exp64)
1070 for (int s = 0; s < NUM_SKILLS; s++) 1039 for (int s = 0; s < NUM_SKILLS; s++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines