Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Deciphering the weap proficiency code
|
Deciphering the weap proficiency code
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Lys
(1 post) Bio
|
| Date
| Sat 08 Oct 2005 09:04 AM (UTC) |
| Message
| This is the prof code:
int weapon_prof_bonus_check (CCharacter *ch, CObjData *wield, int *gsn_ptr)
{
int bonus;
bonus = 0;*gsn_ptr = -1;
if (!ch->IsNpc () && ch->GetLevel () > 5 && wield)
{
switch (wield->value[3])
{
default:*gsn_ptr = -1;break;
case 0:
case 12:
case 10:
case 6:*gsn_ptr = gsn_pugilism;break;
case 3:
case 1:*gsn_ptr = gsn_long_blades;break;
case 11:
case 2:*gsn_ptr = gsn_short_blades;break;
case 4:*gsn_ptr = gsn_flexible_arms;break;
case 5:*gsn_ptr = gsn_talonous_arms;break;
case 7:
case 8:*gsn_ptr = gsn_bludgeons;break;
}
if (*gsn_ptr != -1)
bonus = (int) ((ch->GetPcData ()->learned[*gsn_ptr] -50)/10);
/* Reduce weapon bonuses for misaligned clannies.
if (ch->IsClanned ())
{
bonus = bonus /
(1 + abs (ch->alignment - ch->GetPcData ()->clan->alignment) / 1000);
}*/
if (ch->IsDevoted ()) {
bonus = bonus - abs (ch->GetPcData ()->favor) / -100 ;
}
}
return bonus;
}
What is learned[*gsn_ptr]? | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #1 on Sat 08 Oct 2005 03:28 PM (UTC) |
| Message
| As you can tell in the function header:
int weapon_prof_bonus_check (CCharacter *ch, CObjData *wield, int *gsn_ptr)
It's called from backtrace. You'll have to find where the function is called. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
9,871 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top