Index: char/char.c =================================================================== --- char/char.c (revision 16936) +++ char/char.c (working copy) @@ -105,7 +105,7 @@ #define TRIM_CHARS "\255\xA0\032\t\x0A\x0D " //The following characters are trimmed regardless because they cause confusion and problems on the servers. [Skotlex] char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) in a character name. by [Yor] -int char_per_account = 0; //Maximum charas per account (default unlimited) [Sirius] +int char_per_account = 0; //Maximum chars per account (default unlimited) [Sirius] int char_del_level = 0; //From which level u can delete character [Lupus] int char_del_delay = 86400; @@ -1338,10 +1338,10 @@ { char_db_= idb_alloc(DB_OPT_RELEASE_DATA); - if(char_per_account == 0){ - ShowStatus("Chars per Account: 'Unlimited'.......\n"); - }else{ - ShowStatus("Chars per Account: '%d'.......\n", char_per_account); + if (char_per_account == 0) { + ShowStatus("Characters per Account: 'Unlimited'\n"); + } else { + ShowStatus("Characters per Account: '%d'\n", char_per_account); } //the 'set offline' part is now in check_login_conn ... @@ -4592,6 +4592,10 @@ safestrncpy(char_name_letters, w2, sizeof(char_name_letters)); } else if (strcmpi(w1, "chars_per_account") == 0) { //maxchars per account [Sirius] char_per_account = atoi(w2); + if( char_per_account > MAX_CHARS ) { + ShowWarning("Max chars per account '%d' exceeded limit. Defaulting to '%d'.\n", char_per_account, MAX_CHARS); + char_per_account = MAX_CHARS; + } } else if (strcmpi(w1, "char_del_level") == 0) { //disable/enable char deletion by its level condition [Lupus] char_del_level = atoi(w2); } else if (strcmpi(w1, "char_del_delay") == 0) { Index: common/mmo.h =================================================================== --- common/mmo.h (revision 16936) +++ common/mmo.h (working copy) @@ -220,7 +220,8 @@ struct s_skill { unsigned short id; unsigned char lv; - unsigned char flag; // see enum e_skill_flag + int flag; // see enum e_skill_flag + int kaka; }; struct global_reg { Index: map/pc.c =================================================================== --- map/pc.c (revision 16936) +++ map/pc.c (working copy) @@ -927,7 +927,7 @@ *------------------------------------------*/ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) { - int i; + int i, bclass; unsigned long tick = gettick(); uint32 ip = session[sd->fd]->client_addr; @@ -1097,6 +1097,17 @@ **/ clif_changemap(sd,sd->mapindex,sd->bl.x,sd->bl.y); } + + for (i = 0; i < MAX_SKILL; ++i) { + if ((bclass = sd->status.skill[i].id) != 0 ) { + printf("aaaaaa - %d - %d - %d\n", bclass, sd->status.skill[bclass].flag, sd->status.skill[bclass].kaka); + if (sd->status.skill[bclass].flag == 666) { + printf ("\nbbb\n"); + } + if(sd->status.skill[bclass].kaka == 1) + printf ("\nahau\n"); + } + } /** * Check if player have any cool downs on @@ -1296,7 +1307,10 @@ for( i = 0; i < MAX_SKILL; i++ ) { - if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED ) //Don't touch plagiarized skills + if (sd->status.skill[i].flag == 666) { + printf ("\nshut up xxx\n"); + } + else if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED) //Don't touch plagiarized skills sd->status.skill[i].id = 0; //First clear skills. } @@ -1304,8 +1318,11 @@ { if( sd->status.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED ) { // Restore original level of skills after deleting earned skills. + if (sd->status.skill[i].flag == 666) { + printf ("\nshut up xxx\n"); + }else{ sd->status.skill[i].lv = (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY) ? 0 : sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0; - sd->status.skill[i].flag = SKILL_FLAG_PERMANENT; + sd->status.skill[i].flag = SKILL_FLAG_PERMANENT;} } if( sd->sc.count && sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_BARDDANCER && i >= DC_HUMMING && i<= DC_SERVICEFORYOU ) @@ -1429,6 +1446,10 @@ { if( (skill_get_inf2(id)&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)) ) continue; //Do not include Quest/Wedding skills. + + if (sd->status.skill[i].flag == 666) { + printf ("\nshut up xxx\n"); + }else if( sd->status.skill[id].id == 0 ) { @@ -1515,14 +1536,16 @@ { int i; for (i = 0; i < MAX_SKILL; i++){ - if (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY || sd->status.skill[i].flag == SKILL_FLAG_PLAGIARIZED) + if (sd->status.skill[i].flag == 666) { + printf ("\nshut up\n"); + } + else if (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY || sd->status.skill[i].flag == SKILL_FLAG_PLAGIARIZED) { sd->status.skill[i].id = 0; sd->status.skill[i].lv = 0; sd->status.skill[i].flag = 0; } - else - if (sd->status.skill[i].flag >= SKILL_FLAG_REPLACED_LV_0){ + else if (sd->status.skill[i].flag >= SKILL_FLAG_REPLACED_LV_0){ sd->status.skill[i].lv = sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0; sd->status.skill[i].flag = 0; } @@ -3395,7 +3418,20 @@ return 0; } + printf ("pcskill flag=%d\n", flag); + switch( flag ){ + case 666: + printf ("\ngot in case flag 666\n"); + sd->status.skill[id].id = id; + sd->status.skill[id].lv = level; + sd->status.skill[id].flag = 666; + sd->status.skill[id].kaka = 1; + clif_addskill(sd,id); + if( !skill_get_inf(id) ) //Only recalculate for passive skills. + status_calc_pc(sd, 0); + printf ("\nholy before break = %d\n", sd->status.skill[id].flag); + break; case 0: //Set skill data overwriting whatever was there before. sd->status.skill[id].id = id; sd->status.skill[id].lv = level; @@ -5995,10 +6031,13 @@ for(i=0;istatus.skill[i].flag != SKILL_FLAG_PERMANENT && sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED) { + if (sd->status.skill[i].flag == 666) { + printf ("\nshut up xxx\n"); + }else{ sd->status.skill[i].lv = (sd->status.skill[i].flag == SKILL_FLAG_TEMPORARY) ? 0 : sd->status.skill[i].flag - SKILL_FLAG_REPLACED_LV_0; sd->status.skill[i].flag = SKILL_FLAG_PERMANENT; if (sd->status.skill[i].lv == 0) - sd->status.skill[i].id = 0; + sd->status.skill[i].id = 0;} } } @@ -6274,8 +6313,11 @@ { //Only handle quest skills in a special way when you can't learn them manually if( battle_config.quest_skill_reset && !(flag&2) ) { //Wipe them + if (sd->status.skill[i].flag == 666) { + printf ("\nshut up xxx\n"); + }else{ sd->status.skill[i].lv = 0; - sd->status.skill[i].flag = 0; + sd->status.skill[i].flag = 0;} } continue; } @@ -6287,8 +6329,11 @@ if( !(flag&2) ) {// reset + if (sd->status.skill[i].flag == 666) { + printf ("\nshut up\n"); + }else{ sd->status.skill[i].lv = 0; - sd->status.skill[i].flag = 0; + sd->status.skill[i].flag = 0;} } } Index: map/script.c =================================================================== --- map/script.c (revision 16936) +++ map/script.c (working copy) @@ -7952,6 +7952,7 @@ level = script_getnum(st,3); if( script_hasdata(st,4) ) flag = script_getnum(st,4); + printf ("scriptc flag=%d\n", flag); pc_skill(sd, id, level, flag); return 0;