mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2026-01-19 14:08:23 +00:00
优化写法
This commit is contained in:
parent
0310f9737b
commit
f3c247076b
@ -1365,16 +1365,14 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
{ "神话魔法卡礼包", QualityType.Red },
|
{ "神话魔法卡礼包", QualityType.Red },
|
||||||
{ "不朽魔法卡礼包", QualityType.Gold }
|
{ "不朽魔法卡礼包", QualityType.Gold }
|
||||||
};
|
};
|
||||||
foreach (string key in magicCards.Keys)
|
if (magicCards.Where(kv => kv.Key == name).Select(kv => kv.Value).FirstOrDefault() is QualityType type)
|
||||||
{
|
|
||||||
if (name == key)
|
|
||||||
{
|
{
|
||||||
for (int i = 0; i < box.Gifts[name]; i++)
|
for (int i = 0; i < box.Gifts[name]; i++)
|
||||||
{
|
{
|
||||||
Item newItem = new 魔法卡礼包(magicCards[key], box.Gifts[name]);
|
Item newItem = new 魔法卡礼包(type, box.Gifts[name]);
|
||||||
AddItemToUserInventory(user, newItem, false, true);
|
AddItemToUserInventory(user, newItem, false, true);
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user