Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2013, 05:58 PM
Davood
Discordant
 
Join Date: Jan 2005
Posts: 488
Default

https://github.com/davoodinator/Serv...ource=cc#L1893

from 1893 to 1933 is the code snippet you are interested in

Code:
bool Item_Struct::IsEquipable(uint16 Race, uint16 Class_) const
{
        bool IsRace = false;
        bool IsClass = false;

        uint32 Classes_ = Classes;

        uint32 Races_ = Races;

        int32 Race_ = GetArrayRace(Race);

        for (int CurrentClass = 1; CurrentClass <= PLAYER_CLASS_COUNT; ++CurrentClass)
        {
                if (Classes_ % 2 == 1)
                {
                        if (CurrentClass == Class_)
                        {
                                        IsClass = true;
                                break;
                        }
                }
                Classes_ >>= 1;
        }

        Race_ = (Race_ == 18 ? 16 : Race_);

        for (unsigned int CurrentRace = 1; CurrentRace <= PLAYER_RACE_COUNT; ++CurrentRace)
        {
                if (Races_ % 2 == 1)
                {
                                if (CurrentRace == Race_)
                        {
                                        IsRace = true;
                                break;
                        }
                }
                Races_ >>= 1;
        }
        if (Race_ == 69) {IsRace = true;}
        return (IsRace && IsClass);
}
that said.

that is only one small part of it

you will also have to make those races available in other ways too in the source code

there are changes i've made too, to make it happen.. properly.
client.cpp
race.h
races.cpp
bot.cpp

many changes. honestly just download those files and diff them with the main source and you should see the differences pretty clearly (how I added races).. ultimately im going to add all of the races (for no good reason, just beacuse i can)

honestly, if you aren't too picky, you should just download my code from github and compile it, if you pester me enough ill update it to include all races, so that its friendly to whatever you want to do with it.

One thing you may want to do is change pets.cpp to teh original one from eqemu source. as i have heavily modified that file... and i'm not done.. gonna add all the monster races to it too... bixies need their halfling pets mk
__________________
----------
Demon Overlord of Alakamin
skype @ davoodinator
Reply With Quote
  #2  
Old 10-19-2013, 03:55 PM
Fadedspirit
Sarnak
 
Join Date: Jan 2007
Posts: 48
Default

Quote:
Originally Posted by Davood View Post
https://github.com/davoodinator/Serv...ource=cc#L1893

from 1893 to 1933 is the code snippet you are interested in

Code:
bool Item_Struct::IsEquipable(uint16 Race, uint16 Class_) const
{
        bool IsRace = false;
        bool IsClass = false;

        uint32 Classes_ = Classes;

        uint32 Races_ = Races;

        int32 Race_ = GetArrayRace(Race);

        for (int CurrentClass = 1; CurrentClass <= PLAYER_CLASS_COUNT; ++CurrentClass)
        {
                if (Classes_ % 2 == 1)
                {
                        if (CurrentClass == Class_)
                        {
                                        IsClass = true;
                                break;
                        }
                }
                Classes_ >>= 1;
        }

        Race_ = (Race_ == 18 ? 16 : Race_);

        for (unsigned int CurrentRace = 1; CurrentRace <= PLAYER_RACE_COUNT; ++CurrentRace)
        {
                if (Races_ % 2 == 1)
                {
                                if (CurrentRace == Race_)
                        {
                                        IsRace = true;
                                break;
                        }
                }
                Races_ >>= 1;
        }
        if (Race_ == 69) {IsRace = true;}
        return (IsRace && IsClass);
}
that said.

that is only one small part of it

you will also have to make those races available in other ways too in the source code

there are changes i've made too, to make it happen.. properly.
client.cpp
race.h
races.cpp
bot.cpp

many changes. honestly just download those files and diff them with the main source and you should see the differences pretty clearly (how I added races).. ultimately im going to add all of the races (for no good reason, just beacuse i can)

honestly, if you aren't too picky, you should just download my code from github and compile it, if you pester me enough ill update it to include all races, so that its friendly to whatever you want to do with it.

One thing you may want to do is change pets.cpp to teh original one from eqemu source. as i have heavily modified that file... and i'm not done.. gonna add all the monster races to it too... bixies need their halfling pets mk
Question:

I see that the only thing you changed in IsEquipable is you added the line "if (Race_ == 69) {IsRace = true;}".

Meaning if the Race of the player is ever 69, ie: Will-O-Wisp, then it is a valid race.

If the only way to become a non-player race is to talk to a npc to get it done for you why not simply comment out the "if (Races_ %2 ==1)" logic and just put:
If (Races_ != null && Races_ != 0)
{
IsRace = true;
break;
}

???

This would allow any non-standard race to equip any item, ever.
Reply With Quote
  #3  
Old 10-19-2013, 04:02 PM
Davood
Discordant
 
Join Date: Jan 2005
Posts: 488
Default

im speaking off the cuff here. but i couldnt be mistaken, its literally been 8-9 months since ive looked at that part of the code. but in the other files i referenced i haev lumped all of the non pc races into one "race" for reference elsewhere, that might be what the 69 is. otherwise you are probably right.

the problem lies in the OTHER parts, a /who all won't work unless you also update the other cpp and .h files i mentioned and add all of the races
__________________
----------
Demon Overlord of Alakamin
skype @ davoodinator
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:25 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3