summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-02 21:11:50 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-02 21:11:50 +0000
commit792b211d40f10e938b1041974b04e911bd5e4ba4 (patch)
tree9dcb8e7613cc5e28e4f7bc12d4f85e773d3dc2b3 /src/char
parentb8cecabe98a2d0762d945a08d52f6a37587ce83d (diff)
downloadhercules-792b211d40f10e938b1041974b04e911bd5e4ba4.tar.gz
hercules-792b211d40f10e938b1041974b04e911bd5e4ba4.tar.bz2
hercules-792b211d40f10e938b1041974b04e911bd5e4ba4.tar.xz
hercules-792b211d40f10e938b1041974b04e911bd5e4ba4.zip
- Fame list size is now defined by MAX_FAME_LIST constant (mmo.h)
- Char server can now specify the max size for blacksmith/alchemist/taekwon rankers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5435 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/char/char.c b/src/char/char.c
index d1c145077..92fe33f88 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -128,6 +128,11 @@ int start_zeny = 500;
int start_weapon = 1201;
int start_armor = 2301;
+//Custom limits for the fame lists. [Skotlex]
+int fame_list_size_chemist = MAX_FAME_LIST;
+int fame_list_size_smith = MAX_FAME_LIST;
+int fame_list_size_taekwon = MAX_FAME_LIST;
+
// Initial position (it's possible to set it in conf file)
struct point start_point = { 0, 53, 111};
@@ -2888,7 +2893,7 @@ int parse_frommap(int fd) {
// starting to send to map
WBUFW(buf,0) = 0x2b1b;
// add list for blacksmiths
- for (i = 0, j = 0; i < char_num && j < 10; i++) {
+ for (i = 0, j = 0; i < char_num && j < fame_list_size_smith; i++) {
if (char_dat[id[i]].status.fame && (char_dat[id[i]].status.class_ == 10 ||
char_dat[id[i]].status.class_ == 4011 ||
char_dat[id[i]].status.class_ == 4033))
@@ -2906,7 +2911,7 @@ int parse_frommap(int fd) {
WBUFW(buf, 6) = len;
// add list for alchemists
- for (i = 0, j = 0; i < char_num && j < 10; i++) {
+ for (i = 0, j = 0; i < char_num && j < fame_list_size_chemist; i++) {
if (char_dat[id[i]].status.fame && (char_dat[id[i]].status.class_ == 18 ||
char_dat[id[i]].status.class_ == 4019 ||
char_dat[id[i]].status.class_ == 4041))
@@ -2924,7 +2929,7 @@ int parse_frommap(int fd) {
WBUFW(buf, 4) = len;
// adding list for taekwons
- for (i = 0, j = 0; i < char_num && j < 10; i++) {
+ for (i = 0, j = 0; i < char_num && j < fame_list_size_taekwon; i++) {
if (char_dat[id[i]].status.fame && char_dat[id[i]].status.class_ == 4046)
{
fame_item.id = char_dat[id[i]].status.char_id;
@@ -3997,6 +4002,24 @@ int char_config_read(const char *cfgName) {
} else if (strcmpi(w1, "console") == 0) {
if(strcmpi(w2,"on") == 0 || strcmpi(w2,"yes") == 0 )
console = 1;
+ } else if (strcmpi(w1, "fame_list_alchemist") == 0) {
+ fame_list_size_chemist = atoi(w2);
+ if (fame_list_size_chemist > MAX_FAME_LIST) {
+ ShowWarning("Max fame list size is %d (fame_list_alchemist)\n", MAX_FAME_LIST);
+ fame_list_size_chemist = MAX_FAME_LIST;
+ }
+ } else if (strcmpi(w1, "fame_list_blacksmith") == 0) {
+ fame_list_size_smith = atoi(w2);
+ if (fame_list_size_smith > MAX_FAME_LIST) {
+ ShowWarning("Max fame list size is %d (fame_list_blacksmith)\n", MAX_FAME_LIST);
+ fame_list_size_smith = MAX_FAME_LIST;
+ }
+ } else if (strcmpi(w1, "fame_list_taekwon") == 0) {
+ fame_list_size_taekwon = atoi(w2);
+ if (fame_list_size_taekwon > MAX_FAME_LIST) {
+ ShowWarning("Max fame list size is %d (fame_list_taekwon)\n", MAX_FAME_LIST);
+ fame_list_size_taekwon = MAX_FAME_LIST;
+ }
} else if (strcmpi(w1, "import") == 0) {
char_config_read(w2);
}