- Removed @itemcheck as it was totally pointless.

- Corrected states killer/killable being easily dispellable.
- Fixed the totally wrong text messages being used for @killer/@killable related atcommands, added appropiate entries to msg_athena
- Magic and Misc attacks will now get type "flee" when they do less than 1 damage, this blocks them from causing additional status effects when they are blocked.
- Cleaned up a bit the Basilica code, it should now properly end when you walk.
- Added an unnecessary qty check when inserting cards :P
- Fixed some logs not working when you enabled all logs.
- Corrected unmute being a level 60 command by default (should be 80)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8256 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-08-13 06:14:27 +00:00
parent 907653ac7a
commit 1d2c4f8950
12 changed files with 67 additions and 63 deletions

View File

@ -4,6 +4,18 @@ 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/08/13
* Removed @itemcheck as it was totally pointless. [Skotlex]
* Corrected states killer/killable being easily dispellable. [Skotlex]
* Fixed the totally wrong text messages being used for @killer/@killable
related atcommands, added appropiate entries to msg_athena [Skotlex]
* Magic and Misc attacks will now get type "flee" when they do less than 1
damage, this blocks them from causing additional status effects when they
are blocked. [Skotlex]
* Cleaned up a bit the Basilica code, it should now properly end when you
walk. [Skotlex]
* Fixed some logs not working when you enabled all logs. [Skotlex]
* Corrected unmute being a level 60 command by default (should be 80)
[Skotlex]
* Corrected the mapif_parse_PartyChangeMap function to correctly update
level-range when someone logs on/off, fixes being unable to set even-share
on once it's been broken even when the characters out of range logoff.

View File

@ -462,9 +462,6 @@ item: 60
// Creates a complet item (card, etc...) of your choosing, either Item ID or Name.
item2: 60
// ??
itemcheck: 60
// Kill another character without hitting them.
kill: 60
@ -647,7 +644,7 @@ skillon: 80
skilloff: 80
// Unmute a player
unmute: 60
unmute: 80
//---------------------------
// 99: Administrator commands

View File

@ -250,7 +250,7 @@
239: Game time: After, the game will be in daylight for %s.
240: %d monster(s) summoned!
241: You can now kill anybody
242: You are now killable
242: You are now killable by anyone
243: Map skills are off
244: Map skills are on
245: Server Uptime: %ld days, %ld hours, %ld minutes, %ld seconds.
@ -297,6 +297,11 @@
284: Leadership transferred.
285: You've become the party leader.
286: There's been no change in the setting.
//Missing stuff for @killer related commands.
287: Killer state reset
288: You are no longer killable
289: The player is now killable
290: The player is no longer killable
// Guild Castles Number
// --------------------
299: ?? Castles

View File

