summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/charcommand.h10
-rw-r--r--src/map/guild.c15
-rw-r--r--src/map/map.c3
-rw-r--r--src/map/skill.c11
-rw-r--r--src/map/status.c11
5 files changed, 27 insertions, 23 deletions
diff --git a/src/map/charcommand.h b/src/map/charcommand.h
index 741d5eb9e..a081000d8 100644
--- a/src/map/charcommand.h
+++ b/src/map/charcommand.h
@@ -34,8 +34,6 @@ enum CharCommandType {
CharCommandChangeSex,
CharCommandFeelReset, // Komurka
CharCommandHelp,
-
-
#ifdef TXT_ONLY
/* TXT_ONLY */
@@ -53,7 +51,13 @@ enum CharCommandType {
};
typedef enum CharCommandType CharCommandType;
-typedef struct AtCommandInfo CharCommandInfo;
+typedef struct CharCommandInfo {
+ CharCommandType type;
+ const char* command;
+ int level;
+ int (*proc)(const int, struct map_session_data*,
+ const char* command, const char* message);
+} CharCommandInfo;
CharCommandType
is_charcommand(const int fd, struct map_session_data* sd, const char* message, int gmlvl);
diff --git a/src/map/guild.c b/src/map/guild.c
index 2515cc4a3..751f2efad 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1401,19 +1401,20 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
if( guild_get_alliance_count(g,1)>=3 ) // 敵対数確認
clif_guild_oppositionack(sd,1);
+ if(agit_flag) {
+ clif_displaymessage(sd->fd,"You cannot make oppositions during Guild Wars!");
+ return 0;
+ }
+
for(i=0;i<MAX_GUILDALLIANCE;i++){ // すでに関係を持っているか確認
if(g->alliance[i].guild_id==tsd->status.guild_id){
if(g->alliance[i].opposition==1){ // すでに敵対
clif_guild_oppositionack(sd,2);
return 0;
- } else { //Change alliance to opposition.
- if(agit_flag) {
- clif_displaymessage(sd->fd,"You cannot break an alliance during Guild Wars!");
- return 0;
- }
- intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
- sd->status.account_id,tsd->status.account_id,8 );
}
+ //Change alliance to opposition.
+ intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
+ sd->status.account_id,tsd->status.account_id,8 );
}
}
diff --git a/src/map/map.c b/src/map/map.c
index 7766e194c..a8672ee49 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2671,9 +2671,8 @@ static int map_cache_write(struct map_data *m)
map_cache.map[i].water_height = m->water_height;
map_cache.head.filesize += len_new;
map_cache.dirty = 1;
- if(map_read_flag == 2) {
+ if(map_read_flag == 2)
aFree(write_buf);
- }
return 0;
}
}
diff --git a/src/map/skill.c b/src/map/skill.c
index e504fcf99..f1298ae50 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -9838,21 +9838,21 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in
case BS_IRON:
case BS_STEEL:
case BS_ENCHANTEDSTONE:
- { // Ores & Metals Refining - skill bonuses are straight from kRO website [DracoRPG]
- int skill = pc_checkskill(sd,skill_id);
+ // Ores & Metals Refining - skill bonuses are straight from kRO website [DracoRPG]
+ i = pc_checkskill(sd,skill_id);
make_per = sd->status.job_level*20 + status->dex*10 + status->luk*10; //Base chance
switch(nameid){
case 998: // Iron
- make_per += 4000+skill*500; // Temper Iron bonus: +26/+32/+38/+44/+50
+ make_per += 4000+i*500; // Temper Iron bonus: +26/+32/+38/+44/+50
break;
case 999: // Steel
- make_per += 3000+skill*500; // Temper Steel bonus: +35/+40/+45/+50/+55
+ make_per += 3000+i*500; // Temper Steel bonus: +35/+40/+45/+50/+55
break;
case 1000: //Star Crumb
make_per = 100000; // Star Crumbs are 100% success crafting rate? (made 1000% so it succeeds even after penalties) [Skotlex]
break;
default: // Enchanted Stones
- make_per += 1000+skill*500; // Enchantedstone Craft bonus: +15/+20/+25/+30/+35
+ make_per += 1000+i*500; // Enchantedstone Craft bonus: +15/+20/+25/+30/+35
break;
}
break;
@@ -9930,7 +9930,6 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in
default:
make_per = 5000;
break;
- }
}
} else { // Weapon Forging - skill bonuses are straight from kRO website, other things from a jRO calculator [DracoRPG]
make_per = 5000 + sd->status.job_level*20 + status->dex*10 + status->luk*10; // Base
diff --git a/src/map/status.c b/src/map/status.c
index 9dd77e727..bd58b91b0 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -354,10 +354,11 @@ void initChangeTables(void) {
// set_sc(NJ_KAENSIN, SC_KAENSIN, SI_BLANK);
set_sc(NJ_SUITON, SC_SUITON, SI_BLANK, SCB_AGI);
set_sc(NJ_NEN, SC_NEN, SI_NEN, SCB_STR|SCB_INT);
- set_sc(HLIF_AVOID, SC_AVOID, SI_BLANK, SCB_SPEED);
- set_sc(HLIF_CHANGE, SC_CHANGE, SI_BLANK, SCB_INT);
- set_sc(HAMI_BLOODLUST, SC_BLOODLUST, SI_BLANK, SCB_BATK|SCB_WATK);
- set_sc(HFLI_FLEET, SC_FLEET, SI_BLANK, SCB_ASPD|SCB_BATK|SCB_WATK);
+// FIXME: These skills have IDs of 8k and above, how do I fix these issues??
+// set_sc(HLIF_AVOID, SC_AVOID, SI_BLANK, SCB_SPEED);
+// set_sc(HLIF_CHANGE, SC_CHANGE, SI_BLANK, SCB_INT);
+// set_sc(HAMI_BLOODLUST, SC_BLOODLUST, SI_BLANK, SCB_BATK|SCB_WATK);
+// set_sc(HFLI_FLEET, SC_FLEET, SI_BLANK, SCB_ASPD|SCB_BATK|SCB_WATK);
// Storing the target job rather than simply SC_SPIRIT simplifies code later on.
SkillStatusChangeTable[SL_ALCHEMIST] = MAPID_ALCHEMIST,
@@ -1994,7 +1995,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
status->hp=status->max_hp>>1;
else
status->hp=status->max_hp * battle_config.restart_hp_rate/100;
- if(status->hp < 0)
+ if(!status->hp)
status->hp = 1;
status->sp = status->max_sp * battle_config.restart_sp_rate /100;