summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDastgir Pojee <dastgirp@gmail.com>2016-10-02 19:13:21 +0530
committerhemagx <ibrahem.h.basyone@gmail.com>2016-10-22 02:21:46 +0200
commitabb834567db53424ea84ea4903d18ac9d3b3f61a (patch)
tree9cab2d18ee7d909e5be852723141ef2d3a492c0f /src
parentb21e4ad15f1a81154553662ecf330d6a6694dd15 (diff)
downloadhercules-abb834567db53424ea84ea4903d18ac9d3b3f61a.tar.gz
hercules-abb834567db53424ea84ea4903d18ac9d3b3f61a.tar.bz2
hercules-abb834567db53424ea84ea4903d18ac9d3b3f61a.tar.xz
hercules-abb834567db53424ea84ea4903d18ac9d3b3f61a.zip
Added Summoner Class.
(Only Placeholder, other things related to summoner will follow-up soon) Added SQL-Upgrade: Added `class` column in charlog
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c8
-rw-r--r--src/char/inter.c3
-rw-r--r--src/map/itemdb.c5
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/pc.c11
5 files changed, 22 insertions, 6 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 4beeff00a..3ce8e9040 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1591,7 +1591,7 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
// Insert the new char entry to the database
if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `status_point`,`str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
"`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
- "'%d', '%d', '%s', '%d', '%d','%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
+ "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
char_db, sd->account_id , slot, esc_name, starting_job, start_zeny, 48, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) )
@@ -1603,7 +1603,7 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
//Insert the new char entry to the database
if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
"`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
- "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
+ "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
char_db, sd->account_id , slot, esc_name, starting_job, start_zeny, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) )
@@ -1622,7 +1622,7 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
if (chr->enable_logs) {
if (SQL_ERROR == SQL->Query(inter->sql_handle,
"INSERT INTO `%s` (`time`, `char_msg`, `account_id`, `char_id`, `char_num`, `class`, `name`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hair`, `hair_color`)"
- "VALUES (NOW(), '%s', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+ "VALUES (NOW(), '%s', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
charlog_db, "make new char", sd->account_id, char_id, slot, starting_job, esc_name, str, agi, vit, int_, dex, luk, hair_style, hair_color))
Sql_ShowDebug(inter->sql_handle);
}
@@ -4656,7 +4656,7 @@ void char_parse_char_create_new_char(int fd, struct char_session_data* sd)
}
#if PACKETVER >= 20151001
RFIFOSKIP(fd, 36);
-#if PACKETVER >= 20120307
+#elif PACKETVER >= 20120307
RFIFOSKIP(fd, 31);
#else
RFIFOSKIP(fd, 37);
diff --git a/src/char/inter.c b/src/char/inter.c
index 05f2bf4f6..fd3fe8c16 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -389,6 +389,9 @@ const char* inter_job_name(int class_)
case JOB_REBELLION:
return inter->msg_txt(655);
+ case JOB_SUMMONER:
+ return inter->msg_txt(669);
+
default:
return inter->msg_txt(620); // "Unknown Job"
}
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 2e44393fe..97f302b80 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -437,6 +437,9 @@ void itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable)
case JOB_REBELLION:
mask[1] = 1ULL << MAPID_GUNSLINGER;
break;
+ case JOB_SUMMONER:
+ mask[0] = 1ULL << MAPID_SUMMONER;
+ break;
// Other Classes
case JOB_GANGSI: //Bongun/Munak
mask[0] = 1ULL << MAPID_GANGSI;
@@ -538,6 +541,8 @@ void itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask)
bclass[1] |= 1ULL<<MAPID_NINJA;
if (jobmask & 1ULL<<30) //Rebellion
bclass[1] |= 1ULL<<MAPID_GUNSLINGER;
+ if (jobmask & 1ULL<<31) //Summoner
+ bclass[0] |= 1ULL<<MAPID_SUMMONER;
}
void create_dummy_data(void)
diff --git a/src/map/map.h b/src/map/map.h
index 723691971..c186dab4a 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -88,6 +88,7 @@ enum {
MAPID_XMAS,
MAPID_SUMMER,
MAPID_GANGSI,
+ MAPID_SUMMONER,
//2-1 Jobs
MAPID_SUPER_NOVICE = JOBL_2_1|0x0,
MAPID_KNIGHT,
diff --git a/src/map/pc.c b/src/map/pc.c
index 0674f0137..b6f2d375d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1749,7 +1749,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
sd->sktree.second = sd->sktree.third = 0;
// limit 1st class and above to novice job levels
- if(skill_point < novice_skills) {
+ if(skill_point < novice_skills && (sd->class_&MAPID_BASEMASK) != MAPID_SUMMONER) {
c = MAPID_NOVICE;
}
// limit 2nd class and above to first class job levels (super novices are exempt)
@@ -5881,6 +5881,7 @@ int pc_jobid2mapid(unsigned short b_class)
case JOB_XMAS: return MAPID_XMAS;
case JOB_SUMMER: return MAPID_SUMMER;
case JOB_GANGSI: return MAPID_GANGSI;
+ case JOB_SUMMONER: return MAPID_SUMMONER;
//2-1 Jobs
case JOB_SUPER_NOVICE: return MAPID_SUPER_NOVICE;
case JOB_KNIGHT: return MAPID_KNIGHT;
@@ -6023,6 +6024,7 @@ int pc_mapid2jobid(unsigned short class_, int sex)
case MAPID_XMAS: return JOB_XMAS;
case MAPID_SUMMER: return JOB_SUMMER;
case MAPID_GANGSI: return JOB_GANGSI;
+ case MAPID_SUMMONER: return JOB_SUMMONER;
//2-1 Jobs
case MAPID_SUPER_NOVICE: return JOB_SUPER_NOVICE;
case MAPID_KNIGHT: return JOB_KNIGHT;
@@ -6362,6 +6364,9 @@ const char* job_name(int class_)
case JOB_REBELLION:
return msg_txt(655);
+ case JOB_SUMMONER:
+ return msg_txt(669);
+
default:
return msg_txt(620); // "Unknown Job"
}
@@ -6487,6 +6492,7 @@ int pc_check_job_name(const char *name) {
{ "Kagerou", JOB_KAGEROU },
{ "Oboro", JOB_OBORO },
{ "Rebellion", JOB_REBELLION },
+ { "Summoner", JOB_SUMMONER },
};
nullpo_retr(-1, name);
@@ -11644,7 +11650,8 @@ bool pc_db_checkid(unsigned int class_)
|| (class_ >= JOB_BABY_RUNE && class_ <= JOB_BABY_MECHANIC2 )
|| (class_ >= JOB_SUPER_NOVICE_E && class_ <= JOB_SUPER_BABY_E )
|| (class_ >= JOB_KAGEROU && class_ <= JOB_OBORO )
- || (class_ >= JOB_REBELLION && class_ < JOB_MAX );
+ || (class_ == JOB_REBELLION)
+ || (class_ >= JOB_SUMMONER && class_ < JOB_MAX );
}
/**