@ -77,7 +77,6 @@ ACMD_FUNC(heal);
ACMD_FUNC(item);
ACMD_FUNC(item2);
ACMD_FUNC(itemreset);
ACMD_FUNC(itemcheck);
ACMD_FUNC(baselevelup);
ACMD_FUNC(joblevelup);
ACMD_FUNC(help);
@ -356,7 +355,6 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_Item, "@item", 60, atcommand_item },
{ AtCommand_Item2, "@item2", 60, atcommand_item2 },
{ AtCommand_ItemReset, "@itemreset", 40, atcommand_itemreset },
{ AtCommand_ItemCheck, "@itemcheck", 60, atcommand_itemcheck },
{ AtCommand_BaseLevelUp, "@lvup", 60, atcommand_baselevelup },
{ AtCommand_BaseLevelUp, "@blevel", 60, atcommand_baselevelup },
{ AtCommand_BaseLevelUp, "@baselvlup", 60, atcommand_baselevelup },
@ -525,7 +523,7 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_Trade, "@trade", 60, atcommand_trade },
{ AtCommand_Send, "@send", 60, atcommand_send },
{ AtCommand_SetBattleFlag, "@setbattleflag", 99, atcommand_setbattleflag },
{ AtCommand_UnMute, "@unmute", 60, atcommand_unmute }, // [Valaris]
{ AtCommand_UnMute, "@unmute", 80, atcommand_unmute }, // [Valaris]
{ AtCommand_Clearweather, "@clearweather", 99, atcommand_clearweather }, // Dexity
{ AtCommand_UpTime, "@uptime", 1, atcommand_uptime }, // by MC Cameri
{ AtCommand_ChangeSex, "@changesex", 60, atcommand_changesex }, // by MC Cameri <- do we still need this? [Foruken] <- why not? [Skotlex]
@ -2755,20 +2753,6 @@ int atcommand_itemreset(
return 0;
}
/*==========================================
*
*------------------------------------------
*/
int atcommand_itemcheck(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
nullpo_retr(-1, sd);
pc_checkitem(sd);
return 0;
}
/*==========================================
* Atcommand @lvlup
*------------------------------------------
@ -7167,12 +7151,12 @@ atcommand_killer(
const char* command, const char* message)
{
nullpo_retr(-1, sd);
sd->special_state.killer = !sd->special_state.killer;
sd->state.killer = !sd->state.killer;
if(sd->special_state.killer)
if(sd->state.killer)
clif_displaymessage(fd, msg_txt(241));
else
clif_displaymessage(fd, msg_txt(242));
else
clif_displaymessage(fd, msg_txt(287));
return 0;
}
@ -7188,12 +7172,12 @@ atcommand_killable(
const char* command, const char* message)
{
nullpo_retr(-1, sd);
sd->special_state.killable = !sd->special_state.killable;
sd->state.killable = !sd->state.killable;
if(sd->special_state.killable)
if(sd->state.killable)
clif_displaymessage(fd, msg_txt(242));
else
clif_displaymessage(fd, msg_txt(241));
else
clif_displaymessage(fd, msg_txt(288));
return 0;
}
@ -7215,14 +7199,14 @@ atcommand_charkillable(
return -1;
if((pl_sd=map_nick2sd((char *) message)) == NULL)
return -1;
return -1;
pl_sd->special_state.killable = !pl_sd->special_state.killable;
pl_sd->state.killable = !pl_sd->state.killable;
if(pl_sd->special_state.killable)
clif_displaymessage(fd, "The player is now killable");
else
clif_displaymessage(fd, "The player is no longer killable");
if(pl_sd->state.killable)
clif_displaymessage(fd, msg_txt(289));
else
clif_displaymessage(fd, msg_txt(290));
return 0;
}
@ -9511,12 +9495,12 @@ atcommand_charkillableid(
if((pl_sd= (struct map_session_data *) session[session_id]->session_data) == NULL)
return -1;
pl_sd->special_state.killable = !pl_sd->special_state.killable;
pl_sd->state.killable = !pl_sd->state.killable;
if(pl_sd->special_state.killable)
clif_displaymessage(fd, "The player is now killable");
else
clif_displaymessage(fd, "The player is no longer killable");
if(pl_sd->state.killable)
clif_displaymessage(fd, msg_txt(289));
else
clif_displaymessage(fd, msg_txt(290));
}
else
{
@ -9550,14 +9534,14 @@ atcommand_charkillableid2(
if ((session_id=accountid2sessionid(aid))!=0)
{
if((pl_sd= (struct map_session_data *) session[session_id]->session_data) == NULL)
return -1;
return -1;
pl_sd->special_state.killable = !pl_sd->special_state.killable;
pl_sd->state.killable = !pl_sd->state.killable;
if(pl_sd->special_state.killable)
clif_displaymessage(fd, "The player is now killable");
if(pl_sd->state.killable)
clif_displaymessage(fd, msg_txt(289));
else
clif_displaymessage(fd, "The player is no longer killable");
clif_displaymessage(fd, msg_txt(290));
}
else
{

View File

@ -44,7 +44,6 @@ enum AtCommandType {
AtCommand_Item,
AtCommand_Item2,
AtCommand_ItemReset,
AtCommand_ItemCheck,
AtCommand_BaseLevelUp,
AtCommand_JobLevelUp,
AtCommand_H,

View File

@ -2722,9 +2722,13 @@ struct Damage battle_calc_attack( int attack_type,
memset(&d,0,sizeof(d));
break;
}
if (d.damage + d.damage2 < 1 && d.dmg_lv != ATK_LUCKY)
//Miss/Absorbed
if (d.damage + d.damage2 < 1)
{ //Miss/Absorbed
//Weapon attacks should go through to cause additional effects.
if (d.dmg_lv != ATK_LUCKY && attack_type&(BF_MAGIC|BF_MISC))
d.dmg_lv = ATK_FLEE;
d.dmotion = 0;
}
return d;
}
@ -3182,7 +3186,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
TBL_PC *sd = (TBL_PC*)t_bl;
if (sd->state.monster_ignore && t_bl != s_bl && flag&BCT_ENEMY)
return 0; //Global inmunity to attacks.
if (sd->special_state.killable && t_bl != s_bl)
if (sd->state.killable && t_bl != s_bl)
{
state |= BCT_ENEMY; //Universal Victim
strip_enemy = 0;
@ -3241,7 +3245,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
case BL_PC:
{
TBL_PC *sd = (TBL_PC*) s_bl;
if (sd->special_state.killer && s_bl != t_bl)
if (sd->state.killer && s_bl != t_bl)
{
state |= BCT_ENEMY; //Is on a killing rampage :O
strip_enemy = 0;

View File

@ -71,7 +71,7 @@ int log_branch(struct map_session_data *sd)
#endif
FILE *logfp;
if(log_config.enable_logs <= 0)
if(!log_config.enable_logs)
return 0;
nullpo_retr(0, sd);
#ifndef TXT_ONLY
@ -168,7 +168,7 @@ int log_pick(struct map_session_data *sd, char *type, int mob_id, int nameid, in
int log_zeny(struct map_session_data *sd, char *type, struct map_session_data *src_sd, int amount)
{
// FILE *logfp;
if(log_config.enable_logs <= 0 || (log_config.zeny!=1 && abs(amount)<log_config.zeny))
if(!log_config.enable_logs || (log_config.zeny!=1 && abs(amount)<log_config.zeny))
return 0;
nullpo_retr(0, sd);
@ -200,7 +200,7 @@ int log_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp)
{
FILE *logfp;
if(log_config.enable_logs <= 0)
if(!log_config.enable_logs)
return 0;
nullpo_retr(0, sd);
#ifndef TXT_ONLY
@ -235,7 +235,7 @@ int log_atcommand(struct map_session_data *sd, const char *message)
char t_msg[MESSAGE_SIZE*2+1]; //These are the contents of an @ call, so there shouldn't be overflow danger here?
#endif
if(log_config.enable_logs <= 0)
if(!log_config.enable_logs)
return 0;
nullpo_retr(0, sd);
#ifndef TXT_ONLY
@ -270,7 +270,7 @@ int log_npc(struct map_session_data *sd, const char *message)
char t_msg[255+1]; //it's 255 chars MAX.
#endif
if(log_config.enable_logs <= 0)
if(!log_config.enable_logs)
return 0;
nullpo_retr(0, sd);
#ifndef TXT_ONLY

View File

@ -502,6 +502,8 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
status_change_end(bl, SC_CLOSECONFINE2, -1);
// if (sc->data[SC_BLADESTOP].timer != -1) //Won't stop when you are knocked away, go figure...
// status_change_end(bl, SC_BLADESTOP, -1);
if (sc->data[SC_BASILICA].timer != -1)
status_change_end(bl, SC_BASILICA, -1);
}
}
if (moveblock) map_delblock_sub(bl,0);

View File

@ -540,13 +540,13 @@ struct map_session_data {
unsigned blockedmove :1;
unsigned using_fake_npc :1;
unsigned rewarp :1; //Signals that a player should warp as soon as he is done loading a map. [Skotlex]
unsigned killer : 1;
unsigned killable : 1;
unsigned short autoloot;
struct guild *gmaster_flag;
} state;
struct {
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;
unsigned killer : 1;
unsigned killable : 1;
unsigned restart_full_recover : 1;
unsigned no_castcancel : 1;
unsigned no_castcancel2 : 1;

View File

@ -2425,6 +2425,8 @@ int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip)
//Check validity
if( nameid <= 0 || cardid <= 0 ||
sd->status.inventory[idx_equip].amount < 1 || //These two should never be required due to pc_delitem zero'ing the data.
sd->status.inventory[idx_card].amount < 1 ||
(sd->inventory_data[idx_equip]->type!=IT_WEAPON && sd->inventory_data[idx_equip]->type!=IT_ARMOR)||
sd->inventory_data[idx_card]->type!=IT_CARD || // Prevent Hack [Ancyker]
sd->status.inventory[idx_equip].identify==0 ||

View File

@ -6094,9 +6094,7 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
case HP_BASILICA:
skill_clear_unitgroup(src);
sg = skill_unitsetting(src,skillid,skilllv,x,y,0);
sc_start4(src,type,100,
skilllv,0,BCT_SELF,sg->group_id,
skill_get_time(skillid,skilllv));
sc_start(src,type,100,skilllv,skill_get_time(skillid,skilllv));
flag|=1;
break;
case CG_HERMODE:
@ -7355,7 +7353,6 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in
if (sc && sc->data[type].timer!=-1)
status_change_end(bl,type,-1);
break;
case UNT_BASILICA: //Clear basilica if the owner moved [Skotlex]
case UNT_HERMODE: //Clear Hermode if the owner moved.
if (sc && sc->data[type].timer!=-1 && sc->data[type].val3 == BCT_SELF && sc->data[type].val4 == sg->group_id)
status_change_end(bl,type,-1);

View File

@ -5925,10 +5925,12 @@ int status_change_end( struct block_list* bl , int type,int tid )
}
break;
case SC_HERMODE:
case SC_BASILICA: //Clear the skill area. [Skotlex]
if(sc->data[type].val3 == BCT_SELF)
skill_clear_unitgroup(bl);
break;
case SC_BASILICA: //Clear the skill area. [Skotlex]
skill_clear_unitgroup(bl);
break;
case SC_MOONLIT: //Clear the unit effect. [Skotlex]
skill_setmapcell(bl,CG_MOONLIT, sc->data[SC_MOONLIT].val1, CELL_CLRMOONLIT);
break;