初版
This commit is contained in:
@@ -47,14 +47,13 @@ public:
|
||||
|
||||
bool get_rand_cera_shop_bonus_item(CeraShopBonusItemType* res = NULL)
|
||||
{
|
||||
int size = get_random_item_num();
|
||||
for (int i = 0; i < size; i++)
|
||||
int rand_ = Utils::Rand(0, get_random_item_num() - 1);
|
||||
int i = 0;
|
||||
for (auto it = cera_shop_bonus_item_map_rand.Begin(); it != cera_shop_bonus_item_map_rand.End(); it++, i++)
|
||||
{
|
||||
int random_value = Utils::Rand(1, size - 1);
|
||||
CeraShopBonusItemType cera_shop_bonusi_temt = cera_shop_bonus_item_map_rand.Map.at(random_value);
|
||||
if (cera_shop_bonusi_temt.is_random == true)
|
||||
if (rand_ == i)
|
||||
{
|
||||
if (res != NULL) *res = cera_shop_bonusi_temt;
|
||||
if (res) *res = it->second;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user