* Reverted unnecessary signature change of clif_skill_fail from r14941.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/renewal@14942 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
f755dd18b3
commit
661412206e
@ -1,5 +1,7 @@
|
|||||||
Date Added
|
Date Added
|
||||||
|
|
||||||
|
2011/08/27
|
||||||
|
* Reverted unnecessary signature change of clif_skill_fail from r14941. [Gepard]
|
||||||
2011/08/26
|
2011/08/26
|
||||||
* Rev. 14941 Renewal changes in renewal branch? Am I dreaming? [L0ne_W0lf]
|
* Rev. 14941 Renewal changes in renewal branch? Am I dreaming? [L0ne_W0lf]
|
||||||
- Implemented first version of Archbishop skills. Preliminary version, see doc/3rd_job_notes.txt for details/bugs/issues with skills.
|
- Implemented first version of Archbishop skills. Preliminary version, see doc/3rd_job_notes.txt for details/bugs/issues with skills.
|
||||||
|
@ -4413,7 +4413,7 @@ int clif_skillcastcancel(struct block_list* bl)
|
|||||||
/// if(success!=0) doesn't display any of the previous messages
|
/// if(success!=0) doesn't display any of the previous messages
|
||||||
/// Note: when this packet is received an unknown flag is always set to 0,
|
/// Note: when this packet is received an unknown flag is always set to 0,
|
||||||
/// suggesting this is an ACK packet for the UseSkill packets and should be sent on success too [FlavioJS]
|
/// suggesting this is an ACK packet for the UseSkill packets and should be sent on success too [FlavioJS]
|
||||||
int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype, int val)
|
int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -4437,11 +4437,12 @@ int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype,
|
|||||||
if(skill_id == TF_POISON && battle_config.display_skill_fail&8)
|
if(skill_id == TF_POISON && battle_config.display_skill_fail&8)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
// This is the correct packet structure.
|
||||||
|
// If you need to pack 2 numbers into bytes 4~7 (btype) use MakeDWord [Gepard]
|
||||||
WFIFOHEAD(fd,packet_len(0x110));
|
WFIFOHEAD(fd,packet_len(0x110));
|
||||||
WFIFOW(fd,0) = 0x110;
|
WFIFOW(fd,0) = 0x110;
|
||||||
WFIFOW(fd,2) = skill_id;
|
WFIFOW(fd,2) = skill_id;
|
||||||
WFIFOW(fd,4) = btype;
|
WFIFOL(fd,4) = btype;
|
||||||
WFIFOW(fd,6) = val;
|
|
||||||
WFIFOB(fd,8) = 0;
|
WFIFOB(fd,8) = 0;
|
||||||
WFIFOB(fd,9) = type;
|
WFIFOB(fd,9) = type;
|
||||||
WFIFOSET(fd,packet_len(0x110));
|
WFIFOSET(fd,packet_len(0x110));
|
||||||
@ -5418,7 +5419,7 @@ int clif_item_repair_list(struct map_session_data *sd,struct map_session_data *d
|
|||||||
sd->menuskill_id = BS_REPAIRWEAPON;
|
sd->menuskill_id = BS_REPAIRWEAPON;
|
||||||
sd->menuskill_val = dstsd->bl.id;
|
sd->menuskill_val = dstsd->bl.id;
|
||||||
}else
|
}else
|
||||||
clif_skill_fail(sd,sd->ud.skillid,0,0,0);
|
clif_skill_fail(sd,sd->ud.skillid,0,0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -9074,13 +9075,13 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd)
|
|||||||
|
|
||||||
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 2) {
|
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 2) {
|
||||||
if (emoticon == E_MUTE) {// prevent use of the mute emote [Valaris]
|
if (emoticon == E_MUTE) {// prevent use of the mute emote [Valaris]
|
||||||
clif_skill_fail(sd, 1, 0, 1, 0);
|
clif_skill_fail(sd, 1, 0, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// fix flood of emotion icon (ro-proxy): flood only the hacker player
|
// fix flood of emotion icon (ro-proxy): flood only the hacker player
|
||||||
if (sd->emotionlasttime >= time(NULL)) {
|
if (sd->emotionlasttime >= time(NULL)) {
|
||||||
sd->emotionlasttime = time(NULL) + 1; // not more than 1 per second (using /commands the client can spam it)
|
sd->emotionlasttime = time(NULL) + 1; // not more than 1 per second (using /commands the client can spam it)
|
||||||
clif_skill_fail(sd, 1, 0, 1, 0);
|
clif_skill_fail(sd, 1, 0, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sd->emotionlasttime = time(NULL) + 1; // not more than 1 per second (using /commands the client can spam it)
|
sd->emotionlasttime = time(NULL) + 1; // not more than 1 per second (using /commands the client can spam it)
|
||||||
@ -9092,7 +9093,7 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd)
|
|||||||
|
|
||||||
clif_emotion(&sd->bl, emoticon);
|
clif_emotion(&sd->bl, emoticon);
|
||||||
} else
|
} else
|
||||||
clif_skill_fail(sd, 1, 0, 1, 0);
|
clif_skill_fail(sd, 1, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*==========================================
|
/*==========================================
|
||||||
@ -9141,7 +9142,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
|
|||||||
|
|
||||||
if (!battle_config.sdelay_attack_enable && pc_checkskill(sd, SA_FREECAST) <= 0) {
|
if (!battle_config.sdelay_attack_enable && pc_checkskill(sd, SA_FREECAST) <= 0) {
|
||||||
if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) {
|
if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) {
|
||||||
clif_skill_fail(sd, 1, 4, 0, 0);
|
clif_skill_fail(sd, 1, 4, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9152,7 +9153,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
|
|||||||
break;
|
break;
|
||||||
case 0x02: // sitdown
|
case 0x02: // sitdown
|
||||||
if (battle_config.basic_skill_check && pc_checkskill(sd, NV_BASIC) < 3) {
|
if (battle_config.basic_skill_check && pc_checkskill(sd, NV_BASIC) < 3) {
|
||||||
clif_skill_fail(sd, 1, 0, 2, 0);
|
clif_skill_fail(sd, 1, 0, 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9679,7 +9680,7 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
|
|||||||
if (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM)
|
if (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM)
|
||||||
return;
|
return;
|
||||||
if(battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 4) {
|
if(battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 4) {
|
||||||
clif_skill_fail(sd,1,0,3,0);
|
clif_skill_fail(sd,1,0,3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9791,7 +9792,7 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd)
|
|||||||
|
|
||||||
if( battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 1)
|
if( battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 1)
|
||||||
{
|
{
|
||||||
clif_skill_fail(sd,1,0,0,0);
|
clif_skill_fail(sd,1,0,0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9977,7 +9978,7 @@ static void clif_parse_UseSkillToPos_mercenary(struct mercenary_data *md, struct
|
|||||||
return;
|
return;
|
||||||
if( DIFF_TICK(tick, md->ud.canact_tick) < 0 )
|
if( DIFF_TICK(tick, md->ud.canact_tick) < 0 )
|
||||||
{
|
{
|
||||||
clif_skill_fail(md->master, skillnum, 4, 0, 0);
|
clif_skill_fail(md->master, skillnum, 4, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10047,7 +10048,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
|
|||||||
{
|
{
|
||||||
if( sd->skillitem != skillnum )
|
if( sd->skillitem != skillnum )
|
||||||
{
|
{
|
||||||
clif_skill_fail(sd, skillnum, 0x04, 0, 0);
|
clif_skill_fail(sd, skillnum, 0x04, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10123,7 +10124,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, short skil
|
|||||||
{
|
{
|
||||||
if( pc_issit(sd) )
|
if( pc_issit(sd) )
|
||||||
{
|
{
|
||||||
clif_skill_fail(sd, skillnum, 0, 0, 0);
|
clif_skill_fail(sd, skillnum, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//You can't use Graffiti/TalkieBox AND have a vending open, so this is safe.
|
//You can't use Graffiti/TalkieBox AND have a vending open, so this is safe.
|
||||||
@ -10137,7 +10138,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, short skil
|
|||||||
{
|
{
|
||||||
if( sd->skillitem != skillnum )
|
if( sd->skillitem != skillnum )
|
||||||
{
|
{
|
||||||
clif_skill_fail(sd, skillnum, 4, 0, 0);
|
clif_skill_fail(sd, skillnum, 4, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10246,7 +10247,7 @@ void clif_parse_ProduceMix(int fd,struct map_session_data *sd)
|
|||||||
|
|
||||||
if (pc_istrading(sd)) {
|
if (pc_istrading(sd)) {
|
||||||
//Make it fail to avoid shop exploits where you sell something different than you see.
|
//Make it fail to avoid shop exploits where you sell something different than you see.
|
||||||
clif_skill_fail(sd,sd->ud.skillid,0,0,0);
|
clif_skill_fail(sd,sd->ud.skillid,0,0);
|
||||||
sd->menuskill_val = sd->menuskill_id = 0;
|
sd->menuskill_val = sd->menuskill_id = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -10268,7 +10269,7 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd)
|
|||||||
|
|
||||||
if (pc_istrading(sd)) {
|
if (pc_istrading(sd)) {
|
||||||
//Make it fail to avoid shop exploits where you sell something different than you see.
|
//Make it fail to avoid shop exploits where you sell something different than you see.
|
||||||
clif_skill_fail(sd,sd->ud.skillid,0,0,0);
|
clif_skill_fail(sd,sd->ud.skillid,0,0);
|
||||||
sd->menuskill_val = sd->menuskill_id = 0;
|
sd->menuskill_val = sd->menuskill_id = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -10284,7 +10285,7 @@ void clif_parse_RepairItem(int fd, struct map_session_data *sd)
|
|||||||
return;
|
return;
|
||||||
if (pc_istrading(sd)) {
|
if (pc_istrading(sd)) {
|
||||||
//Make it fail to avoid shop exploits where you sell something different than you see.
|
//Make it fail to avoid shop exploits where you sell something different than you see.
|
||||||
clif_skill_fail(sd,sd->ud.skillid,0,0,0);
|
clif_skill_fail(sd,sd->ud.skillid,0,0);
|
||||||
sd->menuskill_val = sd->menuskill_id = 0;
|
sd->menuskill_val = sd->menuskill_id = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -10303,7 +10304,7 @@ void clif_parse_WeaponRefine(int fd, struct map_session_data *sd)
|
|||||||
return;
|
return;
|
||||||
if (pc_istrading(sd)) {
|
if (pc_istrading(sd)) {
|
||||||
//Make it fail to avoid shop exploits where you sell something different than you see.
|
//Make it fail to avoid shop exploits where you sell something different than you see.
|
||||||
clif_skill_fail(sd,sd->ud.skillid,0,0,0);
|
clif_skill_fail(sd,sd->ud.skillid,0,0);
|
||||||
sd->menuskill_val = sd->menuskill_id = 0;
|
sd->menuskill_val = sd->menuskill_id = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -10406,7 +10407,7 @@ void clif_parse_SelectArrow(int fd,struct map_session_data *sd)
|
|||||||
return;
|
return;
|
||||||
if (pc_istrading(sd)) {
|
if (pc_istrading(sd)) {
|
||||||
//Make it fail to avoid shop exploits where you sell something different than you see.
|
//Make it fail to avoid shop exploits where you sell something different than you see.
|
||||||
clif_skill_fail(sd,sd->ud.skillid,0,0,0);
|
clif_skill_fail(sd,sd->ud.skillid,0,0);
|
||||||
sd->menuskill_val = sd->menuskill_id = 0;
|
sd->menuskill_val = sd->menuskill_id = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -10612,7 +10613,7 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd)
|
|||||||
}
|
}
|
||||||
if( battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 7 )
|
if( battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 7 )
|
||||||
{
|
{
|
||||||
clif_skill_fail(sd,1,0,4,0);
|
clif_skill_fail(sd,1,0,4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10633,7 +10634,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
|
|||||||
}
|
}
|
||||||
if( battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 7 )
|
if( battle_config.basic_skill_check && pc_checkskill(sd,NV_BASIC) < 7 )
|
||||||
{
|
{
|
||||||
clif_skill_fail(sd,1,0,4,0);
|
clif_skill_fail(sd,1,0,4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ int clif_deleteskill(struct map_session_data *sd, int skill);
|
|||||||
|
|
||||||
void clif_skillcasting(struct block_list* bl, int src_id, int dst_id, int dst_x, int dst_y, int skill_num, int property, int casttime);
|
void clif_skillcasting(struct block_list* bl, int src_id, int dst_id, int dst_x, int dst_y, int skill_num, int property, int casttime);
|
||||||
int clif_skillcastcancel(struct block_list* bl);
|
int clif_skillcastcancel(struct block_list* bl);
|
||||||
int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype, int val);
|
int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype);
|
||||||
int clif_skill_cooldown(struct map_session_data *sd, int skillid, unsigned int tick);
|
int clif_skill_cooldown(struct map_session_data *sd, int skillid, unsigned int tick);
|
||||||
int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int damage,int div,int skill_id,int skill_lv,int type);
|
int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int damage,int div,int skill_id,int skill_lv,int type);
|
||||||
//int clif_skill_damage2(struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int damage,int div,int skill_id,int skill_lv,int type);
|
//int clif_skill_damage2(struct block_list *src,struct block_list *dst,unsigned int tick,int sdelay,int ddelay,int damage,int div,int skill_id,int skill_lv,int type);
|
||||||
|
@ -1045,7 +1045,7 @@ int guild_change_emblem(struct map_session_data *sd,int len,const char *data)
|
|||||||
|
|
||||||
if (battle_config.require_glory_guild &&
|
if (battle_config.require_glory_guild &&
|
||||||
!((g = guild_search(sd->status.guild_id)) && guild_checkskill(g, GD_GLORYGUILD)>0)) {
|
!((g = guild_search(sd->status.guild_id)) && guild_checkskill(g, GD_GLORYGUILD)>0)) {
|
||||||
clif_skill_fail(sd,GD_GLORYGUILD,0,0,0);
|
clif_skill_fail(sd,GD_GLORYGUILD,0,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
276
src/map/skill.c
276
src/map/skill.c
File diff suppressed because it is too large
Load Diff
@ -961,7 +961,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
|
|||||||
return 0;
|
return 0;
|
||||||
target = (struct block_list*)map_charid2sd(sd->status.partner_id);
|
target = (struct block_list*)map_charid2sd(sd->status.partner_id);
|
||||||
if (!target) {
|
if (!target) {
|
||||||
clif_skill_fail(sd,skill_num,0,0,0);
|
clif_skill_fail(sd,skill_num,0,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1013,7 +1013,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
|
|||||||
case BD_ENCORE:
|
case BD_ENCORE:
|
||||||
//Prevent using the dance skill if you no longer have the skill in your tree.
|
//Prevent using the dance skill if you no longer have the skill in your tree.
|
||||||
if(!sd->skillid_dance || pc_checkskill(sd,sd->skillid_dance)<=0){
|
if(!sd->skillid_dance || pc_checkskill(sd,sd->skillid_dance)<=0){
|
||||||
clif_skill_fail(sd,skill_num,0,0,0);
|
clif_skill_fail(sd,skill_num,0,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
sd->skillid_old = skill_num;
|
sd->skillid_old = skill_num;
|
||||||
@ -1029,7 +1029,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
|
|||||||
case CG_MOONLIT:
|
case CG_MOONLIT:
|
||||||
if (skill_check_pc_partner(sd, skill_num, &skill_lv, 1, 0) < 1)
|
if (skill_check_pc_partner(sd, skill_num, &skill_lv, 1, 0) < 1)
|
||||||
{
|
{
|
||||||
clif_skill_fail(sd,skill_num,0,0,0);
|
clif_skill_fail(sd,skill_num,0,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1245,7 +1245,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
|
|||||||
|
|
||||||
if( map_getcell(src->m, skill_x, skill_y, CELL_CHKWALL) )
|
if( map_getcell(src->m, skill_x, skill_y, CELL_CHKWALL) )
|
||||||
{// can't cast ground targeted spells on wall cells
|
{// can't cast ground targeted spells on wall cells
|
||||||
if (sd) clif_skill_fail(sd,skill_num,0,0,0);
|
if (sd) clif_skill_fail(sd,skill_num,0,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1581,7 +1581,7 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
|
|||||||
{ // attacking when under cast delay has restrictions:
|
{ // attacking when under cast delay has restrictions:
|
||||||
if( tid == INVALID_TIMER )
|
if( tid == INVALID_TIMER )
|
||||||
{ //requested attack.
|
{ //requested attack.
|
||||||
if(sd) clif_skill_fail(sd,1,4,0,0);
|
if(sd) clif_skill_fail(sd,1,4,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//Otherwise, we are in a combo-attack, delay this until your canact time is over. [Skotlex]
|
//Otherwise, we are in a combo-attack, delay this until your canact time is over. [Skotlex]
|
||||||
|
@ -261,14 +261,14 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool
|
|||||||
// skill level and cart check
|
// skill level and cart check
|
||||||
if( !vending_skill_lvl || !pc_iscarton(sd) )
|
if( !vending_skill_lvl || !pc_iscarton(sd) )
|
||||||
{
|
{
|
||||||
clif_skill_fail(sd, MC_VENDING, 0, 0, 0);
|
clif_skill_fail(sd, MC_VENDING, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check number of items in shop
|
// check number of items in shop
|
||||||
if( count < 1 || count > MAX_VENDING || count > 2 + vending_skill_lvl )
|
if( count < 1 || count > MAX_VENDING || count > 2 + vending_skill_lvl )
|
||||||
{ // invalid item count
|
{ // invalid item count
|
||||||
clif_skill_fail(sd, MC_VENDING, 0, 0, 0);
|
clif_skill_fail(sd, MC_VENDING, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool
|
|||||||
|
|
||||||
if( i == 0 )
|
if( i == 0 )
|
||||||
{ // no valid item found
|
{ // no valid item found
|
||||||
clif_skill_fail(sd, MC_VENDING, 0, 0, 0); // custom reply packet
|
clif_skill_fail(sd, MC_VENDING, 0, 0); // custom reply packet
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user