|
@@ -23,6 +23,7 @@
|
|
|
#include "websocket/ws_common.h"
|
|
|
#include "websocket/wsClientMgr.h"
|
|
|
#include "ant.h"
|
|
|
+#include "event.h"
|
|
|
|
|
|
//template<> std::shared_ptr<area_list> single_base<area_list, int, std::shared_ptr<area>>::m_instance=std::make_shared<area_list>();
|
|
|
|
|
@@ -85,6 +86,20 @@ area::area(int id,int limit_count_person, int limit_time_person,double scale,int
|
|
|
|
|
|
m_frozen_count.store(0);
|
|
|
}
|
|
|
+void area::clear()
|
|
|
+{
|
|
|
+ EVENT_TYPE ev = is_mine()?EVENT_TYPE::ET_OVER_COUNT_PERSON : EVENT_TYPE::ET_AREA_OVER_COUNT_PERSON ;
|
|
|
+ EVENT_TYPE ev_ = is_mine()?EVENT_TYPE::ET_OVER_COUNT_VEHICLE : EVENT_TYPE::ET_AREA_OVER_COUNT_VEHICLE ;
|
|
|
+ if(m_event_person_count)
|
|
|
+ event_tool::instance()->handle_event(OT_AREA,ev,m_id,m_limit_person_count,0,false,DT_NORMAL);
|
|
|
+ if(m_event_person_show_count)
|
|
|
+ event_tool::instance()->handle_event(OT_AREA,ev,m_id,m_limit_person_count,0,false,DT_SPECIAL);
|
|
|
+ if(m_event_vehicle_count)
|
|
|
+ event_tool::instance()->handle_event(OT_AREA,ev_,m_id,m_limit_vehicle_count,0,false,DT_NORMAL);
|
|
|
+ if(m_event_vehicle_show_count)
|
|
|
+ event_tool::instance()->handle_event(OT_AREA,ev_,m_id,m_limit_vehicle_count,0,false,DT_SPECIAL);
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
|
|
|
void area::change_business(uint32_t new_bits)
|