void equipcache::loadcharlook(maplelook* plook)
	{
		if (!(plook->isloaded()))
		{
			lookinfo* info = plook->getinfo();

			for (map<char, int>::iterator equip = info->equips.begin(); equip != info->equips.end(); equip++)
			{
				int equipid = equip->second;

				if (equipid != 0)
				{
					plook->addcloth(getcloth(equipid));
				}
			}

			for (equiplayer l = EQL_CAP; l <= EQL_MEDAL; l = static_cast<equiplayer>(l + 1))
			{
				if (!plook->getcloth(l))
				{
					plook->addcloth(&emptycloth, l);
				}
			}

			plook->setbody(getbody(info->skin));
			plook->setface(getface(info->faceid));
			plook->sethair(gethair(info->hairid));
			plook->init(&bodyinfo);
		}
	}
示例#2
0
	void lookfactory::loadcharlook(maplelook* plook)
	{
		if (!(plook->isloaded()))
		{
			lookinfo* info = plook->getinfo();

			for (map<char, int>::iterator equip = info->equips.begin(); equip != info->equips.end(); equip++)
			{
				int equipid = equip->second;

				if (equipid != 0)
				{
					plook->addcloth(getcloth(equipid));
				}
			}

			plook->setbody(getbody(info->skin));
			plook->setface(getface(info->faceid));
			plook->sethair(gethair(info->hairid));
			plook->init(bodydelays, bodyactions, bodyheadmap);
		}
	}