Jump to content

Rage Hunter

Members
  • Posts

    14
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Rage Hunter

  1. for(uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++) { for(uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++) { CellPair cell_pair(x,y); Cell r_zone(cell_pair); r_zone.data.Part.nocreate = data.Part.nocreate; m.Visit(r_zone, visitor); } } } diff --git a/src/game/Map.h b/src/game/Map.h index 6e68529..0ff3799 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -406,6 +406,8 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj void RemoveFromActive(T* obj) { RemoveFromActiveHelper(obj); } void RemoveFromActive(Creature* obj); + + template<class NOTIFIER> void VisitGrid(const float &x, const float &y, float radius, NOTIFIER &notifier); Creature* GetCreature(uint64 guid); Vehicle* GetVehicle(uint64 guid); @@ -629,4 +631,17 @@ Map::Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor) getNGrid(x, y)->Visit(cell_x, cell_y, visitor); } } -#endif + +template<class NOTIFIER> +inline void +Map::VisitGrid(const float &x, const float &y, float radius, NOTIFIER &notifier) +{ + CellPair p(MaNGOS::ComputeCellPair(x, y)); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier); + cell.Visit(p, grid_object_notifier, *this, radius, x, y); +} +#endif \\ No newline at end of file http://pastebin.com/m79340633 In line MaNGOS:: GameObjectInRangeCheck check (x, y, z, radius + 15); Instead of value 15 I recommend to use 15-20, the most optimum variant! ------------------------------------------------------------------------------------------------------- В строке MaNGOS::GameObjectInRangeCheck check(x, y, z, radius + 15); вместо значения 15 рекомендую использовать 15-20, самый оптимальный вариант!
  2. The patch balrok helps to solve the most part of problems! Here only it is necessary GetFirstMember (); to replace on pGroup-> GetFirstMember (); diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 00c6251..6f3e0a0 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -1418,12 +1418,28 @@ void WorldSession::HandleSetDungeonDifficultyOpcode( WorldPacket & recv_data ) if(Difficulty(mode) == _player->GetDungeonDifficulty()) return; - // cannot reset while in an instance - Map *map = _player->GetMap(); - if(map && map->IsDungeon()) + // cannot reset while in an instance - or groupmembers are inside instance + if(Group *pGroup = _player->GetGroup()) { - sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); - return; + for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + { + + Map *map = itr->getSource()->GetMap(); + if (map && map->IsDungeon()) + { + sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + return; + } + } + } + else + { + Map *map = _player->GetMap(); + if(map && map->IsDungeon()) + { + sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + return; + } } if(_player->getLevel() < LEVELREQUIREMENT_HEROIC) @@ -1462,12 +1478,28 @@ void WorldSession::HandleSetRaidDifficultyOpcode( WorldPacket & recv_data ) if(Difficulty(mode) == _player->GetRaidDifficulty()) return; - // cannot reset while in an instance - Map *map = _player->GetMap(); - if(map && map->IsDungeon()) + // cannot reset while in an instance - or groupmembers are inside instance + if(Group *pGroup = _player->GetGroup()) { - sLog.outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); - return; + for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + { + + Map *map = itr->getSource()->GetMap(); + if (map && map->IsDungeon()) + { + sLog.outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + return; + } + } + } + else + { + Map *map = _player->GetMap(); + if(map && map->IsDungeon()) + { + sLog.outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); + return; + } } if(_player->getLevel() < LEVELREQUIREMENT_HEROIC)
  3. The patch is in This Theme, use, who to you disturbs! It quite not badly works, only demands updating! ------------------------------------------------------------------------- Патч есть в Этой Теме, пользуйтесь, кто вам мешает! Он вполне не плохо работает, только требует обновления!
  4. А смысл, что-то сюда выкладывать? Я самую первую версию выложил патча и в течении 2-х дней ни кто ни чего не написал, тока тупо качали (180 закачек за 2 дня)! Помощи о которой я просил, я не получил! Пришлось все самому делать! И на счет понтов, я не такой человек, что бы понты гонять в отличии от некоторых! Смотрю тут кучу репозитарий наделали и чем же они отличаются? все друг у друга взяли и один копия другого! Ну выложу я его сюда и что? Сразу же воткнешь в свой репозитарий? И чем тебя не устраиват та версия, которая выложена!
  5. You only also can what speak about it? And to write? I already have written for example, have finished a patch to full perfection (99 %). To all I already even have written plus Battlegrounds: Strand of the Ancients! One problem with which I have faced it the ships, but I think that I and it is itself I can solve! For me unique mangos where works Strand of the Ancients and GO type 33! ----------------------------------------------------------------------------------------------------------- вы только и можете что говорить об этом? а написать? Я уже написал например, довел патч до полного совершенства (99%). Плюс ко всему я уже даже написал Battlegrounds: Strand of the Ancients! Одной проблемой с которой я столкнулся это корабли, но я думаю что я и это сам смогу решить! У меня единственный mangos где работает Strand of the Ancients и GO type 33!
  6. Update! Update! Update! You look here and you change in a patch all also! Yes, as I have stepped that have created and will lay out this patch at this forum! And what from you could be the help in a patch writing! You can only Copyright in source codes change!
  7. I apologise! Not that has laid out, here the correct! Use git bash! patch -p1 < crash.patch
  8. I was helped by recoil 9233 and 9228! The server already works more than days! To whom it is necessary in the form of a patch!
  9. Find no sense something add on given forum, I by a narrow margin can read that write, additionally here 99% users that who even nor what do not understand in C++, but is lived use ready! For 3 days which here was this patch (the modes) his(its) only swung and all. I itself advanced with him and now I do not need the help about which I asked! ------------------------------------------------------------------------------- Не вижу смысла что-то добавлять на данный форум, я с трудом могу прочитать что пишут, к тому же здесь 99% пользователей те кто даже ни чего не понимают в С++, а прото используют готовое! За 3 дня которые здесь был этот патч (мод) его только качали и все. Я сам продвинулся с ним и теперь мне не нужна помощь о которой я просил!
  10. Repository are going to update? A heap of conflicts, easier hands weigh a patch to put!
×
×
  • 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