这篇教程C++ GET_CLASS函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GET_CLASS函数的典型用法代码示例。如果您正苦于以下问题:C++ GET_CLASS函数的具体用法?C++ GET_CLASS怎么用?C++ GET_CLASS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GET_CLASS函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: write_mobile_especint write_mobile_espec(mob_vnum mvnum, struct char_data *mob, FILE *fd){ if (GET_ATTACK(mob) != 0) fprintf(fd, "BareHandAttack: %d/n", GET_ATTACK(mob)); if (GET_STR(mob) != 0) fprintf(fd, "Str: %d/n", GET_STR(mob)); if (GET_ADD(mob) != 0) fprintf(fd, "StrAdd: %d/n", GET_ADD(mob)); if (GET_DEX(mob) != 0) fprintf(fd, "Dex: %d/n", GET_DEX(mob)); if (GET_INT(mob) != 0) fprintf(fd, "Int: %d/n", GET_INT(mob)); if (GET_WIS(mob) != 0) fprintf(fd, "Wis: %d/n", GET_WIS(mob)); if (GET_CON(mob) != 0) fprintf(fd, "Con: %d/n", GET_CON(mob)); if (GET_CHA(mob) != 0) fprintf(fd, "Cha: %d/n", GET_CHA(mob)); if(GET_CLASS(mob) != CLASS_NPC_OTHER) fprintf(fd, "Class: %d/n", GET_CLASS(mob)); if(GET_RACE(mob) != RACE_NPC_OTHER) fprintf(fd, "Race: %d/n", GET_RACE(mob)); if(GET_MOB_WEIGHT(mob)) fprintf(fd, "Weight: %d/n", GET_MOB_WEIGHT(mob)); fprintf(fd, "Size: %d/n", GET_MOB_SIZE(mob)); fputs("E/n", fd); return TRUE;}
开发者ID:vedicveko,项目名称:Aarait,代码行数:30,
示例2: get_class_idx_by_size/* LIFO policy, first hit policy */static void *find_fit(size_t asize) { char *bp = NULL; char *bclassp = NULL; int index = get_class_idx_by_size(asize); dbg_printf("=== FIND_FIT adjusted size: %ld class index = %d/n", asize, index); for (index = index; index < CLASS_NUM; index ++) { if (index < 1) { bclassp = GET_CLASS(index); bp = GET_CLASS_ROOT_BLK(bclassp); if (bp) return bp; } else { bclassp = GET_CLASS(index); bp = GET_CLASS_ROOT_BLK(bclassp); if (bp) { do { check_bp_pred_succ(bp); if ((GET_SIZE(GET_HEADER(bp)) >= asize)) return bp; } while ((bp = (char *)GET_SUCC_BLK(bp)) != NULL); } } } return NULL;}
开发者ID:analysiser,项目名称:malloclab-score85-seglist,代码行数:32,
示例3: find_feat_slot/* Ищем свободный слот под способность. Возвращает число от 0 до MAX_ACC_FEAT-1 - номер слота, 0, если способность врожденная и -1 если слотов не найдено. НЕ проверяет доступность врожденной способности на данном уровне.*/bool find_feat_slot(CHAR_DATA *ch, int feat){ int i, lowfeat, hifeat; //если способность врожденная - ее всегда можно получить if (feat_info[feat].natural_classfeat[(int) GET_CLASS(ch)][(int) GET_KIN(ch)] || PlayerRace::FeatureCheck(GET_KIN(ch),GET_RACE(ch),feat)) return TRUE; //сколько у нас вообще способностей, у которых слот меньше требуемого, и сколько - тех, у которых больше или равно? lowfeat = 0; hifeat = 0; for (i = 1; i < MAX_FEATS; i++) { if (feat_info[i].natural_classfeat[(int) GET_CLASS(ch)][(int) GET_KIN(ch)] || PlayerRace::FeatureCheck(GET_KIN(ch),GET_RACE(ch),i)) continue; if (HAVE_FEAT(ch,i) && (FEAT_SLOT(ch,i) < FEAT_SLOT(ch,feat))) lowfeat++; if (HAVE_FEAT(ch,i) && (FEAT_SLOT(ch,i) >= FEAT_SLOT(ch,feat))) hifeat++; }//из имеющегося количества слотов нужно вычесть://число высоких слотов, занятых низкоуровневыми способностями,//с учтом, что низкоуровневые могут и не занимать слотов выше им положенных,//а также собственно число слотов, занятых высокоуровневыми способностями if (NUM_LEV_FEAT(ch)-FEAT_SLOT(ch, feat)-hifeat-MAX(0, lowfeat-FEAT_SLOT(ch, feat)) > 0) return TRUE;//oops.. слотов нет return FALSE;}
开发者ID:prool,项目名称:zerkalomud,代码行数:35,
示例4: gain_skill_profvoidgain_skill_prof(struct creature *ch, int skl){ int learned; if (skl == SKILL_READ_SCROLLS || skl == SKILL_USE_WANDS) learned = 10; else learned = LEARNED(ch); // NPCs don't learn if (IS_NPC(ch)) return; // You can't gain in a skill that you don't really know if (GET_LEVEL(ch) < SPELL_LEVEL(skl, GET_CLASS(ch))) { if (!IS_REMORT(ch)) return; if (GET_LEVEL(ch) < SPELL_LEVEL(skl, GET_REMORT_CLASS(ch))) return; } // Check for remort classes too if (SPELL_GEN(skl, GET_CLASS(ch)) > 0 && GET_REMORT_GEN(ch) < SPELL_GEN(skl, GET_CLASS(ch))) return; if (GET_SKILL(ch, skl) >= (learned - 10)) if ((GET_SKILL(ch, skl) - GET_LEVEL(ch)) <= 66) SET_SKILL(ch, skl, GET_SKILL(ch, skl) + 1);}
开发者ID:TempusMUD,项目名称:Tempuscode,代码行数:29,
示例5: say_spellstatic void say_spell(struct char_data *ch, int spellnum, struct char_data *tch, struct obj_data *tobj){ char lbuf[256], buf[256], buf1[256], buf2[256]; /* FIXME */ const char *format; struct char_data *i; int j, ofs = 0; *buf = '/0'; strlcpy(lbuf, skill_name(spellnum), sizeof(lbuf)); while (lbuf[ofs]) { for (j = 0; *(syls[j].org); j++) { if (!strncmp(syls[j].org, lbuf + ofs, strlen(syls[j].org))) { strcat(buf, syls[j].news); /* strcat: BAD */ ofs += strlen(syls[j].org); break; } } /* i.e., we didn't find a match in syls[] */ if (!*syls[j].org) { log("No entry in syllable table for substring of '%s'", lbuf); ofs++; } } if (tch != NULL && IN_ROOM(tch) == IN_ROOM(ch)) { if (tch == ch) format = "$n closes $s eyes and utters the words, '%s'."; else format = "$n stares at $N and utters the words, '%s'."; } else if (tobj != NULL && ((IN_ROOM(tobj) == IN_ROOM(ch)) || (tobj->carried_by == ch))) format = "$n stares at $p and utters the words, '%s'."; else format = "$n utters the words, '%s'."; snprintf(buf1, sizeof(buf1), format, skill_name(spellnum)); snprintf(buf2, sizeof(buf2), format, buf); for (i = world[IN_ROOM(ch)].people; i; i = i->next_in_room) { if (i == ch || i == tch || !i->desc || !AWAKE(i)) continue; if (GET_CLASS(ch) == GET_CLASS(i)) perform_act(buf1, ch, tobj, tch, i); else perform_act(buf2, ch, tobj, tch, i); } if (tch != NULL && tch != ch && IN_ROOM(tch) == IN_ROOM(ch)) { snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", GET_CLASS(ch) == GET_CLASS(tch) ? skill_name(spellnum) : buf); act(buf1, FALSE, ch, NULL, tch, TO_VICT); }}
开发者ID:Lundessa,项目名称:raven3,代码行数:56,
示例6: say_spell/* say_spell erodes buf, buf1, buf2 */void say_spell(struct char_data *ch, struct spell_info_type *sptr, struct char_data *tch, struct obj_data *tobj){ char lbuf[256]; const char *format; struct char_data *i; int j, ofs = 0; *buf = '/0'; sprintf(lbuf, "%s", LOWERALL(sptr->name)); while (lbuf[ofs]) { for (j = 0; *(syls[j].org); j++) { if (!strncmp(syls[j].org, lbuf + ofs, strlen(syls[j].org))) { strcat(buf, syls[j].news); ofs += strlen(syls[j].org); break; } } /* i.e., we didn't find a match in syls[] */ if (!*syls[j].org) { extended_mudlog(NRM, SYSL_BUGS, TRUE, "No entry in syllable table for substring of '%s'", lbuf); ofs++; } } if (tch != NULL && IN_ROOM(tch) == IN_ROOM(ch)) { if (tch == ch) format = "$n closes $s eyes and utters the words, '&W%s&n'."; else format = "$n stares at $N and utters the words, '&W%s&n'."; } else if (tobj != NULL && ((IN_ROOM(tobj) == IN_ROOM(ch)) || (tobj->carried_by == ch))) format = "$n stares at $p and utters the words, '&W%s&n'."; else format = "$n utters the words, '&W%s&n'."; sprintf(buf1, format, sptr->name); sprintf(buf2, format, buf); for (i = world[IN_ROOM(ch)].people; i; i = i->next_in_room) { if (i == ch || i == tch || !i->desc || !AWAKE(i) || IN_OLC(i->desc) || PLR_FLAGGED(i, PLR_WRITING)) continue; if (GET_CLASS(ch) == GET_CLASS(i)) perform_act(buf1, ch, tobj, tch, i, 0); else perform_act(buf2, ch, tobj, tch, i, 0); } if (tch != NULL && tch != ch && IN_ROOM(tch) == IN_ROOM(ch)) { sprintf(buf1, "$n stares at you and utters the words, '&W%s&n'.", GET_CLASS(ch) == GET_CLASS(tch) ? sptr->name : buf); act(buf1, FALSE, ch, NULL, tch, TO_VICT); }}
开发者ID:tbjers,项目名称:arcanerealms,代码行数:57,
示例7: do_start/* Some initializations for characters, including initial skills */void do_start(struct char_data *ch){ GET_LEVEL(ch) = 1; GET_TOT_LEVEL(ch) = 1; GET_EXP(ch) = 1; GET_CLASS_1(ch) = GET_CLASS(ch); GET_MULTIS(ch) = 1; set_title(ch, NULL); roll_real_abils(ch); GET_MAX_HIT(ch) = 10; GET_MAX_MANA(ch) = 100; GET_MAX_MOVE(ch) = 100; switch (GET_CLASS(ch)) { case CLASS_ADEPT: break; case CLASS_MEDIC: break; case CLASS_BANDIT: SET_SKILL(ch, SKILL_SNEAK, 10); SET_SKILL(ch, SKILL_HIDE, 5); SET_SKILL(ch, SKILL_STEAL, 15); SET_SKILL(ch, SKILL_BACKSTAB, 10); SET_SKILL(ch, SKILL_PICK_LOCK, 10); SET_SKILL(ch, SKILL_TRACK, 10); break; case CLASS_SOLDIER: break; } advance_level(ch); GET_HIT(ch) = GET_MAX_HIT(ch); GET_MANA(ch) = GET_MAX_MANA(ch); GET_MOVE(ch) = GET_MAX_MOVE(ch); GET_COND(ch, THIRST) = 24; GET_COND(ch, HUNGER) = 24; GET_COND(ch, DRUNK) = 0; if (CONFIG_SITEOK_ALL) SET_BIT_AR(PLR_FLAGS(ch), PLR_SITEOK);}
开发者ID:DarkStar4758,项目名称:darkmud,代码行数:50,
示例8: calcMoveBaseint calcMoveBase(CharData *ch) { int base = 0; base += graf(age(ch).year, 40, 39, 34, 30, 26, 24, 23); /* Class/Level calculations */ if (GET_CLASS(ch) == CLASS_RANGER) base += GET_LEVEL(ch); else if (GET_CLASS(ch) == CLASS_ASSASSIN || GET_CLASS(ch) == CLASS_THIEF) base += GET_LEVEL(ch)*2/3; else base += GET_LEVEL(ch)/3; return base;}
开发者ID:Lundessa,项目名称:NewRavenVM,代码行数:15,
示例9: InitJni/* * Init JNI fields that will be used to fetch the key and crypt/encrypt */static intInitJni(vlc_keystore *p_keystore, JNIEnv *p_env){ jclass clazz = NULL; GET_CLASS("java/lang/Object"); GET_ID(GetMethodID, Object.toString, "toString", "()Ljava/lang/String;"); GET_CLASS("java/security/KeyStore"); GET_GLOBAL_CLASS(KeyStore); GET_ID(GetStaticMethodID, KeyStore.getInstance, "getInstance", "(Ljava/lang/String;)Ljava/security/KeyStore;"); GET_ID(GetMethodID, KeyStore.load, "load", "(Ljava/security/KeyStore$LoadStoreParameter;)V"); GET_ID(GetMethodID, KeyStore.getEntry, "getEntry", "(Ljava/lang/String;Ljava/security/KeyStore$ProtectionParameter;)" "Ljava/security/KeyStore$Entry;"); GET_CLASS("java/security/KeyStore$SecretKeyEntry"); GET_ID(GetMethodID, KeyStore.SecretKeyEntry.getSecretKey, "getSecretKey", "()Ljavax/crypto/SecretKey;"); GET_CLASS("javax/crypto/spec/IvParameterSpec"); GET_GLOBAL_CLASS(IvParameterSpec); GET_ID(GetMethodID, IvParameterSpec.ctor, "<init>", "([B)V"); GET_CLASS("javax/crypto/Cipher"); GET_GLOBAL_CLASS(Cipher); GET_ID(GetStaticMethodID, Cipher.getInstance, "getInstance", "(Ljava/lang/String;)Ljavax/crypto/Cipher;"); GET_ID(GetMethodID, Cipher.init, "init", "(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V"); GET_ID(GetMethodID, Cipher.doFinal, "doFinal", "([B)[B"); GET_ID(GetMethodID, Cipher.getIV, "getIV", "()[B"); GET_CONST_INT(Cipher.ENCRYPT_MODE, "ENCRYPT_MODE"); GET_CONST_INT(Cipher.DECRYPT_MODE, "DECRYPT_MODE"); DEL_LREF(clazz); jstring VLC_CIPHER = NEW_STR("AES/CBC/PKCS7Padding"); if (CHECK_EXCEPTION()) return VLC_EGENERIC; fields.VLC_CIPHER = NEW_GREF(VLC_CIPHER); DEL_LREF(VLC_CIPHER); return VLC_SUCCESS;}
开发者ID:0xheart0,项目名称:vlc,代码行数:51,
示例10: ApplicationFrontendFlowStepcall_graph_computation::call_graph_computation(const ParameterConstRef _parameters, const application_managerRef _AppM, const DesignFlowManagerConstRef _design_flow_manager) : ApplicationFrontendFlowStep(_AppM, FUNCTION_ANALYSIS, _design_flow_manager, _parameters), CGM(_AppM->GetCallGraphManager()), current(0){ debug_level = parameters->get_class_debug_level(GET_CLASS(*this), DEBUG_LEVEL_NONE);}
开发者ID:hoangt,项目名称:PandA-bambu,代码行数:7,
示例11: gain_exp_regardlessvoid gain_exp_regardless(struct char_data * ch, int gain){ int is_altered = FALSE; int num_levels = 0; GET_EXP(ch) += gain; if (GET_EXP(ch) < 0) GET_EXP(ch) = 0; if (!IS_NPC(ch)) { while (GET_LEVEL(ch) < LVL_IMPL && GET_EXP(ch) >= level_exp(GET_CLASS(ch), GET_LEVEL(ch) + 1)) { GET_LEVEL(ch) += 1; num_levels++; advance_level(ch); is_altered = TRUE; } if (is_altered) { sprintf(buf, "%s advanced %d level%s to level %d.", GET_NAME(ch), num_levels, num_levels == 1 ? "" : "s", GET_LEVEL(ch)); mudlog(buf, BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE); if (num_levels == 1) send_to_char("You rise a level!/r/n", ch); else { sprintf(buf, "You rise %d levels!/r/n", num_levels); send_to_char(buf, ch); } set_title(ch, NULL); check_autowiz(ch); } }}
开发者ID:matthewbode,项目名称:mg2,代码行数:34,
示例12: mag_savingthrowint mag_savingthrow(struct char_data * ch, int type){ int save; /* negative apply_saving_throw values make saving throws better! */ if (!ch) { return 0; } if (IS_NPC(ch)) { save = class_saving_throws[(int) CLASS_WARRIOR][type] - (GET_LEVEL(ch) / 3); save += mob_race_saving_throws[(int) GET_RACE(ch)][type]; } else { save = class_saving_throws[(int) GET_CLASS(ch)][type] - (GET_LEVEL(ch) / 4); save += race_saving_throws[(int) GET_RACE(ch)][type]; } save += GET_SAVE(ch, type); /* throwing a 0 is always a failure */ if (MAX(1, save) < number(0, 20)) return TRUE; else return FALSE;}
开发者ID:nawglan,项目名称:ShadowWind,代码行数:25,
示例13: target_deviceFPGA_device::FPGA_device(const ParameterConstRef _Param, const technology_managerRef _TM) : target_device(_Param, _TM, TargetDevice_Type::FPGA){ ///creating the datastructure representing the target technology target = target_technology::create_technology(target_technology::FPGA, Param); debug_level = Param->get_class_debug_level(GET_CLASS(*this));}
开发者ID:hoangt,项目名称:PandA-bambu,代码行数:7,
示例14: list_skillsvoid list_skills(struct char_data *ch){ const char *overflow = "/r/n**OVERFLOW**/r/n"; int i, sortpos; size_t len = 0, nlen; char buf2[MAX_STRING_LENGTH]; len = snprintf(buf2, sizeof(buf2), "You have %d practice session%s remaining./r/n" "You know of the following %ss:/r/n", GET_PRACTICES(ch), GET_PRACTICES(ch) == 1 ? "" : "s", SPLSKL(ch)); int cnt = 0; for (sortpos = 1; sortpos <= MAX_SKILLS; sortpos++) { i = spell_sort_info[sortpos]; if (GET_LEVEL(ch) >= spell_info[i].min_level[(int) GET_CLASS(ch)]) { cnt += 1; nlen = snprintf(buf2 + len, sizeof(buf2) - len, (cnt%2) ? "%-20s %s | " : "%-20s %s/r/n", spell_info[i].name, how_good(GET_SKILL(ch, i))); if (len + nlen >= sizeof(buf2) || nlen < 0) break; len += nlen; } } if (len >= sizeof(buf2)) strcpy(buf2 + sizeof(buf2) - strlen(overflow) - 1, overflow); /* strcpy: OK */ parse_at(buf2); page_string(ch->desc, buf2, TRUE);}
开发者ID:Lundessa,项目名称:raven3,代码行数:28,
示例15: php_is_r_primitivestatic int php_is_r_primitive(SEXP val, SEXPTYPE *type) /* {{{ */{ int is = 0; if (GET_LENGTH(GET_DIM(val))) { return 0; } if (GET_LENGTH(GET_CLASS(val))) { return 0; } *type = TYPEOF(val); switch (*type) { case REALSXP: case LGLSXP: case STRSXP: case INTSXP: is = 1; default: break; } return is;}
开发者ID:tony2001,项目名称:arrr,代码行数:25,
示例16: R_isInstanceOfRbooleanR_isInstanceOf(USER_OBJECT_ obj, const char *klass){ USER_OBJECT_ klasses; int n, i; SEXP e, r_ans; Rboolean ans; klasses = GET_CLASS(obj); n = GET_LENGTH(klasses); for(i = 0; i < n ; i++) { if(strcmp(CHAR_DEREF(STRING_ELT(klasses, i)), klass) == 0) return(TRUE); } PROTECT(e = allocVector(LANGSXP, 3)); SETCAR(e, Rf_install("is")); SETCAR(CDR(e), obj); SETCAR(CDR(CDR(e)), mkString(klass)); r_ans = Rf_eval(e, R_GlobalEnv); ans = LOGICAL(r_ans)[0]; UNPROTECT(1); return(ans);}
开发者ID:beanumber,项目名称:Sxslt,代码行数:28,
示例17: bonobo_ui_component_thaw/** * bonobo_ui_component_thaw: * @component: the component * @ev: the (optional) CORBA exception environment * * This decrements the freeze count on the remote associated * #BonoboUIContainer, (if frozen). This means that a batch * of update operations can be performed without a re-render * penalty per update. * * NB. if your GUI is frozen / not updating you probably have a * freeze / thaw reference leak/ **/voidbonobo_ui_component_thaw (BonoboUIComponent *component, CORBA_Environment *ev){ g_return_if_fail (BONOBO_IS_UI_COMPONENT (component)); GET_CLASS (component)->thaw (component, ev);}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:21,
示例18: set_titlevoid set_title(struct char_data * ch, char *title){ if (title == NULL) { if (GET_SEX(ch) == SEX_FEMALE) title = title_female(GET_CLASS(ch), GET_LEVEL(ch)); else title = title_male(GET_CLASS(ch), GET_LEVEL(ch)); } if (strlen(title) > MAX_TITLE_LENGTH) title[MAX_TITLE_LENGTH] = '/0'; if (GET_TITLE(ch) != NULL) free(GET_TITLE(ch)); GET_TITLE(ch) = str_dup(title);}
开发者ID:matthewbode,项目名称:mg2,代码行数:17,
示例19: mag_manacostintmag_manacost (struct char_data *ch, int spellnum){ return MAX (SINFO.mana_max - (SINFO.mana_change * (GET_LEVEL (ch) - SINFO.min_level[(int) GET_CLASS (ch)])), SINFO.mana_min);}
开发者ID:adept2tech,项目名称:Mclandia,代码行数:8,
示例20: PM// constructorPragmaParser::PragmaParser(const pragma_managerRef _PM, const ParameterConstRef _Param) : PM(_PM), debug_level(_Param->get_class_debug_level(GET_CLASS(*this))), Param(_Param), search_function(false){ THROW_ASSERT(PM, "Pragma manager not initialized");}
开发者ID:hoangt,项目名称:PandA-bambu,代码行数:9,
示例21: mobCombatAction/* * Class and/or race specific mobile combat behavior. */void mobCombatAction(struct char_data *mob) { /* First do class specific spells */ if(!(*mob_class_action[(int)GET_CLASS(mob)].func)(mob, NULL, 0, NULL) && !(*mob_race_action[(int)GET_RACE(mob)].func)(mob, NULL, 0, NULL)) { spec_OffensiveAction(mob, NULL, 0, NULL); }}
开发者ID:Lundessa,项目名称:raven3,代码行数:11,
示例22: bonobo_ui_component_path_exists/** * bonobo_ui_component_path_exists: * @component: the component * @path: the path to set the property on * @ev: the (optional) CORBA exception environment * * Return value: TRUE if the path exists in the container. **/gbooleanbonobo_ui_component_path_exists (BonoboUIComponent *component, const char *path, CORBA_Environment *ev){ g_return_val_if_fail (BONOBO_IS_UI_COMPONENT (component), FALSE); return GET_CLASS (component)->exists (component, path, ev);}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:17,
示例23: FrontendFlowStepFunctionFrontendFlowStep::FunctionFrontendFlowStep(const application_managerRef _AppM, const unsigned int _function_id, const FrontendFlowStepType _frontend_flow_step_type, const DesignFlowManagerConstRef _design_flow_manager, const ParameterConstRef _parameters) : FrontendFlowStep(_AppM, _frontend_flow_step_type, _design_flow_manager, _parameters), function_behavior(_AppM->GetFunctionBehavior(_function_id)), function_id(_function_id), bb_version(0), bitvalue_version(0){ debug_level = parameters->get_class_debug_level(GET_CLASS(*this));}
开发者ID:hoangt,项目名称:PandA-bambu,代码行数:9,
示例24: bonobo_ui_component_rm/** * bonobo_ui_component_rm: * @component: the component * @path: the path to set * @ev: the (optional) CORBA exception environment * * This routine removes a chunk of the XML tree in the * #BonoboUIContainer associated with @component pointed * to by @path. **/voidbonobo_ui_component_rm (BonoboUIComponent *component, const char *path, CORBA_Environment *ev){ g_return_if_fail (BONOBO_IS_UI_COMPONENT (component)); GET_CLASS (component)->xml_rm (component, path, ev);}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:19,
示例25: can_use_feat/* Может ли персонаж использовать способность? Проверка по уровню, ремортам, параметрам персонажа, требованиям. */bool can_use_feat(CHAR_DATA *ch, int feat){ if (!HAVE_FEAT(ch, feat)) return FALSE; if (IS_NPC(ch)) return TRUE; if (NUM_LEV_FEAT(ch) < feat_info[feat].slot[(int) GET_CLASS(ch)][(int) GET_KIN(ch)]) return FALSE; if (GET_REMORT(ch) < feat_info[feat].min_remort[(int) GET_CLASS(ch)][(int) GET_KIN(ch)]) return FALSE; switch (feat) { case WEAPON_FINESSE_FEAT: if (GET_REAL_DEX(ch) < GET_REAL_STR(ch) || GET_REAL_DEX(ch) < 18) return FALSE; break; case PARRY_ARROW_FEAT: if (GET_REAL_DEX(ch) < 16) return FALSE; break; case POWER_ATTACK_FEAT: if (GET_REAL_STR(ch) < 20) return FALSE; break; case GREAT_POWER_ATTACK_FEAT: if (GET_REAL_STR(ch) < 22) return FALSE; break; case AIMING_ATTACK_FEAT: if (GET_REAL_DEX(ch) < 16) return FALSE; break; case GREAT_AIMING_ATTACK_FEAT: if (GET_REAL_DEX(ch) < 18) return FALSE; break; case DOUBLESHOT_FEAT: if (ch->get_skill(SKILL_BOWS) < 40) return FALSE; break; } return TRUE;}
开发者ID:prool,项目名称:zerkalomud,代码行数:45,
示例26: perform_net_loadvoidperform_net_load(struct descriptor_data *d, char *arg){ int skill_num, percent; long int cost; skip_spaces(&arg); if (!*arg) { d_printf(d, "Usage: load <program>/r/n"); return; } skill_num = find_skill_num(arg); if (skill_num < 1) { d_printf(d, "Error: program '%s' not found/r/n", arg); return; } if ((SPELL_GEN(skill_num, CLASS_CYBORG) > 0 && GET_CLASS(d->creature) != CLASS_CYBORG) || (GET_REMORT_GEN(d->creature) < SPELL_GEN(skill_num, CLASS_CYBORG)) || (GET_LEVEL(d->creature) < SPELL_LEVEL(skill_num, CLASS_CYBORG))) { d_printf(d, "Error: resources unavailable to load '%s'/r/n", arg); return; } if (GET_SKILL(d->creature, skill_num) >= LEARNED(d->creature)) { d_printf(d, "Program fully installed on local system./r/n"); return; } cost = GET_SKILL_COST(d->creature, skill_num); d_printf(d, "Program cost: %10ld Account balance; %'" PRId64 "/r/n", cost, d->account->bank_future); if (d->account->bank_future < cost) { d_printf(d, "Error: insufficient funds in your account/r/n"); return; } withdraw_future_bank(d->account, cost); percent = MIN(MAXGAIN(d->creature), MAX(MINGAIN(d->creature), GET_INT(d->creature) * 2)); percent = MIN(LEARNED(d->creature) - GET_SKILL(d->creature, skill_num), percent); SET_SKILL(d->creature, skill_num, GET_SKILL(d->creature, skill_num) + percent); d_printf(d, "Program download: %s terminating, %d percent transfer./r/n", spell_to_str(skill_num), percent); if (GET_SKILL(d->creature, skill_num) >= LEARNED(d->creature)) d_printf(d, "Program fully installed on local system./r/n"); else d_printf(d, "Program %d%% installed on local system./r/n", GET_SKILL(d->creature, skill_num));}
开发者ID:TempusMUD,项目名称:Tempuscode,代码行数:56,
示例27: bonobo_ui_component_get/** * bonobo_ui_component_get: * @component: the component * @path: the path to get * @recurse: whether to get child nodes of @path * @opt_ev: the (optional) CORBA exception environment * * This routine fetches a chunk of the XML tree in the * #BonoboUIContainer associated with @component pointed * to by @path. If @recurse then the child nodes of @path * are returned too, otherwise they are not. * * Return value: an XML string (CORBA allocated) **/CORBA_char *bonobo_ui_component_get (BonoboUIComponent *component, const char *path, gboolean recurse, CORBA_Environment *opt_ev){ g_return_val_if_fail (BONOBO_IS_UI_COMPONENT (component), NULL); return GET_CLASS (component)->xml_get (component, path, recurse, opt_ev);}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:24,
示例28: target_deviceIC_device::IC_device(const ParameterConstRef _Param, const technology_managerRef _TM) : target_device(_Param, _TM, TargetDevice_Type::IC){ if (has_parameter("core_height")) core_height = get_parameter<double>("core_height"); if (has_parameter("core_width")) core_width = get_parameter<double>("core_width"); initialize(); debug_level = Param->get_class_debug_level(GET_CLASS(*this));}
开发者ID:hoangt,项目名称:PandA-bambu,代码行数:10,
示例29: bonobo_ui_component_set/** * bonobo_ui_component_set: * @component: the component * @path: the path to set * @xml: the xml to set * @opt_ev: the (optional) CORBA exception environment * * Set the @xml fragment into the remote #BonoboUIContainer's tree * attached to @component at the specified @path * * If you see blank menu items ( or just separators ) it's * likely that you should be using #bonobo_ui_component_set_translate * which substantialy deprecates this routine. **/voidbonobo_ui_component_set (BonoboUIComponent *component, const char *path, const char *xml, CORBA_Environment *opt_ev){ g_return_if_fail (BONOBO_IS_UI_COMPONENT (component)); GET_CLASS (component)->xml_set (component, path, xml, opt_ev);}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:24,
示例30: bonobo_ui_component_get_prop/** * bonobo_ui_component_get_prop: * @component: the component * @path: the path to set the property on * @prop: the property name * @value: the property value * @opt_ev: the (optional) CORBA exception environment * * This helper function fetches an XML property ( or attribute ) * from the XML node pointed at by @path in the #BonoboUIContainer * associated with @component * * Return value: the xml property value or NULL - free with g_free. **/gchar *bonobo_ui_component_get_prop (BonoboUIComponent *component, const char *path, const char *prop, CORBA_Environment *opt_ev){ g_return_val_if_fail (BONOBO_IS_UI_COMPONENT (component), NULL); return GET_CLASS (component)->get_prop (component, path, prop, opt_ev);}
开发者ID:Distrotech,项目名称:libbonoboui,代码行数:24,
注:本文中的GET_CLASS函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GET_CLIENT函数代码示例 C++ GET_CATEGORY函数代码示例 |