Hi, How do you close the dialog boxes if the player moves? If you open the dialog boxes and move to map, the dialog boxes is not closing. Can you point or give hint on how to accomplish that?
Edit: I got it.
I added:
In PartySearchSettings.cpp last part
bool cPartySearchSettings::PartySearchSettingWindowCheck()
{
if (
gInterface.CheckWindow(FriendList) ||
gInterface.CheckWindow(MoveList) ||
gInterface.CheckWindow(Party) ||
gInterface.CheckWindow(Quest) ||
gInterface.CheckWindow(NPC_Devin) ||
gInterface.CheckWindow(Guild) ||
gInterface.CheckWindow(Trade) ||
gInterface.CheckWindow(Warehouse) ||
gInterface.CheckWindow(ChaosBox) ||
gInterface.CheckWindow(CommandWindow) ||
gInterface.CheckWindow(Shop) ||
gInterface.CheckWindow(Inventory) ||
gInterface.CheckWindow(Store) ||
gInterface.CheckWindow(OtherStore) ||
gInterface.CheckWindow(DevilSquare) ||
gInterface.CheckWindow(BloodCastle) ||
gInterface.CheckWindow(CreateGuild) ||
gInterface.CheckWindow(GuardNPC) ||
gInterface.CheckWindow(SeniorNPC) ||
gInterface.CheckWindow(GuardNPC2) ||
gInterface.CheckWindow(CastleGateSwitch) ||
gInterface.CheckWindow(CatapultNPC) ||
gInterface.CheckWindow(CrywolfGate) ||
gInterface.CheckWindow(IllusionTemple) ||
gInterface.CheckWindow(HeroList) ||
gInterface.CheckWindow(ChatWindow) ||
gInterface.CheckWindow(FastMenu) ||
gInterface.CheckWindow(Options) ||
gInterface.CheckWindow(Help) ||
gInterface.CheckWindow(FastDial) ||
gInterface.CheckWindow(SkillTree) ||
gInterface.CheckWindow(LuckyCoin1) ||
gInterface.CheckWindow(LuckyCoin2) ||
gInterface.CheckWindow(NPC_Duel) ||
gInterface.CheckWindow(NPC_Titus) ||
gInterface.CheckWindow(CashShop) ||
gInterface.CheckWindow(Lugard) ||
gInterface.CheckWindow(QuestList1) ||
gInterface.CheckWindow(QuestList2) ||
gInterface.CheckWindow(Jerint) ||
gInterface.CheckWindow(FullMap) ||
gInterface.CheckWindow(GensInfo) ||
gInterface.CheckWindow(NPC_Julia) ||
gInterface.CheckWindow(NPC_ChaosMix) ||
gInterface.CheckWindow(ExpandInventory) ||
gInterface.CheckWindow(ExpandWarehouse) ||
gInterface.CheckWindow(MuHelper)
)
return true;
return false;
}
Inside cPartySearchSettings::draw_party_settings_window() i added:
if (this->PartySearchSettingWindowCheck())
{
gInterface.Data[OBJECT_PARTYSETTINGS_MAIN].Close();
return;
}
if (gInterface.Data[OBJECT_PARTYSEARCH_MAIN].OnShow = true)
{
gInterface.Data[OBJECT_PARTYSEARCH_MAIN].Close();
}
in PartySearchSettings.h inside class cPartySearchSettings public i added:
bool PartySearchSettingWindowCheck();
then in PartySearch.cpp inside void cPartySearch::draw_party_search() i added:
if (gPartySearchSettings.PartySearchSettingWindowCheck())
{
gInterface.Data[OBJECT_PARTYSEARCH_MAIN].Close();
return;
}
if (gInterface.Data[OBJECT_PARTYSETTINGS_MAIN].OnShow)
{
gInterface.Data[OBJECT_PARTYSETTINGS_MAIN].Close();
return;
}
Now i just wanted to bind draw_party_search() into a key in the keyboard. I am able to accomplish that using this code:
if (GetKeyState('J') & 0x4000)
{
if ((GetTickCount() - gInterface.Data[OBJECT_PARTYSEARCH_MAIN].EventTick) < 500) {
return;
}
gInterface.Data[OBJECT_PARTYSEARCH_MAIN].EventTick = GetTickCount();
gPartySearch.party_search_switch_state();
}
BUT the problem here is it's not loading the latest list? What am i missing? I hope someone can help? Thanks in advance!