summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt2
-rw-r--r--src/map/atcommand.c30
-rw-r--r--src/map/atcommand.h1
-rw-r--r--src/map/skill.c4
4 files changed, 35 insertions, 2 deletions
diff --git a/Changelog.txt b/Changelog.txt
index af86481c2..56c1592ba 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,6 +1,8 @@
Date Added
01/27
+ * Added @changelook command for spriters to test view ID's [celest]
+ * Added a check to Pneuma to prevent crashing [celest]
* Tweaked garbage collection code after feedback from users
[SVN 1002: MouseJstr]
* Fixed TRADE exploits (it cures proxy hack / vending+trade hack) thanks to Freya [Lupus]
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 962180f85..ff202a631 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -252,6 +252,7 @@ ACMD_FUNC(charkillableid2); // by Dino9021
ACMD_FUNC(sound);
ACMD_FUNC(undisguiseall);
ACMD_FUNC(disguiseall);
+ACMD_FUNC(changelook);
/*==========================================
*AtCommandInfo atcommand_info[]構造体の定義
@@ -524,6 +525,7 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_Sound, "@sound", 40, atcommand_sound },
{ AtCommand_UndisguiseAll, "@undisguiseall", 99, atcommand_undisguiseall },
{ AtCommand_DisguiseAll, "@disguiseall", 99, atcommand_disguiseall },
+ { AtCommand_ChangeLook, "@changelook", 99, atcommand_changelook },
// add new commands before this line
{ AtCommand_Unknown, NULL, 1, NULL }
@@ -7503,6 +7505,34 @@ atcommand_grind2(const int fd, struct map_session_data* sd,
return 0;
}
+/*==========================================
+ * @changelook by [Celest]
+ *------------------------------------------
+ */
+int
+atcommand_changelook(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ int i, j = 0, k = 0;
+ int pos[6] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES };
+
+ if((i = sscanf(message, "%d %d", &j, &k)) < 1) {
+ clif_displaymessage(fd, "Usage: @changelook [<position>] <view id> -- [] = optional");
+ clif_displaymessage(fd, "Position: 1-Top 2-Middle 3-Bottom 4-Weapon 5-Shield");
+ return -1;
+ } else if (i == 2) {
+ if (j < 1) j = 1;
+ else if (j > 6) j = 6; // 6 = Shoes - for beta clients only perhaps
+ j = pos[j - 1];
+ } else if (i == 1) { // position not defined, use HEAD_TOP as default
+ k = j; // swap
+ j = LOOK_HEAD_TOP;
+ }
+
+ clif_changelook(&sd->bl,j,k);
+
+ return 0;
+}
/*==========================================
* It is made to rain.
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 754a741b7..be2bdcbcb 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -235,6 +235,7 @@ enum AtCommandType {
AtCommand_Sound,
AtCommand_UndisguiseAll,
AtCommand_DisguiseAll,
+ AtCommand_ChangeLook,
// end
AtCommand_Unknown,
diff --git a/src/map/skill.c b/src/map/skill.c
index 2546e56e0..9ca9dd6b2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5943,8 +5943,8 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
if(sc_data) {
if (sc_data[type].timer==-1)
status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
- else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
- if(DIFF_TICK(sg->tick,unit2->group->tick)>0 )
+ else if((unit2 = (struct skill_unit *)sc_data[type].val2) && unit2 != src){
+ if(unit2->group && DIFF_TICK(sg->tick,unit2->group->tick) > 0)
status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
ts->tick-=sg->interval;
}