Browse Source

井上分站直接调用area_tool::on_point逻辑

zzj 6 years ago
parent
commit
aeb7ee517e
1 changed files with 17 additions and 5 deletions
  1. 17 5
      card_base.cpp

+ 17 - 5
card_base.cpp

@@ -12,10 +12,11 @@
 #include "websocket/wsTimerThread.h"
 #include "three_rates.h"
 #include "his_location.h"
-#include"event.h"
-#include"module_service/module_call.h"
-#include"mine.h"
-#include"common_tool.h"
+#include "event.h"
+#include "module_service/module_call.h"
+#include "mine.h"
+#include "common_tool.h"
+#include "ant.h"
 
 extern config_file config;
 
@@ -53,7 +54,18 @@ void card_location_base::on_message(zloop<task*> * loop,const message_locinfo&lo
 {
 	m_ct = loc.m_card_ct;
 	m_time = loc.m_time_stamp;
-	m_message_handle->on_message(loop,loc,is_history);
+	auto site_ptr = sit_list::instance()->get(loc.m_site_id);
+
+	if(site_ptr->is_up_site())
+	{
+		m_message_handle->on_message(loop,loc,is_history);
+	}
+	else
+	{
+		auto area_tool=get_area_tool();
+		area_tool->set(*site_ptr);
+		area_tool->on_point(std::shared_from_this(),point(1,1));
+	}
 }
 
 //前端推送位置函数.