void CStatusEffectContainer::AddStatusEffect(CStatusEffect* PStatusEffect) { if(PStatusEffect != NULL) { SetEffectName(PStatusEffect); PStatusEffect->SetOwner(m_POwner); PStatusEffect->SetStartTime(gettick()); luautils::OnEffectGain(m_POwner, PStatusEffect); m_POwner->addModifiers(&PStatusEffect->modList); m_POwner->UpdateHealth(); m_StatusEffectList.push_back(PStatusEffect); if (m_POwner->objtype == TYPE_PC) { CCharEntity* PChar = (CCharEntity*)m_POwner; if (PStatusEffect->GetIcon() != 0) { UpdateStatusIcons(); PChar->pushPacket(new CMessageBasicPacket(PChar, PChar, PStatusEffect->GetIcon(), 0, 205)); } if (PChar->status == STATUS_NORMAL) PChar->status = STATUS_UPDATE; PChar->pushPacket(new CCharHealthPacket(PChar)); PChar->pushPacket(new CCharSyncPacket(PChar)); } } }
void CStatusEffectContainer::RemoveStatusEffect(uint32 id) { CStatusEffect* PStatusEffect = m_StatusEffectList.at(id); luautils::OnEffectLose(m_POwner, PStatusEffect); m_POwner->delModifiers(&PStatusEffect->modList); m_POwner->UpdateHealth(); m_StatusEffectList.erase(m_StatusEffectList.begin() + id); if (m_POwner->objtype == TYPE_PC) { CCharEntity* PChar = (CCharEntity*)m_POwner; if (PStatusEffect->GetIcon() != 0) { UpdateStatusIcons(); PChar->pushPacket(new CMessageBasicPacket(PChar, PChar, PStatusEffect->GetIcon(), 0, 206)); } if (PChar->status == STATUS_NORMAL) PChar->status = STATUS_UPDATE; PChar->pushPacket(new CCharHealthPacket(PChar)); PChar->pushPacket(new CCharSyncPacket(PChar)); } delete PStatusEffect; }
static INT_PTR CALLBACK ExtraImgOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) { switch(msg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); CheckDlgButton(hwndDlg, IDC_CHECK_SHOWSTATUSICONFLAG, bShowStatusIcon); CheckDlgButton(hwndDlg, IDC_CHECK_SHOWEXTRAIMGFLAG, bShowExtraIcon); CheckDlgButton(hwndDlg, IDC_CHECK_USEUNKNOWNFLAG, bUseUnknown); CheckDlgButton(hwndDlg,IDC_CHECK_USEIPTOCOUNTRY, bUseIpToCountry); SendMessage(hwndDlg,M_ENABLE_SUBCTLS,0,0); return TRUE; /* default focus */ case M_ENABLE_SUBCTLS: { BOOL checked = IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHOWEXTRAIMGFLAG); EnableWindow(GetDlgItem(hwndDlg, IDC_TEXT_EXTRAIMGFLAGCOLUMN), checked); if (!checked) checked = IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHOWSTATUSICONFLAG); EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_USEUNKNOWNFLAG), checked); EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_USEIPTOCOUNTRY), checked); } return TRUE; case WM_COMMAND: PostMessage(hwndDlg,M_ENABLE_SUBCTLS,0,0); PostMessage(GetParent(hwndDlg),PSM_CHANGED,0,0); /* enable apply */ return FALSE; case WM_NOTIFY: switch(((NMHDR*)lParam)->code) { case PSN_APPLY: /* setting change hook will pick these up */ bool bChanged = false, bTemp; if ((bTemp = IsDlgButtonChecked(hwndDlg, IDC_CHECK_USEUNKNOWNFLAG) != 0) != bUseUnknown) db_set_b(NULL, MODULENAME, "UseUnknownFlag", bUseUnknown = bTemp), bChanged = true; if ((bTemp = IsDlgButtonChecked(hwndDlg, IDC_CHECK_USEIPTOCOUNTRY) != 0) != bUseIpToCountry) db_set_b(NULL, MODULENAME, "UseIpToCountry", bUseIpToCountry = bTemp), bChanged = true; /* Status Icon */ if ((bTemp = IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHOWSTATUSICONFLAG) != 0) != bShowStatusIcon) db_set_b(NULL, MODULENAME, "ShowStatusIconFlag", bShowStatusIcon = bTemp), bChanged = true; /* Extra Image */ if ((bTemp = IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHOWEXTRAIMGFLAG) != 0) != bShowExtraIcon) db_set_b(NULL, MODULENAME, "ShowExtraImgFlag", bShowExtraIcon = bTemp), bChanged = true; if (bChanged) { UpdateExtraImages(); UpdateStatusIcons(0); } return TRUE; } break; } return FALSE; }
/***************************************************************************** * FUNCTION * UnMutethePhone * DESCRIPTION * This function informs whethere the phone is in mute or not. * * This is a part of other hardware application. * PARAMETERS * void * U16(?) [OUT] * RETURNS * returns TRUE if muted else FALSE(?) *****************************************************************************/ void UnMutethePhone(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ g_ucm_p->call_misc.is_mute = FALSE; MuteOffMicrophone(); HideStatusIcon(STATUS_ICON_MUTE); UpdateStatusIcons(); }
/***************************************************************************** * FUNCTION * MutethePhone * DESCRIPTION * This function mutes the phone i,e currently changing the global flag. * * This is a part of other hardware application. * PARAMETERS * void * changes(?) [OUT] The value of gPhoneinMute. * RETURNS * void *****************************************************************************/ void MutethePhone(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ g_ucm_p->call_misc.is_mute = TRUE; MuteOnMicrophone(); ShowStatusIcon(STATUS_ICON_MUTE); UpdateStatusIcons(); }
/************************************************************************ * * * ????????? ??????-?????? ? ????????? * * ???? ?? ????????, ?? ???????????-????????? ?????????? ???????? 32 * * * ************************************************************************/ bool CStatusEffectContainer::AddStatusEffect(CStatusEffect* PStatusEffect, bool silent) { if(PStatusEffect == NULL){ ShowWarning("status_effect_container::AddStatusEffect Status effect given was NULL!\n"); return false; } uint16 statusId = PStatusEffect->GetStatusID(); if(statusId >= MAX_EFFECTID){ ShowWarning("status_effect_container::AddStatusEffect statusId given is OVER limit %d\n", statusId); return false; } if(CanGainStatusEffect((EFFECT)statusId, PStatusEffect->GetPower())) { // remove clean up other effects OverwriteStatusEffect(PStatusEffect); PStatusEffect->SetOwner(m_POwner); SetEffectParams(PStatusEffect); // remove effects with same type DelStatusEffectsByType(PStatusEffect->GetType()); PStatusEffect->SetStartTime(gettick()); m_StatusEffectList.push_back(PStatusEffect); luautils::OnEffectGain(m_POwner, PStatusEffect); m_POwner->addModifiers(&PStatusEffect->modList); if( m_POwner->health.maxhp != 0) //make sure we're not in the middle of logging in { m_POwner->UpdateHealth(); } if (m_POwner->objtype == TYPE_PC) { CCharEntity* PChar = (CCharEntity*)m_POwner; if (PStatusEffect->GetIcon() != 0) { UpdateStatusIcons(); } if (PChar->status == STATUS_NORMAL) PChar->status = STATUS_UPDATE; if( m_POwner->health.maxhp != 0) //make sure we're not in the middle of logging in { //check for latents CLatentEffectContainer* PLatentEffectContainer; PChar->PLatentEffectContainer->CheckLatentsFoodEffect(); PChar->PLatentEffectContainer->CheckLatentsStatusEffect(); PChar->UpdateHealth(); PChar->pushPacket(new CCharHealthPacket(PChar)); } PChar->pushPacket(new CCharSyncPacket(PChar)); } return true; } return false; }
void CStatusEffectContainer::RemoveStatusEffect(uint32 id, bool silent) { CStatusEffect* PStatusEffect = m_StatusEffectList.at(id); if (PStatusEffect->GetStatusID() >= EFFECT_FIRE_MANEUVER && PStatusEffect->GetStatusID() <= EFFECT_DARK_MANEUVER && m_POwner->objtype == TYPE_PC) { puppetutils::CheckAttachmentsForManeuver((CCharEntity*)m_POwner, PStatusEffect->GetStatusID(), false); } m_StatusEffectList.erase(m_StatusEffectList.begin() + id); luautils::OnEffectLose(m_POwner, PStatusEffect); m_POwner->delModifiers(&PStatusEffect->modList); m_POwner->UpdateHealth(); if (m_POwner->objtype == TYPE_PC) { CCharEntity* PChar = (CCharEntity*)m_POwner; if (PStatusEffect->GetIcon() != 0) { UpdateStatusIcons(); if (silent == false) { PChar->pushPacket(new CMessageBasicPacket(PChar, PChar, PStatusEffect->GetIcon(), 0, 206)); } } //check for latents PChar->PLatentEffectContainer->CheckLatentsFoodEffect(); PChar->PLatentEffectContainer->CheckLatentsStatusEffect(); PChar->PLatentEffectContainer->CheckLatentsRollSong(HasStatusEffectByFlag(EFFECTFLAG_SONG | EFFECTFLAG_ROLL)); PChar->UpdateHealth(); PChar->pushPacket(new CCharHealthPacket(PChar)); PChar->pushPacket(new CCharSyncPacket(PChar)); } else { if (silent == false && PStatusEffect->GetIcon() != 0 && ((PStatusEffect->GetFlag() & EFFECTFLAG_NO_LOSS_MESSAGE) == 0) && !m_POwner->isDead()) { m_POwner->loc.zone->PushPacket(m_POwner, CHAR_INRANGE, new CMessageBasicPacket(m_POwner, m_POwner, PStatusEffect->GetIcon(), 0, 206)); } } delete PStatusEffect; }
void CStatusEffectContainer::RemoveStatusEffect(uint32 id, bool silent) { CStatusEffect* PStatusEffect = m_StatusEffectList.at(id); m_StatusEffectList.erase(m_StatusEffectList.begin() + id); luautils::OnEffectLose(m_POwner, PStatusEffect); m_POwner->delModifiers(&PStatusEffect->modList); m_POwner->UpdateHealth(); if (m_POwner->objtype == TYPE_PC) { CCharEntity* PChar = (CCharEntity*)m_POwner; if (PStatusEffect->GetIcon() != 0) { UpdateStatusIcons(); if (silent == false) { PChar->pushPacket(new CMessageBasicPacket(PChar, PChar, PStatusEffect->GetIcon(), 0, 206)); } } //check for latents CLatentEffectContainer* PLatentEffectContainer; PChar->PLatentEffectContainer->CheckLatentsFoodEffect(); PChar->PLatentEffectContainer->CheckLatentsStatusEffect(); PChar->UpdateHealth(); if (PChar->status == STATUS_NORMAL) PChar->status = STATUS_UPDATE; PChar->pushPacket(new CCharHealthPacket(PChar)); PChar->pushPacket(new CCharSyncPacket(PChar)); } else { if (silent == false && PStatusEffect->GetIcon() != 0 && ((PStatusEffect->GetFlag() & EFFECTFLAG_NO_LOSS_MESSAGE) == 0) && !m_POwner->isDead()) { m_POwner->loc.zone->PushPacket(m_POwner, CHAR_INRANGE, new CMessageBasicPacket(m_POwner, m_POwner, PStatusEffect->GetIcon(), 0, 206)); } } delete PStatusEffect; }
void MTPNP_PFAL_Entry_Idle_From_SIM_error(void) { mmi_bootup_exit_security_check(); /* send message to it slef notify ready to go to idle */ if (g_charbat_context.isChargerConnected == 1) { /* Hide status icon temporary, entry idle screen will start animation again */ HideStatusIcon(STATUS_ICON_BATTERY_STRENGTH); ShowStatusIcon(STATUS_ICON_BATTERY_STRENGTH); UpdateStatusIcons(); } if (MTPNP_AD_SDK_Is_Startup_Finished()) { /* rearrange the status bar on idle screen */ MTPNP_PFAL_Rearrange_StatusBar(); /* rearrange the menu item */ MTPNP_PFAL_Rearrange_MenuItem(); } // goto_opening_screen(); }
bool CStatusEffectContainer::AddStatusEffect(CStatusEffect* PStatusEffect, bool silent) { if(PStatusEffect == nullptr){ ShowWarning("status_effect_container::AddStatusEffect Status effect given was nullptr!\n"); return false; } uint16 statusId = PStatusEffect->GetStatusID(); if(statusId >= MAX_EFFECTID){ ShowWarning("status_effect_container::AddStatusEffect statusId given is OVER limit %d\n", statusId); return false; } if(CanGainStatusEffect((EFFECT)statusId, PStatusEffect->GetPower())) { // check for minimum duration if(PStatusEffect->GetDuration() < effects::EffectsParams[statusId].MinDuration){ PStatusEffect->SetDuration(effects::EffectsParams[statusId].MinDuration); } // remove clean up other effects OverwriteStatusEffect(PStatusEffect); PStatusEffect->SetOwner(m_POwner); SetEffectParams(PStatusEffect); // remove effects with same type DelStatusEffectsByType(PStatusEffect->GetType()); PStatusEffect->SetStartTime(gettick()); m_StatusEffectList.push_back(PStatusEffect); luautils::OnEffectGain(m_POwner, PStatusEffect); m_POwner->addModifiers(&PStatusEffect->modList); if (PStatusEffect->GetStatusID() >= EFFECT_FIRE_MANEUVER && PStatusEffect->GetStatusID() <= EFFECT_DARK_MANEUVER && m_POwner->objtype == TYPE_PC) { puppetutils::CheckAttachmentsForManeuver((CCharEntity*)m_POwner, PStatusEffect->GetStatusID(), true); } if( m_POwner->health.maxhp != 0) //make sure we're not in the middle of logging in { m_POwner->UpdateHealth(); } if (m_POwner->objtype == TYPE_PC) { CCharEntity* PChar = (CCharEntity*)m_POwner; if (PStatusEffect->GetIcon() != 0) { UpdateStatusIcons(); } if( m_POwner->health.maxhp != 0) //make sure we're not in the middle of logging in { //check for latents PChar->PLatentEffectContainer->CheckLatentsFoodEffect(); PChar->PLatentEffectContainer->CheckLatentsStatusEffect(); PChar->PLatentEffectContainer->CheckLatentsRollSong(PStatusEffect->GetFlag() & (EFFECTFLAG_SONG | EFFECTFLAG_ROLL)); PChar->UpdateHealth(); PChar->pushPacket(new CCharHealthPacket(PChar)); } PChar->pushPacket(new CCharSyncPacket(PChar)); } m_POwner->updatemask |= UPDATE_HP; return true; } return false; }
// hookProc ME_SKIN2_ICONSCHANGED static int OnStatusIconsChanged(WPARAM, LPARAM) { UpdateStatusIcons(); return 0; }
void CPHSDisplayCFUInd(void *msgPtr) { #ifdef __MMI_CFU_SEPARATE_LINE__ static U8 StatusCFULine1=0; static U8 StatusCFULine2=0; #endif /* __MMI_CFU_SEPARATE_LINE__ */ U8 nSimID; mmi_cphs_display_cfu_ind_struct *MsgCfuInd; MsgCfuInd=(mmi_cphs_display_cfu_ind_struct*)msgPtr; nSimID = MTPNP_AD_get_protocol_event_src_mode(); #ifdef __MMI_CFU_SEPARATE_LINE__ HideStatusIcon(STATUS_ICON_CALL_DIVERT_L1); HideStatusIcon(STATUS_ICON_CALL_DIVERT_L2); HideStatusIcon(STATUS_ICON_CALL_DIVERT_L1L2); if(MsgCfuInd->action==1) { if(MsgCfuInd->line_num==0) StatusCFULine1=1; else if(MsgCfuInd->line_num==1) StatusCFULine2=1; } else { if(MsgCfuInd->line_num==0) StatusCFULine1=0; else if(MsgCfuInd->line_num==1) StatusCFULine2=0; } if((StatusCFULine1)&&(!StatusCFULine2)) { ShowStatusIcon(STATUS_ICON_CALL_DIVERT_L1); } else if((!StatusCFULine1)&&(StatusCFULine2)) { ShowStatusIcon(STATUS_ICON_CALL_DIVERT_L2); } else if((StatusCFULine1)&&(StatusCFULine2)) { ShowStatusIcon(STATUS_ICON_CALL_DIVERT_L1L2); } #else /* !__MMI_CFU_SEPARATE_LINE__ */ if(MsgCfuInd->action==1) { b_CFU_Eable[nSimID] = TRUE; ShowStatusIcon(STATUS_ICON_CALL_DIVERT_L1L2 + nSimID); } else { b_CFU_Eable[nSimID] = FALSE; HideStatusIcon(STATUS_ICON_CALL_DIVERT_L1L2 + nSimID); } UpdateStatusIcons(); #endif /* __MMI_CFU_SEPARATE_LINE__ */ }