From 305fa67812b3a9f5e07f6d7f45feb54e19335f3c Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 11 Jul 2006 20:55:54 +0000 Subject: [PATCH] - Made @monsterignore be an universal ignore. Means you cannot be targetted as an enemy by anything. Also added alias "@battleignore" which does the same as monsterignore. - Fixed magic power setting your min matk as max-matk. - Modified the packets involved in @fakename in hopes it'll refresh correctly on nearby clients now. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7620 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 6 ++++++ conf-tmpl/atcommand_athena.conf | 3 ++- src/map/atcommand.c | 7 ++++--- src/map/battle.c | 4 ++-- src/map/charcommand.c | 4 ++-- src/map/skill.c | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 58fb851317..1d07a6394a 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,12 @@ 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/07/11 + * Made @monsterignore be an universal ignore. Means you cannot be targetted + as an enemy by anything. Also added alias "@battleignore" which does the + same as monsterignore. [Skotlex] + * Fixed magic power setting your min matk as max-matk. [Skotlex] + * Modified the packets involved in @fakename in hopes it'll refresh + correctly on nearby clients now. [Skotlex] * Fixed clif_parse not checking for func_parse before sending data to the connected clients. This in turn required various code-rewrites in: [Skotlex] - duel related messaging functions (added clif targets DUEL/DUEL_WOS). diff --git a/conf-tmpl/atcommand_athena.conf b/conf-tmpl/atcommand_athena.conf index 0cce4e09a1..c77691582b 100644 --- a/conf-tmpl/atcommand_athena.conf +++ b/conf-tmpl/atcommand_athena.conf @@ -707,8 +707,9 @@ mute: 99 mutearea: 99 stfu: 99 -// Make monsters ignore you (admin command) +// Makes you inmune to attacks (monsters/players/skills cannot target/hit you, admin command) monsterignore: 99 +battleignore: 99 //--------------------------------------------------------------- // 99: Weather effects diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9593274773..2104eb1b43 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -590,6 +590,7 @@ static AtCommandInfo atcommand_info[] = { { AtCommand_Me, "@me", 20, atcommand_me }, //added by massdriller, code by lordalfa { AtCommand_MonsterIgnore, "@monsterignore", 99, atcommand_monsterignore }, // [Valaris] + { AtCommand_MonsterIgnore, "@battleignore", 99, atcommand_monsterignore }, { AtCommand_FakeName, "@fakename", 20, atcommand_fakename }, // [Valaris] { AtCommand_Size, "@size", 20, atcommand_size }, { AtCommand_ShowExp, "@showexp", 10, atcommand_showexp}, @@ -9772,10 +9773,10 @@ int atcommand_monsterignore( if (!sd->state.monster_ignore) { sd->state.monster_ignore = 1; - clif_displaymessage(sd->fd, "Monsters will now ignore you."); + clif_displaymessage(sd->fd, "You are now inmune to attacks."); } else { sd->state.monster_ignore = 0; - clif_displaymessage(sd->fd, "Monsters are no longer ignoring you."); + clif_displaymessage(sd->fd, "Returned to normal state."); } return 0; @@ -9795,7 +9796,7 @@ int atcommand_fakename( if((!message || !*message) && strlen(sd->fakename) > 1) { sd->fakename[0]='\0'; - pc_setpos(sd, sd->mapindex, sd->bl.x, sd->bl.y, 3); + clif_charnameack(0, &sd->bl); clif_displaymessage(sd->fd,"Returned to real name."); return 0; } diff --git a/src/map/battle.c b/src/map/battle.c index 0b30f4f1d5..5b5889284c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3028,8 +3028,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f TBL_PC *sd = (TBL_PC*)t_bl; if (sd->invincible_timer != -1 || pc_isinvisible(sd)) return -1; //Cannot be targeted yet. - if (sd->state.monster_ignore && src->type == BL_MOB) - return 0; //option to have monsters ignore GMs [Valaris] + 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) { state |= BCT_ENEMY; //Universal Victim diff --git a/src/map/charcommand.c b/src/map/charcommand.c index 034fb017b0..771fef36be 100644 --- a/src/map/charcommand.c +++ b/src/map/charcommand.c @@ -1246,7 +1246,7 @@ int charcommand_fakename( if(strlen(name) < 1 || !name) { if(strlen(pl_sd->fakename) > 1) { pl_sd->fakename[0]='\0'; - pc_setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, sd->bl.y, 3); + clif_charnameack(0, &pl_sd->bl); clif_displaymessage(sd->fd,"Returned to real name."); } else { clif_displaymessage(sd->fd,"Character does not has a fake name."); @@ -1260,7 +1260,7 @@ int charcommand_fakename( } memcpy(pl_sd->fakename,name, NAME_LENGTH-1); - pc_setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, 3); + clif_charnameack(0, &pl_sd->bl); clif_displaymessage(sd->fd,"Fake name enabled."); return 0; diff --git a/src/map/skill.c b/src/map/skill.c index af9fb74dc5..9b99dd8c24 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6746,7 +6746,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns matk_max = sstatus->matk_max; //Note to NOT return from the function until this is unset! sstatus->matk_min = sc->data[SC_MAGICPOWER].val3; - sstatus->matk_min = sc->data[SC_MAGICPOWER].val4; + sstatus->matk_max = sc->data[SC_MAGICPOWER].val4; } switch (sg->unit_id)