Merge [SD2]
r1114 Added two new struct ObjectDistanceOrder/ObjectDistanceOrderReversed for generic use sorting objects by GetDistanceOrder() r1115 Remove obsolete code in misc scripts and use struct ObjectDistanceOrder/Reversed instead r1116 Added script for mob 24079 + related instance script - skip (already have it better) r1117 Update DoPlaySoundToSet function and allow WorldObject as source for sound. r1118 Correcting end bosses scripts in SM cathedral r1119 Added basic scripts w/texts for bosses in utgarde keep --HG-- branch : trunk
This commit is contained in:
@@ -631,4 +631,28 @@ void MaNGOS::LocalizedPacketListDo<Builder>::operator()( Player* p )
|
||||
p->SendDirectMessage((*data_list)[i]);
|
||||
}
|
||||
|
||||
struct ObjectDistanceOrder : public std::binary_function<const WorldObject, const WorldObject, bool>
|
||||
{
|
||||
const Unit* m_pSource;
|
||||
|
||||
ObjectDistanceOrder(const Unit* pSource) : m_pSource(pSource) {};
|
||||
|
||||
bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const
|
||||
{
|
||||
return m_pSource->GetDistanceOrder(pLeft, pRight);
|
||||
}
|
||||
};
|
||||
|
||||
struct ObjectDistanceOrderReversed : public std::binary_function<const WorldObject, const WorldObject, bool>
|
||||
{
|
||||
const Unit* m_pSource;
|
||||
|
||||
ObjectDistanceOrderReversed(const Unit* pSource) : m_pSource(pSource) {};
|
||||
|
||||
bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const
|
||||
{
|
||||
return !m_pSource->GetDistanceOrder(pLeft, pRight);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // MANGOS_GRIDNOTIFIERSIMPL_H
|
||||
|
||||
Reference in New Issue
Block a user