|
@@ -14,31 +14,31 @@
|
|
|
//服务器重启加载数据
|
|
|
void area_business_count_checker::on_load_his(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr)
|
|
|
{
|
|
|
- if (nullptr == a->m_area )
|
|
|
- return ;
|
|
|
- if (c->is_person() && !a->m_area->m_event_person_count)
|
|
|
- {
|
|
|
- EVENT_TYPE ev = a->m_area->is_mine()?EVENT_TYPE::ET_OVER_COUNT_PERSON : EVENT_TYPE::ET_AREA_OVER_COUNT_PERSON ;
|
|
|
- auto ev_ptr_temp = event_list::instance()->get_event_area(a->m_area->id(),ev);
|
|
|
- if (ev_ptr_temp && !ev_ptr_temp->is_end())
|
|
|
- a->m_area->m_event_person_count = true;
|
|
|
+ if (nullptr == a->m_area )
|
|
|
+ return ;
|
|
|
+ if (c->is_person() && !a->m_area->m_event_person_count)
|
|
|
+ {
|
|
|
+ EVENT_TYPE ev = a->m_area->is_mine()?EVENT_TYPE::ET_OVER_COUNT_PERSON : EVENT_TYPE::ET_AREA_OVER_COUNT_PERSON ;
|
|
|
+ auto ev_ptr_temp = event_list::instance()->get_event_area(a->m_area->id(),ev);
|
|
|
+ if (ev_ptr_temp && !ev_ptr_temp->is_end())
|
|
|
+ a->m_area->m_event_person_count = true;
|
|
|
|
|
|
- }
|
|
|
- else if (c->is_vehicle() && !a->m_area->m_event_vehicle_count)
|
|
|
- {
|
|
|
- EVENT_TYPE ev = a->m_area->is_mine()?EVENT_TYPE::ET_OVER_COUNT_VEHICLE : EVENT_TYPE::ET_AREA_OVER_COUNT_VEHICLE ;
|
|
|
- auto ev_ptr_temp = event_list::instance()->get_event_area(a->m_area->id(),ev);
|
|
|
- if (ev_ptr_temp && !ev_ptr_temp->is_end())
|
|
|
- {
|
|
|
- a->m_area->m_event_vehicle_count = true;
|
|
|
- }
|
|
|
- }
|
|
|
- on_enter(a,c,ptr);
|
|
|
+ }
|
|
|
+ else if (c->is_vehicle() && !a->m_area->m_event_vehicle_count)
|
|
|
+ {
|
|
|
+ EVENT_TYPE ev = a->m_area->is_mine()?EVENT_TYPE::ET_OVER_COUNT_VEHICLE : EVENT_TYPE::ET_AREA_OVER_COUNT_VEHICLE ;
|
|
|
+ auto ev_ptr_temp = event_list::instance()->get_event_area(a->m_area->id(),ev);
|
|
|
+ if (ev_ptr_temp && !ev_ptr_temp->is_end())
|
|
|
+ {
|
|
|
+ a->m_area->m_event_vehicle_count = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ on_enter(a,c,ptr);
|
|
|
}
|
|
|
|
|
|
//增加计数,并进行判断
|
|
|
void area_business_count_checker::on_enter(const std::shared_ptr<area_hover>&a,
|
|
|
- const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr)
|
|
|
+ const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr)
|
|
|
{
|
|
|
if (nullptr == a->m_area )
|
|
|
return ;
|
|
@@ -72,13 +72,13 @@ void area_business_count_checker::on_enter(const std::shared_ptr<area_hover>&a,
|
|
|
}
|
|
|
|
|
|
void area_business_count_checker::on_hover(const std::shared_ptr<area_hover>&a,
|
|
|
- const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr)
|
|
|
+ const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
- //减少计数
|
|
|
+//减少计数
|
|
|
void area_business_count_checker::on_leave(const std::shared_ptr<area_hover>&a,
|
|
|
- const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr)
|
|
|
+ const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr)
|
|
|
{
|
|
|
if (nullptr == a->m_area )
|
|
|
{
|