Jump to content

NetSky

Members
  • Posts

    127
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

NetSky's Achievements

Advanced Member

Advanced Member (3/3)

0

Reputation

  1. you could also add a new config for "unbinding" certain maps by giving IDs and then check for those entries each instance login where it is also checked for ignore raid option - problem remaining: any player would be assigned to a different Instance unless they are in a group - so they are not able to see each other. but you could rewrite the instance handling with hacks to make this map not instanced maybe... i never seriously thought about this issue but anyhow sounds kinda interesting
  2. i will take a look if i got time left
  3. autocasted spells just works with guardians/pets. So you got 3 options .... implement it the way it was posted here but summon as guardian and add spell with autocast flag or by using sd2 but this can be soluted much easier with just a few lines of code -> so try and learn . Afterall this is an educational project so stop asking for patches all the time and try to solute this problem on your own and learn something
  4. i forgot to mention use #define USE_STANDARD_MALLOC in MemoryManagement.cpp to disable TBB Alloc because this outdated version shipped with mangos will definitively cause problems/conflicts. anyways i would appreciate it a lot if this could be tested with each combination : current tbb mangos version / up-to-date tbb (look at intels' hp) or without tbb using system mem alloc. Thyros : simply create a file config.h then add following : #include "config-win32.h" - done. if you plan to use additional features you got to declare there - but this is not needed.
  5. Since now by reports send to me there should be a significant performance improvement - what about stability? anyone here who can test it at a live server with a huge load of connections? - Thx for any debug/report
  6. Exactly there are no such exploits possible pets/totems are also friendly in same group
  7. fixed possible crashes at unexpected connection drop/loss. unix builds tested and working - you need to delete evil windows ACE_wrappers/ace/config.h before compile. Win project files updated - build not tested and i am not willing to do because i think Windows is not worth it to be called OS and i will never use it - but i expect there must be changes done in main initialization - as i remember this is done in /share/ServiceWin32.* . http://filebeam.com/6f5e8b54699cad89008fc98e799ffbe7
  8. here you are critical issues for pets totems fixed note this patch is a hack but better than the one in this topic diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 316d333..5b6f624 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -304,6 +304,9 @@ bool Group::AddMember(const uint64 &guid, const char* name) uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method) { + // FG/NetSky 2 Sided Groups + BroadcastGroupUpdate(); + // remove member and change leader (if need) only if strong more 2 members _before_ member remove if(GetMembersCount() > uint32(isBGGroup() ? 1 : 2)) // in BG group case allow 1 members group { @@ -1689,3 +1692,35 @@ void Group::_homebindIfInstance(Player *player) player->m_InstanceValid = false; } } + +//FG/NetSky 2sided groups +void Group::BroadcastGroupUpdate(void) +{ + // FG: HACK: force flags update on group leave - for values update hack + // -- not very efficient but safe + for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr) + { + Player *pp = sObjectMgr.GetPlayer(citr->guid); + if(pp /*&& pp->IsInWorld()*/) + { + pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2); + pp->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE); + DEBUG_LOG("-- Forced group value update for '%s'", pp->GetName()); + if(Pet* p_pet = pp->GetPet()) + { + p_pet->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2); + p_pet->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE); + DEBUG_LOG("-- Forced group value update for '%s' pet '%s'", pp->GetName(), pp->GetPet()->GetName()); + } + for(uint32 i = 0; i < MAX_TOTEM; ++i) + { + if(Unit *totem = Unit::GetUnit(*pp, pp->m_TotemSlot[i])) + { + totem->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2); + totem->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE); + DEBUG_LOG("-- Forced group value update for '%s' totem #%u", pp->GetName(), i); + } + } + } + } +} diff --git a/src/game/Group.h b/src/game/Group.h index 88eda30..96701d2 100644 --- a/src/game/Group.h +++ b/src/game/Group.h @@ -345,6 +345,9 @@ class MANGOS_DLL_SPEC Group InstanceGroupBind* GetBoundInstance(Map* aMap); BoundInstancesMap& GetBoundInstances(Difficulty difficulty) { return m_boundInstances[difficulty]; } + //FG/Netsky 2sided groups + void BroadcastGroupUpdate(void); + protected: bool _addMember(const uint64 &guid, const char* name, bool isAssistant=false); bool _addMember(const uint64 &guid, const char* name, bool isAssistant, uint8 group); diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp index 5215867..9b2d02a 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -201,6 +201,8 @@ void WorldSession::HandleGroupAcceptOpcode( WorldPacket & recv_data ) // everything's fine, do it, PLAYER'S GROUP IS SET IN ADDMEMBER!!! if(!group->AddMember(GetPlayer()->GetGUID(), GetPlayer()->GetName())) return; + + group->BroadcastGroupUpdate(); // 2sided groups FG/NetSky } diff --git a/src/game/Object.cpp b/src/game/Object.cpp index b79e157..79a5b19 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -664,6 +664,52 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask * else *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_TAPPED); } + // FG/NetSky: pretend that OTHER players in own group are friendly ("blue") + else if(index == UNIT_FIELD_BYTES_2 || index == UNIT_FIELD_FACTIONTEMPLATE) + { + bool ch = false; + if((GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT) && target != this) + { + bool forcefriendly = false; // bool for pets/totems to offload more code from the big if below + if(GetTypeId() == TYPEID_UNIT) + { + if(((Creature*)this)->isTotem() || ((Creature*)this)->isPet()) + { + Unit* P_Owner = ((Creature*)this)->GetOwner(); + if(P_Owner && P_Owner->GetTypeId() == TYPEID_PLAYER && P_Owner->IsFriendlyTo(target) + && P_Owner != target && (target->IsInSameGroupWith((Player*)P_Owner) || target->IsInSameRaidWith((Player*)P_Owner))) + forcefriendly = true; + } + } + + if(((Unit*)this)->IsSpoofSamePlayerFaction() || forcefriendly + || (target->GetTypeId() == TYPEID_PLAYER && GetTypeId() == TYPEID_PLAYER && (target->IsInSameGroupWith((Player*)this) || target->IsInSameRaidWith((Player*)this)))) + { + if(index == UNIT_FIELD_BYTES_2) + { + DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (flag)", target->GetName(), ((Unit*)this)->GetName()); + *data << ( m_uint32Values[ index ] & (UNIT_BYTE2_FLAG_SANCTUARY << 8) ); // this flag is at uint8 offset 1 !! + ch = true; + } + else if(index == UNIT_FIELD_FACTIONTEMPLATE) + { + FactionTemplateEntry const *ft1, *ft2; + ft1 = ((Unit*)this)->getFactionTemplateEntry(); + ft2 = ((Unit*)target)->getFactionTemplateEntry(); + if(ft1 && ft2 && (!ft1->IsFriendlyTo(*ft2) || ((Unit*)this)->IsSpoofSamePlayerFaction())) + { + uint32 faction = ((Player*)target)->getFaction(); // pretend that all other HOSTILE players have own faction, to allow follow, heal, rezz (trade wont work) + DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (faction %u)", target->GetName(), ((Unit*)this)->GetName(), faction); + *data << uint32(faction); + ch = true; + } + } + } + } + if(!ch) + *data << m_uint32Values[ index ]; + + } else { // send in current format (float as float, uint32 as uint32)
  9. wtf?!?! - we need some perl bot deleting such topics automatically lol
  10. no they should only affect buffs casted @ original caster as my patch does
  11. let me guess you deleted config.h because you tried to compile @ nix first and then took same sources for win compile? you need the original config.h containing " #include "ace/config-win32.h" " but i got needed config.h included.... try with that again and do not delete if you compile at windows. anyways i will take a look at it tonight because we realized there is some problem in creating ACE.pc with some dist. - sry for that should be soon fixed
  12. which dist. did you use? i will retest @ testbox - till now i did not experience any compile errors
  13. i am not familiar with latest revisions but seems as if this is eventai related means safety check in event ai is needed or he used messed up data there
  14. NetSky

    [crash] 9323

    this is related to grouphandling... did you try latest release?
×
×
  • 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