|
Архив - только для чтения |
| Модератор форума: andycrowz |
| Форум Корзина форума Корзина Aliance&Horde party in PvP realm |
| Aliance&Horde party in PvP realm |
Патч преднозначен дл пвп серверов!
Орда и Альянс в пати будут дружественные друг другу.... Cкачать патч |
спс за пач, + уже поставил))
Сообщение # 8 написано 12.05.2009 в 21:03
|
Вот вам patch =)
Добавлено (27.05.2009, 18:49) Прикрепления:
Aliance-Horde-p.patch
(5.5 Kb)
Сообщение # 9 написано 27.05.2009 в 18:49
|
Вот вам этот патч кто просил перезалить!
Code diff --git a/src/game/Group.cpp b/src/game/Group.cpp index b2b495c..25d7241 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -310,11 +310,19 @@ bool Group::AddMember(const uint64 &guid, const char* name) uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method) { + // Monkey + BroadcastGroupUpdate(); + // Monkey + // remove member and change leader (if need) only if strong more 2 members _before_ member remove if(GetMembersCount() > (isBGGroup() ? 1 : 2)) // in BG group case allow 1 members group { bool leaderChanged = _removeMember(guid); + // Monkey + // Player *player = objmgr.GetPlayer(guid); + // Monkey + if(Player *player = objmgr.GetPlayer( guid )) { // quest related GO state dependent from raid membership @@ -1595,3 +1603,17 @@ void Group::_homebindIfInstance(Player *player) player->m_InstanceValid = false; } } +// Monkey +void Group::BroadcastGroupUpdate(void) +{ + for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr) + { + Player *pp = objmgr.GetPlayer(citr->guid); + if(pp && pp->IsInWorld()) + { + pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2); + pp->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE); + } + } +} +// Monkey diff --git a/src/game/Group.h b/src/game/Group.h index 478b7c5..1553bd9 100644 --- a/src/game/Group.h +++ b/src/game/Group.h @@ -330,6 +330,10 @@ class MANGOS_DLL_SPEC Group InstanceGroupBind* GetBoundInstance(uint32 mapid, uint8 difficulty); BoundInstancesMap& GetBoundInstances(uint8 difficulty) { return m_boundInstances[difficulty]; } + // Monkey + void BroadcastGroupUpdate(void); + // Monkey + 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 b7c55e6..62c84f4 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -195,7 +195,10 @@ 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; - + // Monkey + // GetPlayer()->SetGroup(group, subgroup); // Defunct line added for test + group->BroadcastGroupUpdate(); + // Monkey } void WorldSession::HandleGroupDeclineOpcode( WorldPacket & /*recv_data*/ ) diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 15963e8..b53ad83 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -637,6 +637,53 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask else *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_OTHER_TAGGER); } + // Monkey + else if(index == UNIT_FIELD_BYTES_2 || index == UNIT_FIELD_FACTIONTEMPLATE) + { + bool ch = false; + if(target->GetTypeId() == TYPEID_PLAYER && GetTypeId() == TYPEID_PLAYER && target != this) + { + if(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(), ((Player*)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) + { + DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (faction)", target->GetName(), ((Player*)this)->GetName()); + if(target->getRace() == RACE_HUMAN) + *data << uint32(1); + else if(target->getRace() == RACE_ORC) + *data << uint32(2); + else if(target->getRace() == RACE_DWARF) + *data << uint32(3); + else if(target->getRace() == RACE_NIGHTELF) + *data << uint32(4); + else if(target->getRace() == RACE_UNDEAD_PLAYER) + *data << uint32(5); + else if(target->getRace() == RACE_TAUREN) + *data << uint32(6); + else if(target->getRace() == RACE_GNOME) + *data << uint32(115); + else if(target->getRace() == RACE_TROLL) + *data << uint32(116); + else if(target->getRace() == RACE_BLOODELF) + *data << uint32(1610); + else if(target->getRace() == RACE_DRAENEI) + *data << uint32(1629); + ch = true; + } + + } + } + if(!ch) + *data << m_uint32Values[ index ]; + + } + // Monkey else { // send in current format (float as float, uint32 as uint32) @@ -1496,6 +1543,21 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa return pCreature; } +// Monkey +void Object::ForceValuesUpdateAtIndex(uint32 i) +{ + m_uint32Values_mirror[i] = GetUInt32Value(i) + 1; // makes server think the field changed + if(m_inWorld) + { + if(!m_objectUpdated) + { + ObjectAccessor::Instance().AddUpdateObject(this ); + m_objectUpdated = true; + } + } +} +// Monkey + namespace MaNGOS { class NearUsedPosDo diff --git a/src/game/Object.h b/src/game/Object.h index fc01e3a..03e5747 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -300,6 +300,11 @@ class MANGOS_DLL_SPEC Object virtual bool hasQuest(uint32 /* quest_id */) const { return false; } virtual bool hasInvolvedQuest(uint32 /* quest_id */) const { return false; } + + // Monkey + void ForceValuesUpdateAtIndex(uint32); + // Monkey + protected: Object ( ); diff --git a/src/game/TradeHandler.cpp b/src/game/TradeHandler.cpp index aa323c9..dc5e149 100644 --- a/src/game/TradeHandler.cpp +++ b/src/game/TradeHandler.cpp @@ -533,12 +533,13 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket) SendTradeStatus(TRADE_STATUS_IGNORE_YOU); return; } - - if(pOther->GetTeam() !=_player->GetTeam() ) - { - SendTradeStatus(TRADE_STATUS_WRONG_FACTION); - return; - } +// Monkey +// if(pOther->GetTeam() !=_player->GetTeam() ) +// { +// SendTradeStatus(TRADE_STATUS_WRONG_FACTION); +// return; +// } +// Monkey if( pOther->GetDistance2d( _player ) > 10.0f ) { |
Quote (Shadow888) Вот я над вами угораю , когда можно всё в конфе подправить вы на си бьётесь) Конфиг тут не причем. Дело в том, что этот патч итак уже в исходниках есть. Хотя раньше был баг(как сейчас не знаю), что при взятии в группу игрока другой фракции он всеравно и в группе оставался враждебным.
Сообщение # 15 написано 17.12.2009 в 09:52
|
если в конфе поставить что бы можно было брать вражескую фракцию в пати, то они никак не будут красными, потому что пати это все зеленые, не зависимо от фракции.
Сообщение # 16 написано 26.12.2009 в 12:33
|
Данная тема была перемещена из раздела Патчи в ядро MaNGOS.
Причина перемещения: Устарело Переместил: ph3n.
Сообщение # 18 написано 11.10.2012 в 14:43
|
| |||
| |||



а патчи заливать передел компиляцией ядра !
