This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - canabalt

Pages: [1]
1
Thanks StoneHarry, that fixed my problem. unfortunatly i still must have done something wrong with all the other variables and functions i needed to edit and while it compiles and runs, it still doesnt have the desired effect im aiming for.

Also yes i am aware i need to modify client files aswell, i managed to (using arcemu, not trinity) simulate a pseudo-third faction by editing the Faction, FactionTemplate and FactionGroup DBCs by creating a third faction in FactionGroup.DBC and then adding a custom entry in Faction.DBC based off the  [Player, Human] entry ID and then add bitmasks that suit this third entry into Faction.DBC and FactionTemplate.DBC.

But the problem lies in the fact that it behaves just like an alliance character when it comes to the chat, party and who list, so ill have to do a bit more work.

Also on an unrelated note, ive been messing around with the addition of a third useable resource (ie mana) based off mana and while i can make the changes to the core easily and even edit PlayerFrames.lua and .xml to 'show' what/were the bar should be, im having trouble making the text show and acknowledge the number of that resource.

Is there anyway i can get the client to communicate with the server to retrieve this quantity? i believe that mana is retieved through the API event UNIT_MAXMANA in Playerframes, but in the case of a third resource i would need to create my own ie. UNIT_RESOURCE3, is there a way to do such a thing?
I am almost certain there is an easy way to have this third resource shown, but im a bit dumb when it comes to scripting, any ideas?

PS: Sorry for my 4 day late reply, i have been busy with uni work.
PPS: Also sorry for the long posts, im not used to posting online.

2
Hi Modcraft, i am sorry to trouble you with yet another "help i dont understand this basic problem and need others to spoonfeed me the answer" but the shoutbox is down, so i cannot voice my simple problem on there in the hopes somebody notices.

I have been Attempting to modify Trinitys' source to allow for the addition of a Third Faction, in this case called in-code as TEAM_NEUTRAL and while i understand the most basic of basic of basic c++, and have modified trinity a basic amount, i am still rather useless at certain parts.
namely these lines of code for the determining of a characters TeamId.

    static uint32 TeamForRace(uint8 race);
            uint32 GetTeam() const { return m_team; }
            TeamId GetTeamId() const { return m_team == ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE; }
            void setFactionForRace(uint8 race);

The line in question i am confused about is
    TeamId GetTeamId() const { return m_team == ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE; }

Because c++ uses the boolean conditional operator (Variable == X ? X : Y) i am unable to turn this statement into an operator that handles interger values.
(I am thrown off with the whole const { return X } part and do not know were to put the if/else if statements)

How would i go about changing it so instead it goes something like:

    TeamId GetTeamId() const { return m_team;
        if (m_team == ALLIANCE)
                       TEAM_ALLIANCE;
                       else if (m_team == HORDE)
                       TEAM_HORDE;
                        else
                       TEAM_NEUTRAL;

(Except works)
So that it allows me to input a third value if m_team throws a value besides horde/alliance faction IDs
and without Visual Studio sezureing at my poor ability to syntax and inability to go from uint32 to constant.

Thanks for any help, and sorry if this thread is either lacking in information required to help, or just plain hard to understand/inconvenient.

Pages: [1]