|
@@ -36,14 +36,6 @@ struct underground_area:area
|
|
|
f=true;
|
|
|
return f;
|
|
|
}
|
|
|
- //推入特殊区域的是否需要其他信息
|
|
|
- virtual void on_enter(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c)
|
|
|
- {
|
|
|
- YA::_CARD_POS_ cp;
|
|
|
- cp.area_id = m_id;
|
|
|
- area::on_enter(a, c);
|
|
|
- swsClientMgr.SendSpecialAreaProcess(cp);
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
struct special_area:area
|
|
@@ -62,6 +54,15 @@ struct special_area:area
|
|
|
}
|
|
|
return f;
|
|
|
}
|
|
|
+ //推入特殊区域的是否需要其他信息
|
|
|
+ virtual void on_enter(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c)
|
|
|
+ {
|
|
|
+ area::on_enter(a, c);
|
|
|
+ YA::_CARD_POS_ cp;
|
|
|
+ cp.area_id = m_id;
|
|
|
+ swsClientMgr.SendSpecialAreaProcess(cp);
|
|
|
+ }
|
|
|
+
|
|
|
};
|
|
|
|
|
|
area::area(int id,int limit_count_person, int limit_time_person,double scale,int32_t mapid,int32_t type)
|
|
@@ -84,7 +85,7 @@ void area::on_hover(const std::shared_ptr<area_hover>&a,const std::shared_ptr<ca
|
|
|
{
|
|
|
for(const auto &i:m_area_business_list)
|
|
|
{
|
|
|
- auto x=a->get_business_data(i->area_business_type());
|
|
|
+ auto &x=a->get_business_data(i->area_business_type());
|
|
|
i->on_hover(a,c,x);
|
|
|
}
|
|
|
}
|
|
@@ -94,7 +95,7 @@ void area::on_enter(const std::shared_ptr<area_hover>&a,const std::shared_ptr<ca
|
|
|
log_info("on_enter..%d areaId:%d",c->m_id,m_id);
|
|
|
for(const auto &i:m_area_business_list)
|
|
|
{
|
|
|
- auto x=a->get_business_data(i->area_business_type());
|
|
|
+ auto &x=a->get_business_data(i->area_business_type());
|
|
|
i->on_enter(a,c,x);
|
|
|
}
|
|
|
}
|
|
@@ -104,7 +105,7 @@ void area::on_leave(const std::shared_ptr<area_hover>&a,const std::shared_ptr<ca
|
|
|
log_info("on_leave..%d areaId:%d",c->m_id,m_id);
|
|
|
for(const auto &i:m_area_business_list)
|
|
|
{
|
|
|
- auto x=a->get_business_data(i->area_business_type());
|
|
|
+ auto &x=a->get_business_data(i->area_business_type());
|
|
|
i->on_leave(a,c,x);
|
|
|
}
|
|
|
}
|