00001 #ifndef ITEM_INFO_HH_ 00002 # define ITEM_INFO_HH_ 00003 00004 # include "incoming-packet.hh" 00005 # include "packets_fwd.hh" 00006 # include "objects_fwd.hh" 00007 00008 namespace infos 00009 { 00010 class ItemInfo : public packets::IncomingPacket 00011 { 00012 public: 00013 ItemInfo(int size = 49); 00014 00015 const static int op = 0x30; 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 item informations. 00022 int get_item_id() const; 00023 int get_position() const; 00024 int get_count() const; 00025 int get_item_proto_id() const; 00026 int get_item_class() const; 00027 int get_durability() const; 00028 int get_container() const; 00029 int get_level() const; 00030 //void get_powerups() const; 00031 00032 // Objects. 00033 const objects::Item &get_item_object() const; 00034 const objects::ItemClass &get_item_class_object() const; 00035 const objects::ItemContainer &get_item_container_object() const; 00036 00037 objects::PossessedItem &make_item() const; 00038 }; 00039 } 00040 00041 #endif