- Some cleaning of the Gospel code.

- Added clif_gospel_info which displays info about the buffs you are receiving. Thanks to Rayce for the packet information.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9174 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-11-08 16:51:13 +00:00
parent 405f4633ec
commit 69c98bdfa2
4 changed files with 74 additions and 37 deletions

View File

@ -4,6 +4,8 @@ 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/11/08 2006/11/08
* Added clif_gospel_info which displays info about the buffs you are
receiving. Thanks to Rayce for the packet information. [Skotlex]
* Fixed Spider Web not ending when hit by a fireelemental attack. [Skotlex] * Fixed Spider Web not ending when hit by a fireelemental attack. [Skotlex]
* Cast-time reductions from status changes will not be executed until right * Cast-time reductions from status changes will not be executed until right
before casting, to prevent status changes from ending when attempting to before casting, to prevent status changes from ending when attempting to

View File

@ -104,7 +104,7 @@ static const int packet_len_table[MAX_PACKET_DB] = {
-1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10, -1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10,
//#0x200 //#0x200
26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19) 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19)
22, 0, 26, 26, 42, -1, -1, 2, 2,282,282,10, 10, -1, -1, 66, 22, 0, 26, 26, 42, 6, 6, 2, 2,282,282,10, 10, -1, -1, 66,
10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 71, 5, 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 71, 5,
12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1,-1, 4, 2, 12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1,-1, 4, 2,
-1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8,12, 4, 10, -1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8,12, 4, 10,
@ -8018,6 +8018,30 @@ int clif_party_xy_remove(struct map_session_data *sd)
return 0; return 0;
} }
//Displays gospel-buff information (thanks to Rayce):
//Type determines message based on this table:
/*
0x15 End all negative status
0x16 Immunity to all status
0x17 MaxHP +100%
0x18 MaxSP +100%
0x19 All stats +20
0x1c Enchant weapon with Holy element
0x1d Enchant armor with Holy element
0x1e DEF +25%
0x1f ATK +100%
0x20 HIT/Flee +50
0x28 Full strip failed because of coating (unrelated to gospel, maybe for ST_FULLSTRIP)
*/
void clif_gospel_info(struct map_session_data *sd, int type)
{
int fd=sd->fd;
WFIFOHEAD(fd,packet_len_table[0x215]);
WFIFOW(fd,0)=0x215;
WFIFOL(fd,2)=type;
WFIFOSET(fd, packet_len_table[0x215]);
}
/*========================================== /*==========================================
* Info about Star Glaldiator save map [Komurka] * Info about Star Glaldiator save map [Komurka]
* type: 1: Information, 0: Map registered * type: 1: Information, 0: Map registered

View File

@ -345,6 +345,7 @@ int do_init_clif(void);
void clif_get_weapon_view(TBL_PC* sd, unsigned short *rhand, unsigned short *lhand); void clif_get_weapon_view(TBL_PC* sd, unsigned short *rhand, unsigned short *lhand);
int clif_party_xy_remove(struct map_session_data *sd); //Fix for minimap [Kevin] int clif_party_xy_remove(struct map_session_data *sd); //Fix for minimap [Kevin]
void clif_gospel_info(struct map_session_data *sd, int type);
void clif_parse_ReqFeel(int fd, struct map_session_data *sd, int skilllv); void clif_parse_ReqFeel(int fd, struct map_session_data *sd, int skilllv);
void clif_feel_info(struct map_session_data *sd, unsigned char feel_level, unsigned char type); void clif_feel_info(struct map_session_data *sd, unsigned char feel_level, unsigned char type);
void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type); void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type);

View File

@ -7249,84 +7249,94 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
break; break;
if (ss != bl && battle_check_target(ss,bl,BCT_PARTY)>0) { // Support Effect only on party, not guild if (ss != bl && battle_check_target(ss,bl,BCT_PARTY)>0) { // Support Effect only on party, not guild
int i = rand()%13; // Positive buff count int i = rand()%13; // Positive buff count
type = skill_get_time2(sg->skill_id, sg->skill_lv); //Duration
switch (i) switch (i)
{ {
case 0: // Heal 1~9999 HP case 0: // Heal 1~9999 HP
{ type = rand() %9999+1;
int heal = rand() %9999+1; clif_skill_nodamage(ss,bl,AL_HEAL,type,1);
clif_skill_nodamage(ss,bl,AL_HEAL,heal,1); status_heal(bl,type,0,0);
status_heal(bl,heal,0,0);
}
break; break;
case 1: // End all negative status case 1: // End all negative status
status_change_clear_buffs(bl,2); status_change_clear_buffs(bl,2);
if (sd) clif_gospel_info(sd, 0x15);
break; break;
case 2: // Level 10 Blessing case 2: // 100% resist to status changes.
sc_start(bl,SC_BLESSING,100,10,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_SCRESIST,100,100,type);
if (sd) clif_gospel_info(sd, 0x16);
break; break;
case 3: // Level 10 Increase AGI case 3: // MaxHP +100%
sc_start(bl,SC_INCREASEAGI,100,10,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCMHPRATE,100,100,type);
if (sd) clif_gospel_info(sd, 0x17);
break; break;
case 4: // Enchant weapon with Holy element case 4: // MaxSP +100%
sc_start(bl,SC_ASPERSIO,100,1,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCMSPRATE,100,100,type);
if (sd) clif_gospel_info(sd, 0x18);
break; break;
case 5: // Enchant armor with Holy element case 5: // All stats +20
sc_start(bl,SC_BENEDICTIO,100,1,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCALLSTATUS,100,20,type);
if (sd) clif_gospel_info(sd, 0x19);
break; break;
case 6: // MaxHP +100% case 6: // Level 10 Blessing
sc_start(bl,SC_INCMHPRATE,100,100,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_BLESSING,100,10,type);
break; break;
case 7: // MaxSP +100% case 7: // Level 10 Increase AGI
sc_start(bl,SC_INCMSPRATE,100,100,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCREASEAGI,100,10,type);
break; break;
case 8: // All stats +20 case 8: // Enchant weapon with Holy element
sc_start(bl,SC_INCALLSTATUS,100,20,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_ASPERSIO,100,1,type);
if (sd) clif_gospel_info(sd, 0x1c);
break; break;
case 9: // DEF +25% case 9: // Enchant armor with Holy element
sc_start(bl,SC_INCDEFRATE,100,25,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_BENEDICTIO,100,1,type);
if (sd) clif_gospel_info(sd, 0x1d);
break; break;
case 10: // ATK +100% case 10: // DEF +25%
sc_start(bl,SC_INCATKRATE,100,100,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCDEFRATE,100,25,type);
if (sd) clif_gospel_info(sd, 0x1e);
break; break;
case 11: // HIT/Flee +50 case 11: // ATK +100%
sc_start(bl,SC_INCHIT,100,50,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCATKRATE,100,100,type);
sc_start(bl,SC_INCFLEE,100,50,skill_get_time2(sg->skill_id, sg->skill_lv)); if (sd) clif_gospel_info(sd, 0x1f);
break; break;
case 12: // Immunity to all status case 12: // HIT/Flee +50
sc_start(bl,SC_SCRESIST,100,100,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCHIT,100,50,type);
sc_start(bl,SC_INCFLEE,100,50,type);
if (sd) clif_gospel_info(sd, 0x20);
break; break;
} }
} }
else if (battle_check_target(&src->bl,bl,BCT_ENEMY)>0) { // Offensive Effect else if (battle_check_target(&src->bl,bl,BCT_ENEMY)>0) { // Offensive Effect
int i = rand()%9; // Negative buff count int i = rand()%9; // Negative buff count
type = skill_get_time2(sg->skill_id, sg->skill_lv);
switch (i) switch (i)
{ {
case 0: // Deal 1~9999 damage case 0: // Deal 1~9999 damage
skill_attack(BF_MISC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0); skill_attack(BF_MISC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
break; break;
case 1: // Curse case 1: // Curse
sc_start(bl,SC_CURSE,100,1,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_CURSE,100,1,type);
break; break;
case 2: // Blind case 2: // Blind
sc_start(bl,SC_BLIND,100,1,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_BLIND,100,1,type);
break; break;
case 3: // Poison case 3: // Poison
sc_start(bl,SC_POISON,100,1,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_POISON,100,1,type);
break; break;
case 4: // Level 10 Provoke case 4: // Level 10 Provoke
sc_start(bl,SC_PROVOKE,100,10,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_PROVOKE,100,10,type);
break; break;
case 5: // DEF -100% case 5: // DEF -100%
sc_start(bl,SC_INCDEFRATE,100,-100,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCDEFRATE,100,-100,type);
break; break;
case 6: // ATK -100% case 6: // ATK -100%
sc_start(bl,SC_INCATKRATE,100,-100,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCATKRATE,100,-100,type);
break; break;
case 7: // Flee -100% case 7: // Flee -100%
sc_start(bl,SC_INCFLEERATE,100,-100,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start(bl,SC_INCFLEERATE,100,-100,type);
break; break;
case 8: // Speed/ASPD -25% case 8: // Speed/ASPD -25%
sc_start4(bl,SC_GOSPEL,100,1,0,0,BCT_ENEMY,skill_get_time2(sg->skill_id, sg->skill_lv)); sc_start4(bl,SC_GOSPEL,100,1,0,0,BCT_ENEMY,type);
break; break;
} }
} }