- Cleaned status_get_sc_tick/status_get_sc_def to use the status_data function.

- SC_STOP's chance and duration can't be reduced anymore.
- Storm Gust no longer has a 100% chance to freeze by passing mdef, now it has a 300% base chance reduced by mdef and the like as explained out by Tharis.
- Frost Diver/Frost Nova's base freezing chance is no longer affected by target's int.
- Lots of indentation fixes in login_sql/login.c to make it match with stable's layout.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7025 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-06-07 03:18:22 +00:00
parent dc71d18c29
commit 11ecdf7283
5 changed files with 496 additions and 500 deletions

View File

@ -4,6 +4,14 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/06/07 2006/06/07
* Cleaned status_get_sc_tick/status_get_sc_def to use the status_data
function. [Skotlex]
* SC_STOP's chance and duration can't be reduced anymore. [Skotlex]
* Storm Gust no longer has a 100% chance to freeze by passing mdef, now it
has a 300% base chance reduced by mdef and the like as explained out by
Tharis. [Skotlex]
* Frost Diver/Frost Nova's base freezing chance is no longer affected by
target's int. [Skotlex]
* [Improved]: * [Improved]:
- mob_dead not to remove script controlled monsters with player sprites. - mob_dead not to remove script controlled monsters with player sprites.
[Added]: [Added]:

View File

