Re: [SMAUG] skills again

Re: [SMAUG] skills again



That miserly fread_char!!

Thanks again EOS, happy new year!


----- Original Message ----- From: "Eos" <Smaug@AuricMud.com>
To: "moclamoose" <moclamoose@sbcglobal.net>; "SML" <smaug@realms.game.org>
Sent: Friday, December 31, 2004 9:32 PM
Subject: Re: [SMAUG] skills again


In fread_char:

ch->pcdata->learned[sn] = value;
/* Take care of people who have stuff they shouldn't *
* Assumes class and level were loaded before. -- Altrag *
* Assumes practices are loaded first too now. -- Altrag */
if ( ch->level < LEVEL_IMMORTAL )
{
if ( skill_table[sn]->skill_level[ch->class] >= LEVEL_IMMORTAL )
{
ch->pcdata->learned[sn] = 0;
ch->practice++;
}
}

You can't just give a character a skill. As soon as they reload and the system
realizes they have a skill that doesn't belong to their class, it takes it back
away and refunds it.
Remove everything after
ch->pcdata->learned[sn] = value;
in the preview above.

----- Original Message ----- From: "moclamoose" <moclamoose@sbcglobal.net>
To: "SML" <smaug@realms.game.org>
Sent: Friday, December 31, 2004 7:57 PM
Subject: [SMAUG] skills again


Ok!

Thanks to Pegasus I tracked down what was causing the crash, boo on me for
missing that, thanks Pegasus.

Now my problem is this! (Im a problem child I guess)

The teach function "bestows" the target the new skill while they are logged into
the game, but once the game reboots or they log out and then back in they lose
the skill they were just taught.

What do I need to edit to stop this? Is it something within that function or do
I need to edit other .c files such as save.c?

What do you guys suggest?