|
@@ -21,6 +21,7 @@
|
|
extern config_file config;
|
|
extern config_file config;
|
|
int person::m_limit_detained_time=-1;
|
|
int person::m_limit_detained_time=-1;
|
|
int person::m_auto_up_mine_time=-1;
|
|
int person::m_auto_up_mine_time=-1;
|
|
|
|
+int person::m_person_cards_flag=-1;
|
|
person::person(const std::string &type,uint32_t cardid,uint16_t needdisplay,int16_t t,int32_t deptid,int32_t level_id,uint32_t cid,int wl,const std::string &sname,const std::string &dname,int worketype_id)
|
|
person::person(const std::string &type,uint32_t cardid,uint16_t needdisplay,int16_t t,int32_t deptid,int32_t level_id,uint32_t cid,int wl,const std::string &sname,const std::string &dname,int worketype_id)
|
|
:card_location_base(type,cardid,needdisplay,t,deptid,level_id,cid)
|
|
:card_location_base(type,cardid,needdisplay,t,deptid,level_id,cid)
|
|
,m_workLine(wl)
|
|
,m_workLine(wl)
|
|
@@ -31,6 +32,7 @@ person::person(const std::string &type,uint32_t cardid,uint16_t needdisplay,int1
|
|
if(person::m_auto_up_mine_time==-1){
|
|
if(person::m_auto_up_mine_time==-1){
|
|
person::m_limit_detained_time=config.get("service.detained_time",10);
|
|
person::m_limit_detained_time=config.get("service.detained_time",10);
|
|
person::m_auto_up_mine_time=config.get("service.auto_up_mine_time",20);
|
|
person::m_auto_up_mine_time=config.get("service.auto_up_mine_time",20);
|
|
|
|
+ person::m_person_cards_flag=config.get("service.person_cards_flag",0);
|
|
}
|
|
}
|
|
m_message_handle.reset(new card_message_handle(this));
|
|
m_message_handle.reset(new card_message_handle(this));
|
|
//m_his_location_card.reset(new location_staff(m_id,m_type,cid));
|
|
//m_his_location_card.reset(new location_staff(m_id,m_type,cid));
|
|
@@ -59,9 +61,11 @@ void person::clear()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//清除一人多卡功能内存中的人卡相关数据,
|
|
//清除一人多卡功能内存中的人卡相关数据,
|
|
- Msg m;
|
|
|
|
- m.cmd=CMD_CLEAR;m.cardid=m_type<<32|m_id;
|
|
|
|
- cardMgr::instance()->tryPut(m);
|
|
|
|
|
|
+ if(m_person_cards_flag){
|
|
|
|
+ Msg m;
|
|
|
|
+ m.cmd=CMD_CLEAR;m.cardid=m_type<<32|m_id;
|
|
|
|
+ cardMgr::instance()->tryPut(m);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
void person::set_area_info(int mapid,double scale,int areaid,uint64_t t,int type)
|
|
void person::set_area_info(int mapid,double scale,int areaid,uint64_t t,int type)
|
|
@@ -107,6 +111,13 @@ void person::do_business(const std::shared_ptr<site>&site,const point &pt,double
|
|
make_his_location(m_time,pt);
|
|
make_his_location(m_time,pt);
|
|
m_timeval=m_time;
|
|
m_timeval=m_time;
|
|
handle_three_rates(pt);
|
|
handle_three_rates(pt);
|
|
|
|
+ //一人多卡数据输入
|
|
|
|
+
|
|
|
|
+ if(m_person_cards_flag){
|
|
|
|
+ Msg m;
|
|
|
|
+ m.type=m_type;m.x=(int)x;m.y=(int)y;m.cmd=CMD_HANDLE;m.cardid=m_type<<32|m_id;
|
|
|
|
+ cardMgr::instance()->tryPut(m);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
void person::reset(std::shared_ptr<monkey_person> mp)
|
|
void person::reset(std::shared_ptr<monkey_person> mp)
|