Browse Source

超员限制BUG

chensongchao 5 years ago
parent
commit
07793cb78b
3 changed files with 4 additions and 3 deletions
  1. 1 0
      area.cpp
  2. 1 1
      card_person.cpp
  3. 2 2
      module_service/area_business_card_enter_or_leave.cpp

+ 1 - 0
area.cpp

@@ -88,6 +88,7 @@ area::area(int id,int limit_count_person, int limit_time_person,double scale,int
 		m_default_limit_person_count = limit_count_person;
 		m_area_business_list=area_business::get_instance_list(m_biz_type,id);
 		m_persons_thre_time = std::make_shared<area_persons_thre_time>();
+		m_persons_thre_time->set_default_person_count_limit(limit_count_person);
     }
 void area::clear()
 {

+ 1 - 1
card_person.cpp

@@ -184,7 +184,7 @@ void person::on_timer()
     print_card_detained();
 	if(m_upmine_flag.load())
 	{
-		log_info("up_mine:upmine_flag=%d",m_upmine_flag.load());
+		log_info("card=%d cid=%d up_mine:upmine_flag=%d",m_id,m_cid, m_upmine_flag.load());
 		m_area_tool->on_leave(shared_from_this());
 		m_upmine_flag=0;
 	}

+ 2 - 2
module_service/area_business_card_enter_or_leave.cpp

@@ -47,7 +47,7 @@ void area_business_card_enter_or_leave::on_enter(const std::shared_ptr<area_hove
 	                         ,c->m_cid, c->m_type, c->m_id, a->id(), a->mapid(), start_time.c_str(),start_time.c_str(), p.x, p.y);
     }
     db_tool::PushAsync(sql);
-    std_info("card:%d Enter Area:%d ",c->m_cid,a->id());
+   // std_info("card:%d Enter Area:%d ",c->m_cid,a->id());
 }
 
 void area_business_card_enter_or_leave::on_hover(const std::shared_ptr<area_hover>&a,
@@ -82,7 +82,7 @@ void area_business_card_enter_or_leave::on_leave(const std::shared_ptr<area_hove
 	                         ,get_area_table_name(a),end_time.c_str(),ep.x,ep.y,start_time.c_str(),c->m_cid,a->id());
 
     log_info("card_enter_leave:%s",sql);
-    std_info("card:%d leave Area:%d ",c->m_cid,a->id());
+    //std_info("card:%d leave Area:%d ",c->m_cid,a->id());
     db_tool::PushAsync(sql);
 }