Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions FA2sp/ExtraWindow/CNewTrigger/CNewTrigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,18 @@ void CNewTrigger::Update(HWND& hWnd)
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)Translations::ParseHouseName(value, true).c_str());
}

if (CMapData::Instance->IsMultiOnly())
{
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)FString("<Player @ A>").c_str());
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)FString("<Player @ B>").c_str());
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)FString("<Player @ C>").c_str());
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)FString("<Player @ D>").c_str());
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)FString("<Player @ E>").c_str());
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)FString("<Player @ F>").c_str());
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)FString("<Player @ G>").c_str());
SendMessage(hHouse, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)FString("<Player @ H>").c_str());
}

idx = 0;
while (SendMessage(hType, CB_DELETESTRING, 0, NULL) != CB_ERR);
SendMessage(hType, CB_INSERTSTRING, idx++, (LPARAM)(LPCSTR)(FString("0 - ") + Translations::TranslateOrDefault("TriggerRepeatType.OneTimeOr", "One Time OR")));
Expand Down Expand Up @@ -996,15 +1008,16 @@ void CNewTrigger::OnSelchangeHouse(bool edited)
if (!text)
return;

FString::TrimIndex(text);
if (text.find("<Player @") == std::string::npos)
FString::TrimIndex(text);

if (text == "")
text = "<none>";

text.Replace(",", "");

CurrentTrigger->House = Translations::ParseHouseName(text, false);
CurrentTrigger->Save();

}

void CNewTrigger::OnSelchangeType(bool edited)
Expand Down
Loading