|
@@ -50,13 +50,18 @@ void area_business_count_checker::on_enter(const std::shared_ptr<area_hover>&a,
|
|
|
return ;
|
|
|
if (c->is_person())
|
|
|
{
|
|
|
+ int limit_val=a->m_area->m_limit_person_count;
|
|
|
+ int aid=a->m_area->id();
|
|
|
+ if(limit_val<=0)
|
|
|
+ {
|
|
|
+ log_warn("on_enter_area_id:%d,limit_person_count is 0.so should not run area_business_count_checker...",aid);
|
|
|
+ return;
|
|
|
+ }
|
|
|
a->m_area->m_person_count ++ ;
|
|
|
if(c->m_display)
|
|
|
a->m_area->m_person_show_count ++ ;
|
|
|
int pc=a->m_area->m_person_count.load();
|
|
|
int pc_=a->m_area->m_person_show_count.load();
|
|
|
- int limit_val=a->m_area->m_limit_person_count;
|
|
|
- int aid=a->m_area->id();
|
|
|
EVENT_TYPE ev = a->m_area->is_mine()?EVENT_TYPE::ET_OVER_COUNT_PERSON : EVENT_TYPE::ET_AREA_OVER_COUNT_PERSON ;
|
|
|
if(pc>limit_val){
|
|
|
lock();
|
|
@@ -73,13 +78,18 @@ void area_business_count_checker::on_enter(const std::shared_ptr<area_hover>&a,
|
|
|
}
|
|
|
else if (c->is_vehicle())
|
|
|
{
|
|
|
+ int limit_val=a->m_area->m_limit_vehicle_count;
|
|
|
+ int aid=a->m_area->id();
|
|
|
+ if(limit_val<=0)
|
|
|
+ {
|
|
|
+ log_warn("on_enter_area_id:%d,limit_vehicle_count is 0.so should not run area_business_count_checker...",aid);
|
|
|
+ return;
|
|
|
+ }
|
|
|
a->m_area->m_vehicle_count ++ ;
|
|
|
if(c->m_display)
|
|
|
a->m_area->m_vehicle_show_count ++ ;
|
|
|
int vc=a->m_area->m_vehicle_count.load();
|
|
|
int vc_=a->m_area->m_vehicle_show_count.load();
|
|
|
- int limit_val=a->m_area->m_limit_vehicle_count;
|
|
|
- int aid=a->m_area->id();
|
|
|
EVENT_TYPE ev = a->m_area->is_mine()?EVENT_TYPE::ET_OVER_COUNT_VEHICLE : EVENT_TYPE::ET_AREA_OVER_COUNT_VEHICLE ;
|
|
|
if(vc>limit_val){
|
|
|
lock();
|