summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-SVN.txt6
-rw-r--r--src/map/atcommand.c1
-rw-r--r--src/map/clif.c34
-rw-r--r--src/map/mob.c15
-rw-r--r--src/map/skill.c2
5 files changed, 32 insertions, 26 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index dc452f6c1..4778e345c 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -1,5 +1,11 @@
Date Added
+03/01
+ * Fixed /resetstate /resetskill being unuseable at all [celest]
+ * Fixed /mm /mapmove being useable by all players [celest]
+ * Fixed some compile errors in mob_once_spawn [celest]
+ * Corrected a typo in Chemical Protection skills, thanks to holyfork [celest]
+
02/28
* Fixed SQL Castle saving bugs [Lupus]
* Corrected Tiger Fist, Chain Crush, and Palm Push Strike damage, thanks to
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3169c75ab..ded7d593d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -489,6 +489,7 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_CleanMap, "@cleanmap", 0, atcommand_cleanmap },
{ AtCommand_NpcTalk, "@npctalk", 0, atcommand_npctalk },
{ AtCommand_PetTalk, "@pettalk", 0, atcommand_pettalk },
+ { AtCommand_ResetState, "/reset", 40, NULL },
#ifndef TXT_ONLY // sql-only commands
{ AtCommand_CheckMail, "@checkmail", 1, atcommand_listmail }, // [Valaris]
diff --git a/src/map/clif.c b/src/map/clif.c
index 020d8d3a2..d658866cc 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8053,7 +8053,8 @@ void clif_parse_MapMove(int fd, struct map_session_data *sd) {
// not needed -- map_name[16]='\0'; will do
// memset(map_name, '\0', sizeof(map_name));
- if (battle_config.atc_gmonly != 0 || (pc_isGM(sd) >= get_atcommand_level(AtCommand_MapMove))) {
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ (pc_isGM(sd) >= get_atcommand_level(AtCommand_MapMove))) {
memcpy(map_name, RFIFOP(fd,2), 16);
map_name[16]='\0';
sprintf(output, "%s %d %d", map_name, RFIFOW(fd,18), RFIFOW(fd,20));
@@ -9440,15 +9441,14 @@ void clif_parse_SolveCharName(int fd, struct map_session_data *sd) {
void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
nullpo_retv(sd);
- if (battle_config.atc_gmonly == 0 || pc_isGM(sd)) {
+ if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
+ pc_isGM(sd) >= get_atcommand_level(AtCommand_ResetState)) {
switch(RFIFOW(fd,2)){
case 0:
- if (pc_isGM(sd) >= get_atcommand_level(AtCommand_ResetState))
- pc_resetstate(sd);
+ pc_resetstate(sd);
break;
case 1:
- if (pc_isGM(sd) >= get_atcommand_level(AtCommand_ResetState))
- pc_resetskill(sd);
+ pc_resetskill(sd);
break;
}
}
@@ -9720,13 +9720,12 @@ void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd) {
*/
void clif_parse_PartyMessage(int fd, struct map_session_data *sd) {
nullpo_retv(sd);
- if (is_charcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != CharCommand_None)
- return;
- if (is_atcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != AtCommand_None)
- return;
- if(sd->sc_data &&
+
+ if (is_charcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != CharCommand_None ||
+ is_atcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != AtCommand_None ||
+ (sd->sc_data &&
(sd->sc_data[SC_BERSERK].timer!=-1 || //バーサーク時は会話も不可
- sd->sc_data[SC_NOCHAT].timer!=-1)) //チャット禁止
+ sd->sc_data[SC_NOCHAT].timer!=-1))) //チャット禁止
return;
party_send_message(sd, (char*)RFIFOP(fd,4), RFIFOW(fd,2)-4);
@@ -9931,13 +9930,12 @@ void clif_parse_GuildExplusion(int fd,struct map_session_data *sd) {
*/
void clif_parse_GuildMessage(int fd,struct map_session_data *sd) {
nullpo_retv(sd);
- if (is_charcommand(fd, sd, (char*)RFIFOP(fd, 4), 0) != CharCommand_None)
- return;
- if (is_atcommand(fd, sd, (char*)RFIFOP(fd, 4), 0) != AtCommand_None)
- return;
- if(sd->sc_data &&
+
+ if (is_charcommand(fd, sd, (char*)RFIFOP(fd, 4), 0) != CharCommand_None ||
+ is_atcommand(fd, sd, (char*)RFIFOP(fd, 4), 0) != AtCommand_None ||
+ (sd->sc_data &&
(sd->sc_data[SC_BERSERK].timer!=-1 || //バーサーク時は会話も不可
- sd->sc_data[SC_NOCHAT].timer!=-1)) //チャット禁止
+ sd->sc_data[SC_NOCHAT].timer!=-1))) //チャット禁止
return;
guild_send_message(sd, (char*)RFIFOP(fd,4), RFIFOW(fd,2)-4);
diff --git a/src/map/mob.c b/src/map/mob.c
index c2702817a..30d066600 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -121,8 +121,8 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
{
struct mob_data *md=NULL;
int m,count,lv=255,r=class_;
- int c,j=0;
-
+ int i, j;
+
if( sd )
lv=sd->status.base_level;
@@ -135,8 +135,8 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
return 0;
if(class_<0){ // ランダムに召喚
- int i=0;
- int j=-class_-1;
+ i = 0;
+ j = -class_-1;
int k;
if(j>=0 && j<MAX_RANDOMMONSTER){
do{
@@ -157,18 +157,19 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
if (x <= 0 || y <= 0) {
if (x <= 0) x = sd->bl.x + rand() % 3 - 1;
if (y <= 0) y = sd->bl.y + rand() % 3 - 1;
- if ((c = map_getcell(m, x, y)) == 1 || c == 5) {
+ if (map_getcell(m, x, y, CELL_CHKNOPASS)) {
x = sd->bl.x;
y = sd->bl.y;
}
}
} else if (x <= 0 || y <= 0) {
+ i = j = 0;
printf("mob_once_spawn: %i at %s x:%i y:%i\n ??\n",class_,map[m].name,x,y); //got idea from Freya [Lupus]
do {
x = rand() % (map[m].xs - 2) + 1;
y = rand() % (map[m].ys - 2) + 1;
- } while (((c = map_getcell(m, x, y)) == 1 || c == 5) && j++ < 64);
- if (c == 1 || c == 5) { // not solved?
+ } while ((i=map_getcell(m, x, y, CELL_CHKNOPASS)) && j++ < 64);
+ if (i) { // not solved?
x = 0;
y = 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 85bb081a7..58af63888 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3901,7 +3901,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
struct status_change *tsc_data = status_get_sc_data(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if(tsc_data && tsc_data[scid].timer != -1)
- status_change_end(bl, SC_STRIPWEAPON, -1 );
+ status_change_end(bl, scid, -1 );
status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
}
break;