Sfoglia il codice sorgente

- 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

skotlex 19 anni fa
parent
commit
305fa67812

+ 6 - 0
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).

+ 2 - 1
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

+ 4 - 3
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;
 	}

+ 2 - 2
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

+ 2 - 2
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;

+ 1 - 1
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)