Issue information

Issue ID
#6012
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jun 14, 2012 3:35
Last Post
Hercules Elf Bot
Jul 11, 2012 18:21
Confirmation
N/A

Hercules Elf Bot - Jun 14, 2012 3:35

Originally posted by [b]EvilPuncker[/b]
[quote name='QQfoolsorellina' timestamp='1339520105' post='109838']
[quote name='Brian' timestamp='1339518604' post='109834']
[rev=16279] /no1

[quote name='r16279' timestamp='1339518153']* Merged /branches/renewal/ [rev=14635] to /trunk (follow up to [rev=15060]) [post=106973]pid:106973[/post][/quote]
[/quote]

Hi~~Brian,

First ,thx for Implemented that system.
I think the rune stone amount no longer need to define
we can use this system to limit rune stone amount :)

src/map/pc.c
[code]
if( itemdb_is_rune(item_data->nameid) ) {
int rune = pc_search_inventory(sd,item_data->nameid);
if( ( rune >= 0 && sd->status.inventory[rune].amount + amount > MAX_RUNE ) ||
( rune == -1 && amount > MAX_RUNE )
) {
clif_msgtable(sd->fd,0x61b);
return 1;
}
}

[/code]
a/src/map/skill.c
[code]
if( skill_id == RK_RUNEMASTERY ) {
int temp_qty, skill_lv = pc_checkskill(sd,skill_id);
if( skill_lv == 10 ) temp_qty = 1 + rnd()%3;
else if( skill_lv > 5 ) temp_qty = 1 + rnd()%2;
else temp_qty = 1;
for( i = 0; i < MAX_INVENTORY; i++ ) {
if( sd->status.inventory[i].nameid == nameid ) {
if( sd->status.inventory[i].amount >= MAX_RUNE ) {
clif_msgtable(sd->fd,0x61b);
return 0;
} else {
/**
* the amount fits, say we got temp_qty 4 and 19 runes, we trim temp_qty to 1.
**/
if( temp_qty + sd->status.inventory[i].amount >= MAX_RUNE )
temp_qty = MAX_RUNE - sd->status.inventory[i].amount;
}
break;
}
}
qty = temp_qty;
}

[/code]
src/map/config/classes/swordsman.h
[code]
/// rune knight
///
/// maximum number of runes that a rune knight character can carry at any given time
/// default: 20
#define MAX_RUNE 20
[/code]
[/quote]

Hercules Elf Bot - Jun 14, 2012 4:21

Originally posted by [b]Ind[/b]
the skill.c one is still required afaik o-o since it counts as you craft in order to cap the amounts properly

Hercules Elf Bot - Jun 14, 2012 4:42

Originally posted by [b]EvilPuncker[/b]
indeed, as eARE code:


if(skill_id == RK_RUNEMASTERY)
{ // Now we figure out how many runes we're going to make. :3
int skill_lv = pc_checkskill(sd,skill_id);
if( skill_lv > 4 && skill_lv < 10) // level 5~9 can make 1~2 runes
qty=(rand()%2)+1;
else if( skill_lv == 10 ) // Level 10 can make 1~3 runes
qty=(rand()%3)+1;

// Check to see if the amount of runes will exceed 20.
i = pc_search_inventory(sd,nameid);
if( i >= 0 && sd->status.inventory[i].amount+qty > 20 ) // Cancel creation if created stones will exceed 20.
{
clif_msg(sd,0x61b);
return 0;
}
}

Hercules Elf Bot - Jul 11, 2012 17:51

Originally posted by [b]EvilPuncker[/b]
bump, pc.c code should be removed :P

Hercules Elf Bot - Jul 11, 2012 18:21

Originally posted by [b]Ind[/b]
Fixed in [rev=16400]