Horizon Official Technical Documentation
GridUnitItemDropNotifier Struct Reference

#include <GridNotifiers.hpp>

+ Collaboration diagram for GridUnitItemDropNotifier:

Public Member Functions

 GridUnitItemDropNotifier (s_grid_notify_item_drop_entry entry)
 
template<class T >
void notify (GridRefManager< T > &m)
 
void Visit (GridRefManager< unit_ns(Player)> &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefManager< NOT_INTERESTED > &)
 
template<>
void Visit (GridRefManager< NPC > &m)
 
template<>
void Visit (GridRefManager< Elemental > &m)
 
template<>
void Visit (GridRefManager< Homunculus > &m)
 
template<>
void Visit (GridRefManager< Mercenary > &m)
 
template<>
void Visit (GridRefManager< Pet > &m)
 
template<>
void Visit (GridRefManager< Monster > &m)
 
template<>
void Visit (GridRefManager< Skill > &m)
 
template<>
void Visit (GridRefManager< Item > &m)
 

Public Attributes

s_grid_notify_item_drop_entry _entry
 

Constructor & Destructor Documentation

◆ GridUnitItemDropNotifier()

GridUnitItemDropNotifier::GridUnitItemDropNotifier ( s_grid_notify_item_drop_entry  entry)
inlineexplicit
444 : _entry(entry)
445 { }
s_grid_notify_item_drop_entry _entry
Definition: GridNotifiers.hpp:441

Member Function Documentation

◆ notify()

template<class T >
void GridUnitItemDropNotifier::notify ( GridRefManager< T > &  m)
733{
734 using namespace Horizon::Zone::Units;
735
736 if (!m.get_size())
737 return;
738
739 for (typename GridRefManager<T>::iterator iter = m.begin(); iter != typename GridRefManager<T>::iterator(nullptr); ++iter) {
740 if (iter->source() == nullptr)
741 continue;
742
743 std::shared_ptr<Player> tpl = iter->source()->template downcast<Player>();
744
745 if (tpl->get_session() == nullptr || tpl->get_session()->clif() == nullptr)
746 continue;
747
748 tpl->get_session()->clif()->notify_item_drop(_entry.guid,
751 }
752}
Forward declaration of GridRefManager, the class that manages GridReference.
Definition: GridRefManager.hpp:41
iterator begin()
Definition: GridRefManager.hpp:54
uint32_t get_size() const
returns the number of Elements in the list (not including the head and tail Elements or the first and...
Definition: Head.hpp:69
Definition: GameLogicProcess.hpp:43
int guid
Definition: GridNotifiers.hpp:435
int show_drop_effect
Definition: GridNotifiers.hpp:436
int item_id
Definition: GridNotifiers.hpp:435
int y
Definition: GridNotifiers.hpp:435
int type
Definition: GridNotifiers.hpp:435
int drop_effect_mode
Definition: GridNotifiers.hpp:436
int x
Definition: GridNotifiers.hpp:435
int amount
Definition: GridNotifiers.hpp:435
int x_area
Definition: GridNotifiers.hpp:435
int is_identified
Definition: GridNotifiers.hpp:435
int y_area
Definition: GridNotifiers.hpp:435

References _entry, s_grid_notify_item_drop_entry::amount, GridRefManager< OBJECT >::begin(), s_grid_notify_item_drop_entry::drop_effect_mode, Horizon::Structures::LinkedList::Head::get_size(), s_grid_notify_item_drop_entry::guid, s_grid_notify_item_drop_entry::is_identified, s_grid_notify_item_drop_entry::item_id, s_grid_notify_item_drop_entry::show_drop_effect, s_grid_notify_item_drop_entry::type, s_grid_notify_item_drop_entry::x, s_grid_notify_item_drop_entry::x_area, s_grid_notify_item_drop_entry::y, and s_grid_notify_item_drop_entry::y_area.

+ Here is the call graph for this function:

◆ Visit() [1/10]

template<>
void GridUnitItemDropNotifier::Visit ( GridRefManager< Elemental > &  m)

◆ Visit() [2/10]

template<>
void GridUnitItemDropNotifier::Visit ( GridRefManager< Homunculus > &  m)

◆ Visit() [3/10]

template<>
void GridUnitItemDropNotifier::Visit ( GridRefManager< Item > &  m)

◆ Visit() [4/10]

template<>
void GridUnitItemDropNotifier::Visit ( GridRefManager< Mercenary > &  m)

◆ Visit() [5/10]

template<>
void GridUnitItemDropNotifier::Visit ( GridRefManager< Monster > &  m)

◆ Visit() [6/10]

template<class NOT_INTERESTED >
void GridUnitItemDropNotifier::Visit ( GridRefManager< NOT_INTERESTED > &  )
inline
453{ }

◆ Visit() [7/10]

template<>
void GridUnitItemDropNotifier::Visit ( GridRefManager< NPC > &  m)

◆ Visit() [8/10]

template<>
void GridUnitItemDropNotifier::Visit ( GridRefManager< Pet > &  m)

◆ Visit() [9/10]

template<>
void GridUnitItemDropNotifier::Visit ( GridRefManager< Skill > &  m)

◆ Visit() [10/10]

void GridUnitItemDropNotifier::Visit ( GridRefManager< unit_ns(Player)> &  m)

Member Data Documentation

◆ _entry

s_grid_notify_item_drop_entry GridUnitItemDropNotifier::_entry

Referenced by notify().


The documentation for this struct was generated from the following files: