Skip to content

Commit 4dade2f

Browse files
committed
Update CDMSingle.cpp
1 parent 3cf9742 commit 4dade2f

1 file changed

Lines changed: 82 additions & 0 deletions

File tree

CDMSingle.cpp

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4101,6 +4101,14 @@ void CDM::OnGetTagItem(CFlightPlan FlightPlan, CRadarTarget RadarTarget, int Ite
41014101
strcpy_s(sItemString, 16, message.c_str());
41024102
}
41034103
}
4104+
else {
4105+
for (ServerRestricted sr : serverRestrictedPlanes) {
4106+
if (sr.callsign == (string)FlightPlan.GetCallsign()) {
4107+
ItemRGB = TAG_YELLOW;
4108+
strcpy_s(sItemString, 50, sr.reason.c_str());
4109+
}
4110+
}
4111+
}
41044112
}
41054113
else if (ItemCode == TAG_ITEM_CTOT)
41064114
{
@@ -4122,6 +4130,14 @@ void CDM::OnGetTagItem(CFlightPlan FlightPlan, CRadarTarget RadarTarget, int Ite
41224130
strcpy_s(sItemString, 16, slotList[pos].ttot.substr(0, 4).c_str());
41234131
}
41244132
}
4133+
else {
4134+
for (ServerRestricted sr : serverRestrictedPlanes) {
4135+
if (sr.callsign == (string)FlightPlan.GetCallsign()) {
4136+
ItemRGB = TAG_CTOT;
4137+
strcpy_s(sItemString, 16, sr.ctot.c_str());
4138+
}
4139+
}
4140+
}
41254141
}
41264142
else if (ItemCode == NOW_CTOT_DIFF)
41274143
{
@@ -4219,6 +4235,31 @@ void CDM::OnGetTagItem(CFlightPlan FlightPlan, CRadarTarget RadarTarget, int Ite
42194235
ItemRGB = TAG_GREY;
42204236
strcpy_s(sItemString, 16, "----");
42214237
}
4238+
else if (ItemCode == TAG_ITEM_FLOW_MESSAGE) {
4239+
if (aircraftFind) {
4240+
if (slotList[pos].hasManualCtot) {
4241+
string message = "MAN ACT";
4242+
if (slotList[pos].ctot != "") {
4243+
message = slotList[pos].flowReason;
4244+
}
4245+
ItemRGB = TAG_YELLOW;
4246+
strcpy_s(sItemString, 16, message.c_str());
4247+
}
4248+
else if (slotList[pos].hasEcfmpRestriction) {
4249+
ItemRGB = TAG_YELLOW;
4250+
string message = slotList[pos].ecfmpRestriction.ident;
4251+
strcpy_s(sItemString, 16, message.c_str());
4252+
}
4253+
}
4254+
else {
4255+
for (ServerRestricted sr : serverRestrictedPlanes) {
4256+
if (sr.callsign == (string)FlightPlan.GetCallsign()) {
4257+
ItemRGB = TAG_YELLOW;
4258+
strcpy_s(sItemString, 50, sr.reason.c_str());
4259+
}
4260+
}
4261+
}
4262+
}
42224263
else if (ItemCode == TAG_ITEM_CTOT)
42234264
{
42244265
if (aircraftFind) {
@@ -4239,6 +4280,14 @@ void CDM::OnGetTagItem(CFlightPlan FlightPlan, CRadarTarget RadarTarget, int Ite
42394280
strcpy_s(sItemString, 16, slotList[pos].ttot.substr(0, 4).c_str());
42404281
}
42414282
}
4283+
else {
4284+
for (ServerRestricted sr : serverRestrictedPlanes) {
4285+
if (sr.callsign == (string)FlightPlan.GetCallsign()) {
4286+
ItemRGB = TAG_CTOT;
4287+
strcpy_s(sItemString, 16, sr.ctot.c_str());
4288+
}
4289+
}
4290+
}
42424291
}
42434292
else if (ItemCode == NOW_CTOT_DIFF)
42444293
{
@@ -4340,6 +4389,31 @@ void CDM::OnGetTagItem(CFlightPlan FlightPlan, CRadarTarget RadarTarget, int Ite
43404389
ItemRGB = TAG_GREY;
43414390
strcpy_s(sItemString, 16, "----");
43424391
}
4392+
else if (ItemCode == TAG_ITEM_FLOW_MESSAGE) {
4393+
if (aircraftFind) {
4394+
if (slotList[pos].hasManualCtot) {
4395+
string message = "MAN ACT";
4396+
if (slotList[pos].ctot != "") {
4397+
message = slotList[pos].flowReason;
4398+
}
4399+
ItemRGB = TAG_YELLOW;
4400+
strcpy_s(sItemString, 16, message.c_str());
4401+
}
4402+
else if (slotList[pos].hasEcfmpRestriction) {
4403+
ItemRGB = TAG_YELLOW;
4404+
string message = slotList[pos].ecfmpRestriction.ident;
4405+
strcpy_s(sItemString, 16, message.c_str());
4406+
}
4407+
}
4408+
else {
4409+
for (ServerRestricted sr : serverRestrictedPlanes) {
4410+
if (sr.callsign == (string)FlightPlan.GetCallsign()) {
4411+
ItemRGB = TAG_YELLOW;
4412+
strcpy_s(sItemString, 50, sr.reason.c_str());
4413+
}
4414+
}
4415+
}
4416+
}
43434417
else if (ItemCode == TAG_ITEM_CTOT)
43444418
{
43454419
if (aircraftFind) {
@@ -4360,6 +4434,14 @@ void CDM::OnGetTagItem(CFlightPlan FlightPlan, CRadarTarget RadarTarget, int Ite
43604434
strcpy_s(sItemString, 16, slotList[pos].ttot.substr(0, 4).c_str());
43614435
}
43624436
}
4437+
else {
4438+
for (ServerRestricted sr : serverRestrictedPlanes) {
4439+
if (sr.callsign == (string)FlightPlan.GetCallsign()) {
4440+
ItemRGB = TAG_CTOT;
4441+
strcpy_s(sItemString, 16, sr.ctot.c_str());
4442+
}
4443+
}
4444+
}
43634445
}
43644446
else if (ItemCode == NOW_CTOT_DIFF)
43654447
{

0 commit comments

Comments
 (0)