- 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:
parent
dc71d18c29
commit
11ecdf7283
@ -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.
|
||||
|
||||
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]:
|
||||
- mob_dead not to remove script controlled monsters with player sprites.
|
||||
[Added]:
|
||||
|
@ -3127,7 +3127,7 @@ int parse_login(int fd) {
|
||||
|
||||
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);
|
||||
WFIFOHEAD(fd, 23);
|
||||
WFIFOHEAD(fd, 23);
|
||||
WFIFOW(fd,0) = 0x6a;
|
||||
WFIFOB(fd,2) = 3; // 3 = Rejected from Server
|
||||
WFIFOSET(fd,23);
|
||||
@ -3141,7 +3141,7 @@ int parse_login(int fd) {
|
||||
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,
|
||||
min_level_to_connect, account.userid, gm_level, ip);
|
||||
WFIFOHEAD(fd, 3);
|
||||
WFIFOHEAD(fd, 3);
|
||||
WFIFOW(fd,0) = 0x81;
|
||||
WFIFOB(fd,2) = 1; // 01 = Server closed
|
||||
WFIFOSET(fd,3);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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));
|
||||
break;
|
||||
}
|
||||
case MG_FROSTDIVER: /* ƒtƒ?ƒXƒgƒ_ƒCƒo? */
|
||||
case WZ_FROSTNOVA: /* ƒtƒ?ƒXƒgƒmƒ”ƒ@ */
|
||||
{
|
||||
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));
|
||||
}
|
||||
case MG_FROSTDIVER:
|
||||
case WZ_FROSTNOVA:
|
||||
sc_start(bl,SC_FREEZE,skilllv*3+35,skilllv,skill_get_time2(skillid,skilllv));
|
||||
break;
|
||||
|
||||
case WZ_STORMGUST: /* ƒXƒg?ƒ€ƒKƒXƒg */
|
||||
case WZ_STORMGUST:
|
||||
tsc->data[SC_FREEZE].val3++;
|
||||
if(tsc->data[SC_FREEZE].val3 >= 3)
|
||||
status_change_start(bl,SC_FREEZE,10000,
|
||||
skilllv,0,0,0,skill_get_time2(skillid,skilllv),8);
|
||||
if(tsc->data[SC_FREEZE].val3 >= 3) //Tharis pointed out that this is normal freeze chance with a base of 300%
|
||||
sc_start(bl,SC_FREEZE,300,skilllv,skill_get_time2(skillid,skilllv));
|
||||
break;
|
||||
|
||||
case WZ_METEOR:
|
||||
|
@ -3793,6 +3793,7 @@ void status_change_init(struct block_list *bl)
|
||||
int status_get_sc_def(struct block_list *bl, int type)
|
||||
{
|
||||
int sc_def;
|
||||
struct status_data* status;
|
||||
struct status_change* sc;
|
||||
nullpo_retr(0, bl);
|
||||
|
||||
@ -3824,6 +3825,7 @@ int status_get_sc_def(struct block_list *bl, int type)
|
||||
return 10000;
|
||||
}
|
||||
|
||||
status = status_get_status_data(bl);
|
||||
switch (type)
|
||||
{
|
||||
//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_DECREASEAGI:
|
||||
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;
|
||||
case SC_SLEEP:
|
||||
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;
|
||||
// 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_POISON:
|
||||
case SC_DPOISON:
|
||||
case SC_SILENCE:
|
||||
case SC_BLEEDING:
|
||||
case SC_STOP:
|
||||
sc_def = 300 +100*status_get_vit(bl) +33*status_get_luk(bl);
|
||||
sc_def = 300 +100*status->vit +33*status->luk;
|
||||
break;
|
||||
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;
|
||||
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;
|
||||
default:
|
||||
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)
|
||||
{
|
||||
struct map_session_data *sd;
|
||||
struct status_data* status;
|
||||
int rate=0, min=0;
|
||||
//If rate is positive, it is a % reduction (10000 -> 100%)
|
||||
//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) {
|
||||
case SC_DECREASEAGI: /* ‘¬“xŒ¸<C592> */
|
||||
if (sd) // Celest
|
||||
tick>>=1;
|
||||
break;
|
||||
case SC_ADRENALINE: /* アドレナリンラッシュ */
|
||||
case SC_ADRENALINE:
|
||||
case SC_ADRENALINE2:
|
||||
case SC_WEAPONPERFECTION: /* ウェポンパ?フェクション */
|
||||
case SC_OVERTHRUST: /* オ?バ?スラスト */
|
||||
case SC_WEAPONPERFECTION:
|
||||
case SC_OVERTHRUST:
|
||||
if(sd && pc_checkskill(sd,BS_HILTBINDING)>0)
|
||||
tick += tick / 10;
|
||||
break;
|
||||
case SC_STONE: /* 石化 */
|
||||
rate = -200*status_get_mdef(bl);
|
||||
case SC_STONE:
|
||||
rate = -200*status->mdef;
|
||||
break;
|
||||
case SC_FREEZE: /* 凍結 */
|
||||
rate = 100*status_get_mdef(bl);
|
||||
case SC_FREEZE:
|
||||
rate = 100*status->mdef;
|
||||
break;
|
||||
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;
|
||||
case SC_DPOISON: /* 猛毒 */
|
||||
case SC_POISON: /* 毒 */
|
||||
rate = 100*status_get_vit(bl) + 20*status_get_luk(bl);
|
||||
case SC_DPOISON:
|
||||
case SC_POISON:
|
||||
rate = 100*status->vit + 20*status->luk;
|
||||
break;
|
||||
case SC_SILENCE: /* 沈?(レックスデビ?ナ) */
|
||||
case SC_SILENCE:
|
||||
case SC_CONFUSION:
|
||||
case SC_CURSE:
|
||||
rate = 100*status_get_vit(bl);
|
||||
rate = 100*status->vit;
|
||||
break;
|
||||
case SC_BLIND: /* 暗? */
|
||||
rate = 10*status_get_lv(bl) + 7*status_get_int(bl);
|
||||
case SC_BLIND:
|
||||
rate = 10*status_get_lv(bl) + 7*status->int_;
|
||||
min = 5000; //Minimum 5 secs?
|
||||
break;
|
||||
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.
|
||||
break;
|
||||
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?
|
||||
break;
|
||||
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;
|
||||
rate = -100*status_get_agi(bl);
|
||||
rate = -100*status->agi;
|
||||
// Minimum trap time of 3+0.03*skilllv seconds [celest]
|
||||
// Changed to 3 secs and moved from skill.c [Skotlex]
|
||||
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)
|
||||
tick /=2;
|
||||
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 (bl->type == BL_PC) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user