Browse Source

Fixed some guild skill offset calculation mistakes -_-

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11732 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 17 years ago
parent
commit
4957a893e5
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/map/guild.c
  2. 2 2
      src/map/status.c

+ 1 - 1
src/map/guild.c

@@ -72,7 +72,7 @@ static int guild_send_xy_timer(int tid,unsigned int tick,int id,int data);
  // Modified [Komurka]
  // Modified [Komurka]
 int guild_skill_get_max (int id)
 int guild_skill_get_max (int id)
 {
 {
-	if (id  < GD_SKILLBASE || id > GD_SKILLBASE+MAX_GUILDSKILL)
+	if (id < GD_SKILLBASE || id >= GD_SKILLBASE+MAX_GUILDSKILL)
 		return 0;
 		return 0;
 	return guild_skill_tree[id-GD_SKILLBASE].max;
 	return guild_skill_tree[id-GD_SKILLBASE].max;
 }
 }

+ 2 - 2
src/map/status.c

@@ -66,7 +66,7 @@ int current_equip_card_id; //To prevent card-stacking (from jA) [Skotlex]
 static void add_sc(int skill, int sc)
 static void add_sc(int skill, int sc)
 {
 {
 	int sk = skill;
 	int sk = skill;
-	if (sk > GD_SKILLBASE) sk = skill - GD_SKILLBASE + SC_GD_BASE;
+	if (sk >= GD_SKILLBASE) sk = skill - GD_SKILLBASE + SC_GD_BASE;
 	else
 	else
 	if (sk >= HM_SKILLBASE) sk = skill - HM_SKILLBASE + SC_HM_BASE;
 	if (sk >= HM_SKILLBASE) sk = skill - HM_SKILLBASE + SC_HM_BASE;
 	if (sk < 0 || sk >= MAX_SKILL) {
 	if (sk < 0 || sk >= MAX_SKILL) {
@@ -508,7 +508,7 @@ void initChangeTables(void)
 int SkillStatusChangeTable(int skill)
 int SkillStatusChangeTable(int skill)
 {
 {
 	int sk = skill;
 	int sk = skill;
-	if (sk > GD_SKILLBASE) sk = skill - GD_SKILLBASE + SC_GD_BASE;
+	if (sk >= GD_SKILLBASE) sk = skill - GD_SKILLBASE + SC_GD_BASE;
 	else
 	else
 	if (sk >= HM_SKILLBASE) sk = skill - HM_SKILLBASE + SC_HM_BASE;
 	if (sk >= HM_SKILLBASE) sk = skill - HM_SKILLBASE + SC_HM_BASE;
 	if (sk < 0 || sk >= MAX_SKILL) {
 	if (sk < 0 || sk >= MAX_SKILL) {