1
This commit is contained in:
parent
ab8769beee
commit
39b88f1bbd
@ -364,7 +364,7 @@ void BattleDataContext::GetHeroLvQuality(int& hero_lv, int& quality)
|
|||||||
hero_lv = 1;
|
hero_lv = 1;
|
||||||
quality = 1;
|
quality = 1;
|
||||||
if (owner_.Get()->IsPlayer()) {
|
if (owner_.Get()->IsPlayer()) {
|
||||||
if (hero_ability_) {
|
if (hero_ability_ && hero_dto && hero_dto->IsObject()) {
|
||||||
hero_lv = hero_dto->Get("hero_lv", 0).GetInt();
|
hero_lv = hero_dto->Get("hero_lv", 0).GetInt();
|
||||||
quality = hero_dto->Get("quality", 0).GetInt();
|
quality = hero_dto->Get("quality", 0).GetInt();
|
||||||
}
|
}
|
||||||
@ -433,7 +433,7 @@ void BattleDataContext::CalcBattleStat(struct PlayerStats* stats)
|
|||||||
return ceg;
|
return ceg;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (hero_ability_) {
|
if (hero_ability_ && hero_dto && hero_dto->IsObject()) {
|
||||||
int hero_id = hero_dto->Get("hero_id", 0).GetInt();
|
int hero_id = hero_dto->Get("hero_id", 0).GetInt();
|
||||||
int quality = hero_dto->Get("quality", 0).GetInt();
|
int quality = hero_dto->Get("quality", 0).GetInt();
|
||||||
int today_get_gold = hero_dto->Get("today_get_gold", 0).GetInt();
|
int today_get_gold = hero_dto->Get("today_get_gold", 0).GetInt();
|
||||||
|
@ -123,11 +123,11 @@ void SkillHelper::Init()
|
|||||||
for (int i = MAGIC_NONE; i < MAGIC_END; ++i) {
|
for (int i = MAGIC_NONE; i < MAGIC_END; ++i) {
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
int skill_id = GetMagicSkillId(i);
|
int skill_id = GetMagicSkillId(i);
|
||||||
if (skill_id == 0) {
|
if (skill_id) {
|
||||||
abort();
|
magic_skill_hash_[i] = skill_id;
|
||||||
|
skill_magic_hash_[skill_id] = i;
|
||||||
|
//abort();
|
||||||
}
|
}
|
||||||
magic_skill_hash_[i] = skill_id;
|
|
||||||
skill_magic_hash_[skill_id] = i;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user