@ -3127,7 +3127,7 @@ int parse_login(int fd) {
if (!check_ip(session[fd]->client_addr.sin_addr.s_addr)) { if (!check_ip(session[fd]->client_addr.sin_addr.s_addr)) {
login_log("Connection refused: IP isn't authorised (deny/allow, ip: %s)." RETCODE, ip); login_log("Connection refused: IP isn't authorised (deny/allow, ip: %s)." RETCODE, ip);
WFIFOHEAD(fd, 23); WFIFOHEAD(fd, 23);
WFIFOW(fd,0) = 0x6a; WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 3; // 3 = Rejected from Server WFIFOB(fd,2) = 3; // 3 = Rejected from Server
WFIFOSET(fd,23); WFIFOSET(fd,23);
@ -3141,7 +3141,7 @@ int parse_login(int fd) {
if (min_level_to_connect > gm_level) { if (min_level_to_connect > gm_level) {
login_log("Connection refused: the minimum GM level for connection is %d (account: %s, GM level: %d, ip: %s)." RETCODE, login_log("Connection refused: the minimum GM level for connection is %d (account: %s, GM level: %d, ip: %s)." RETCODE,
min_level_to_connect, account.userid, gm_level, ip); min_level_to_connect, account.userid, gm_level, ip);
WFIFOHEAD(fd, 3); WFIFOHEAD(fd, 3);
WFIFOW(fd,0) = 0x81; WFIFOW(fd,0) = 0x81;
WFIFOB(fd,2) = 1; // 01 = Server closed WFIFOB(fd,2) = 1; // 01 = Server closed
WFIFOSET(fd,3); WFIFOSET(fd,3);

File diff suppressed because it is too large Load Diff

View File

@ -1075,21 +1075,15 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
sc_start(bl,type,100,skilllv,skill_get_time2(skillid, skilllv)); sc_start(bl,type,100,skilllv,skill_get_time2(skillid, skilllv));
break; break;
} }
case MG_FROSTDIVER: /* ƒtƒ?ƒXƒgƒ_ƒCƒo? */ case MG_FROSTDIVER:
case WZ_FROSTNOVA: /* ƒtƒ?ƒXƒgƒmƒ”ƒ@ */ case WZ_FROSTNOVA:
{ sc_start(bl,SC_FREEZE,skilllv*3+35,skilllv,skill_get_time2(skillid,skilllv));
rate = (skilllv*3+35)-(tstatus->int_ + tstatus->luk)/15;
if (rate <= 5)
rate = 5;
sc_start(bl,SC_FREEZE,rate,skilllv,skill_get_time2(skillid,skilllv));
}
break; break;
case WZ_STORMGUST: /* ƒXƒg?ƒ€ƒKƒXƒg */ case WZ_STORMGUST:
tsc->data[SC_FREEZE].val3++; tsc->data[SC_FREEZE].val3++;
if(tsc->data[SC_FREEZE].val3 >= 3) if(tsc->data[SC_FREEZE].val3 >= 3) //Tharis pointed out that this is normal freeze chance with a base of 300%
status_change_start(bl,SC_FREEZE,10000, sc_start(bl,SC_FREEZE,300,skilllv,skill_get_time2(skillid,skilllv));
skilllv,0,0,0,skill_get_time2(skillid,skilllv),8);
break; break;
case WZ_METEOR: case WZ_METEOR:

View File

@ -3793,6 +3793,7 @@ void status_change_init(struct block_list *bl)
int status_get_sc_def(struct block_list *bl, int type) int status_get_sc_def(struct block_list *bl, int type)
{ {
int sc_def; int sc_def;
struct status_data* status;
struct status_change* sc; struct status_change* sc;
nullpo_retr(0, bl); nullpo_retr(0, bl);
@ -3824,6 +3825,7 @@ int status_get_sc_def(struct block_list *bl, int type)
return 10000; return 10000;
} }
status = status_get_status_data(bl);
switch (type) switch (type)
{ {
//Note that stats that are *100/3 were simplified to *33 //Note that stats that are *100/3 were simplified to *33
@ -3831,29 +3833,24 @@ int status_get_sc_def(struct block_list *bl, int type)
case SC_FREEZE: case SC_FREEZE:
case SC_DECREASEAGI: case SC_DECREASEAGI:
case SC_COMA: case SC_COMA:
sc_def = 300 +100*status_get_mdef(bl) +33*status_get_luk(bl); sc_def = 300 +100*status->mdef +33*status->luk;
break; break;
case SC_SLEEP: case SC_SLEEP:
case SC_CONFUSION: case SC_CONFUSION:
sc_def = 300 +100*status_get_int(bl) +33*status_get_luk(bl); sc_def = 300 +100*status->int_ +33*status->luk;
break; break;
// Removed since it collides with normal sc.
// case SP_DEF1: // def
// sc_def = 300 +100*status_get_def(bl) +33*status_get_luk(bl);
// break;
case SC_STUN: case SC_STUN:
case SC_POISON: case SC_POISON:
case SC_DPOISON: case SC_DPOISON:
case SC_SILENCE: case SC_SILENCE:
case SC_BLEEDING: case SC_BLEEDING:
case SC_STOP: sc_def = 300 +100*status->vit +33*status->luk;
sc_def = 300 +100*status_get_vit(bl) +33*status_get_luk(bl);
break; break;
case SC_BLIND: case SC_BLIND:
sc_def = 300 +100*status_get_int(bl) +33*status_get_vit(bl); sc_def = 300 +100*status->int_ +33*status->vit;
break; break;
case SC_CURSE: case SC_CURSE:
sc_def = 300 +100*status_get_luk(bl) +33*status_get_vit(bl); sc_def = 300 +100*status->luk +33*status->vit;
break; break;
default: default:
return 0; //Effect that cannot be reduced? Likely a buff. return 0; //Effect that cannot be reduced? Likely a buff.
@ -3888,56 +3885,58 @@ int status_get_sc_def(struct block_list *bl, int type)
int status_get_sc_tick(struct block_list *bl, int type, int tick) int status_get_sc_tick(struct block_list *bl, int type, int tick)
{ {
struct map_session_data *sd; struct map_session_data *sd;
struct status_data* status;
int rate=0, min=0; int rate=0, min=0;
//If rate is positive, it is a % reduction (10000 -> 100%) //If rate is positive, it is a % reduction (10000 -> 100%)
//if it is negative, it is an absolute reduction in ms. //if it is negative, it is an absolute reduction in ms.
sd = bl->type == BL_PC?(struct map_session_data *)bl:NULL; BL_CAST(BL_PC,bl,sd);
status = status_get_status_data(bl);
switch (type) { switch (type) {
case SC_DECREASEAGI: /* ¬“xŒ¸<C592>­ */ case SC_DECREASEAGI: /* ¬“xŒ¸<C592>­ */
if (sd) // Celest if (sd) // Celest
tick>>=1; tick>>=1;
break; break;
case SC_ADRENALINE: /* アドレナリンラッシュ */ case SC_ADRENALINE:
case SC_ADRENALINE2: case SC_ADRENALINE2:
case SC_WEAPONPERFECTION: /* ウェポンパ?フェクション */ case SC_WEAPONPERFECTION:
case SC_OVERTHRUST: /* オ?バ?スラスト */ case SC_OVERTHRUST:
if(sd && pc_checkskill(sd,BS_HILTBINDING)>0) if(sd && pc_checkskill(sd,BS_HILTBINDING)>0)
tick += tick / 10; tick += tick / 10;
break; break;
case SC_STONE: /* 石化 */ case SC_STONE:
rate = -200*status_get_mdef(bl); rate = -200*status->mdef;
break; break;
case SC_FREEZE: /* 凍結 */ case SC_FREEZE:
rate = 100*status_get_mdef(bl); rate = 100*status->mdef;
break; break;
case SC_STUN: //Reduction in duration is the same as reduction in rate. case SC_STUN: //Reduction in duration is the same as reduction in rate.
rate = 300 +100*status_get_vit(bl) +33*status_get_luk(bl); rate = 300 +100*status->vit;
break; break;
case SC_DPOISON: /* 猛毒 */ case SC_DPOISON:
case SC_POISON: /* 毒 */ case SC_POISON:
rate = 100*status_get_vit(bl) + 20*status_get_luk(bl); rate = 100*status->vit + 20*status->luk;
break; break;
case SC_SILENCE: /* 沈?(レックスデビ?ナ) */ case SC_SILENCE:
case SC_CONFUSION: case SC_CONFUSION:
case SC_CURSE: case SC_CURSE:
rate = 100*status_get_vit(bl); rate = 100*status->vit;
break; break;
case SC_BLIND: /* 暗? */ case SC_BLIND:
rate = 10*status_get_lv(bl) + 7*status_get_int(bl); rate = 10*status_get_lv(bl) + 7*status->int_;
min = 5000; //Minimum 5 secs? min = 5000; //Minimum 5 secs?
break; break;
case SC_BLEEDING: case SC_BLEEDING:
rate = 20*status_get_lv(bl) +100*status_get_vit(bl); rate = 20*status_get_lv(bl) +100*status->vit;
min = 10000; //Need a min of 10 secs for it to hurt at least once. min = 10000; //Need a min of 10 secs for it to hurt at least once.
break; break;
case SC_SWOO: case SC_SWOO:
if (status_get_mode(bl)&MD_BOSS) if (status->mode&MD_BOSS)
tick /= 5; //TODO: Reduce skill's duration. But for how long? tick /= 5; //TODO: Reduce skill's duration. But for how long?
break; break;
case SC_ANKLE: case SC_ANKLE:
if(status_get_mode(bl)&MD_BOSS) // Lasts 5 times less on bosses if(status->mode&MD_BOSS) // Lasts 5 times less on bosses
tick /= 5; tick /= 5;
rate = -100*status_get_agi(bl); rate = -100*status->agi;
// Minimum trap time of 3+0.03*skilllv seconds [celest] // Minimum trap time of 3+0.03*skilllv seconds [celest]
// Changed to 3 secs and moved from skill.c [Skotlex] // Changed to 3 secs and moved from skill.c [Skotlex]
min = 3000; min = 3000;
@ -3946,11 +3945,6 @@ int status_get_sc_tick(struct block_list *bl, int type, int tick)
if (map[bl->m].flag.pvp) if (map[bl->m].flag.pvp)
tick /=2; tick /=2;
break; break;
case SC_STOP:
// Unsure of this... but I get a feeling that agi reduces this
// (it was on Tiger Fist Code, but at -1 ms per 10 agi....
rate = -100*status_get_agi(bl);
break;
} }
if (rate) { if (rate) {
if (bl->type == BL_PC) { if (bl->type == BL_PC) {