Jump to content

Recommended Posts

  • Replies 127
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I do not know if it is me, but the patch does not work after the Rev.9440. I have a problem in compil.

Someone can the adapted please?

EDIT :To sadden for the useless message, the problem came from another patch.

Posted
I do not know if it is me, but the patch does not work after the Rev.9440. I have a problem in compil.

Someone can the adapted please?

EDIT :To sadden for the useless message, the problem came from another patch.

Yes the patch works perfect, today I've tested it on rev 9452 and it works fine.

Posted

hmm i can't even try it... none of the links on post one even work for me...

lol i got a noob question... been so long scents i applyed a patch... i forget how

how to apply group.patch file

Posted

ok i hope someone can help me with this.. noob class 101

ok none links work for me... so i just copyed and pasted from post #1

iff --git a/src/game/Group.cpp b/src/game/Group.cpp
index 4090d91..69f6cb2 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -290,6 +290,16 @@ bool Group::AddMember(const uint64 &guid, const char* name)
                    player->SendRaidDifficulty(true);
                }
            }
+       // Group Interfactions interactions (test)
+            if(sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP))
+            {
+                Group *group = player->GetGroup();
+                if(Player *leader = sObjectMgr.GetPlayer(group->GetLeaderGUID()))
+                {
+                    player->setFactionForRace(leader->getRace());
+                    sLog.outDebug( "WORLD: Group Interfaction Interactions - Faction changed (AddMember)" );
+                }
+            }
        }
        player->SetGroupUpdateFlag(GROUP_UPDATE_FULL);
        UpdatePlayerOutOfRange(player);
@@ -335,6 +345,12 @@ uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method)
                data << uint64(0) << uint32(0) << uint32(0) << uint64(0);
                player->GetSession()->SendPacket(&data);
            }
+        // Restore original faction if needed
+        if(sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP))
+        {
+                player->setFactionForRace(player->getRace());
+                sLog.outDebug( "WORLD: Group Interfaction Interactions - Restore original faction (RemoveMember)" );
+        }

            _homebindIfInstance(player);
        }
@@ -391,6 +407,12 @@ void Group::Disband(bool hideDestroy)
                player->SetOriginalGroup(NULL);
            else
                player->SetGroup(NULL);
+            // Restore original faction if needed
+            if(sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP))
+            {
+                player->setFactionForRace(player->getRace());
+                sLog.outDebug( "WORLD: Group Interfaction Interactions - Restore original faction (Disband)" );
+            }
        }

        // quest related GO state dependent from raid membership

saved it as group-trade.patch

went to GIT Bash open my MaNGOS sorce folder

typed it patch -d . -p1 < group-trade.patch

screen reads as

patching file 'src/game/group.cpp'

hunk #1 succeeded at 325 (offest 35 lines)

patch unexpectedly ends in middle of line

hunk #3 succedded at 442 ith fuzz 1 (offset 35 lines)

then i go to complile it

get this

========== Build: 11 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

post #17 says use patch command

post # 7 says

Yes, you have only to delete your Group.cpp and paste the patched-Group.cpp in the /src/game/ folder. obviously recompile mangos.

so then i tryed it this away.. deleted file group.cpp copyed group-trade.patch

rename it to group-trade.cpp still did not work...

tryed group.cpp still did not work

What is the right way ??? please help this noob

Posted
don't really like the idea of patched cpp file why don't you instead make a github repo?

Repo only for this patch? Don't make me laugh© =)

©TES IV: Oblivion

Posted
don't really like the idea of patched cpp file why don't you instead make a github repo?

Becouse imho is easer to download the patched Group.cpp instead of use a custom github repo for users

Posted
10>..\\..\\src\\game\\Group.cpp(1713) : error C2065: 'MAX_TOTEM' : undeclared identifier

10>..\\..\\src\\game\\Group.cpp(1715) : error C2248: 'Unit::m_TotemSlot' : cannot access private member declared in class 'Unit'

10> e:\\mangos\\compil\\mangos\\src\\game\\Unit.h(1899) : see declaration of 'Unit::m_TotemSlot'

10> e:\\mangos\\compil\\mangos\\src\\game\\Unit.h(1076) : see declaration of 'Unit'

MaNGOS 9556 (from insider42's repo)

  • 2 weeks later...
Posted
Edit: Never mind, would get them damage from group members.

Well, I was thinking about sending 'fake' factions to clients too (but keep the player's faction unchanged at the server side), because in the end almost everything is decided by the server, and if the server has the correct info all can be fine.

I'm not sure your edit is correct though. Back in the 2.4 days, we could group with the other faction too (if set in the config of course), despite the fact those other players were hostile when not in our group. Yet we didn't do damage to each other while grouped, and I think that's because the server noticed we were in fact supposed to be friendly (not faction wise, but because we were in the same group). I'm guessing the key to this was in the 'Unit::IsFriendlyTo' function, where there is something like this:

// Group

if(pTester->GetGroup() && pTester->GetGroup()==pTarget->GetGroup())

return true;

If that is the case, this might still work on the server side. Meaning the server can still decide that the undead warlock's AoE should not result in damage on the human warrior tank. If the server knows it, all is fine, no?

You're welcome to correct me though :)

[edit]

Seems I was right about that. I tested this with a blood elf mage and a draenei priest. If not in a group, they can attack each other and do damage, as expected. If they are in a group, they still show as hostile and you can't cast anything (good or bad) on each other any more (this means that bad things can't be done either, so that's good!). BUT AoE can always be done and seems to do the correct thing! A holy nova was *healing* the mage and not doing damage! Now if we could fool that client... :P

Posted

Now that Mangos supports 3.3.3a how about an update for current rev?

Anyway thx a lot for your efforts shin, keeping this patch up2date.

Edit:

Sorry my fault. Script is working and compatible to newtest rev.

Bye

NuRRi

  • 3 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use