00001 #ifndef ITEM_ENTRY_HH_ 00002 # define ITEM_ENTRY_HH_ 00003 00004 # include "incoming-packet.hh" 00005 # include "packets_fwd.hh" 00006 # include "objects_fwd.hh" 00007 00008 namespace infos 00009 { 00010 class ItemEntry : public packets::IncomingPacket 00011 { 00012 public: 00013 ItemEntry(int size = 16); 00014 00015 const static int op = 0x1a; 00016 00017 void print_tag(std::ostream &os) const; 00018 void print_data(std::ostream &os) const; 00019 void process(packets::PacketVisitor &ph); 00020 00021 // Raw informations. 00022 int get_item_id() const; 00023 int get_x() const; 00024 int get_y() const; 00025 int get_item_proto_id() const; 00026 int get_item_class() const; 00027 int get_count() const; 00028 00029 // Objects. 00030 const objects::Item &get_item_object() const; 00031 const objects::ItemClass &get_item_class_object() const; 00032 00033 objects::ItemInScreen &make_item() const; 00034 }; 00035 } 00036 00037 #endif