Arrow proficiency?

05/15/2014 10:18 Wolfy.#1
I just noticed, when i attack with bow and arrow, it gives prof on the bow but gives prof too on some unknown proficiency? -Any idea how to see that prof id so i can make it not to give prof on that or any other solution? -Here is pic:

[Only registered and activated users can see links. Click Here To Register...]
05/15/2014 10:29 InsomniacPro#2
I would check your method that handles awarding proficiency experience. You're probably doing a check for a left hand weapon, as you would a trojan, then adding prof exp to that weapontype. Just make sure you do a check for trojan only if you are doing lefthand prof exp.
05/15/2014 11:25 Wolfy.#3
Oh, good idea. I will try and post what i come up with. Thanks.
05/15/2014 12:40 Aceking#4
Don't forget warrior's shield.
05/15/2014 18:16 Wolfy.#5
I will do a:

Code:
if (Job == 45)
{
// Do nothing.
}
else
{
// Add prof. etc...
}
For the left hand.
05/15/2014 18:41 Spirited#6
Bows have proficiency too, do they not? I would process weapon proficiency by the item group id. The player may be a reborn using a bow, or an archer using another weapon type, so the job check would be invalid.
05/15/2014 20:29 Aceking#7
I agree with the above, it needs to have a validity check against the item group (static id / 10000?).
05/16/2014 00:30 Wolfy.#8
Fak im stuck, i don't know what kind of check to add here:

Code:
        public void AddProfExp(ushort Wep, uint Amount)
        {
            if (Profs.Contains(Wep))
            {
                Prof P = (Prof)Profs[Wep];
                if (P.Lvl < 20)
                {
                    Profs.Remove(Wep);
                    Amount *= World.ProfExpRate;
                    P.Exp += Amount;
                    if (P.Exp >= Database.ProfExp[P.Lvl])
                    {
                        P.Lvl++;
                        P.Exp = 0;
                        MyClient.LocalMessage(2000, "Your proficiency level has increased.");
                    }
                    Profs.Add(Wep, P);
                    MyClient.AddSend(Packets.Prof(P));
                }
            }
05/16/2014 00:37 Aceking#9
Quote:
Originally Posted by Wolfy. View Post
Fak im stuck, i don't know what kind of check to add here:

Code:
        public void AddProfExp(ushort Wep, uint Amount)
        {
            if (Profs.Contains(Wep))
            {
                Prof P = (Prof)Profs[Wep];
                if (P.Lvl < 20)
                {
                    Profs.Remove(Wep);
                    Amount *= World.ProfExpRate;
                    P.Exp += Amount;
                    if (P.Exp >= Database.ProfExp[P.Lvl])
                    {
                        P.Lvl++;
                        P.Exp = 0;
                        MyClient.LocalMessage(2000, "Your proficiency level has increased.");
                    }
                    Profs.Add(Wep, P);
                    MyClient.AddSend(Packets.Prof(P));
                }
            }
I would add a static list containing all the valid prof's based off their item group (first 3 digits).
I suppose you could also put it into a database table, but I see no need to spend the resources checking that table constantly considering those prof's should never change.

So it would be static id / 1000 (I have access to source now xD)
Then simply check if it is valid, then proceed.

And judging from your code below, it won't add a prof if they don't already have it?
05/16/2014 00:47 InsomniacPro#10
Are you using NCS? In 2014?
05/16/2014 02:00 CptSky#11
Quote:
Originally Posted by Aceking View Post
I would add a static list containing all the valid prof's based off their item group (first 3 digits). [...]
Read-only dynamic list created when loading items would be better ;)
05/16/2014 13:45 Wolfy.#12
@Aceking, CptSky: Thanks gonna try and see what i come up with.
@InsomniacPro: Yeah.
05/16/2014 22:17 InsomniacPro#13
Quote:
Originally Posted by Wolfy. View Post
@InsomniacPro: Yeah.
Why? Dear god, why?
05/17/2014 00:25 Wolfy.#14
Don't ask plz, secret project very wow. :awesome:
05/17/2014 02:23 InsomniacPro#15
Quote:
Originally Posted by Wolfy. View Post
Don't ask plz, secret project very wow. :awesome:
Don't take this the wrong way, but if you're using NCS, there's no wow involved.