Alles anzeigenCode
- // 1. Search:
- bool CInstanceBase::Create(const SCreateData& c_rkCreateData)
- {
- [...]
- return true;
- }
- // 2. Add this piece of code above the return true;
- struct SAttachSpecularData
- {
- DWORD race;
- float specularPower;
- };
- const int SPECULAR_MAX_NUM = 5;
- static SAttachSpecularData structInfo[SPECULAR_MAX_NUM] =
- {
- { 101, 0.09f },
- { 102, 0.06f },
- { 9001, 0.04f },
- { 9002, 0.01f },
- { 9005, 0.09f },
- // { npc_vnum, specular }, Warning: When you add new NPCs / Monsters inside the structure, you must increase the SPECULAR_MAX_NUM
- };
- for (DWORD i = 0; i < SPECULAR_MAX_NUM; i++)
- {
- if (GetRace() == structInfo[i].race)
- {
- SMaterialData data;
- data.pImage = NULL;
- data.isSpecularEnable = TRUE;
- data.fSpecularPower = structInfo[i].specularPower;
- data.bSphereMapIndex = 1;
- m_GraphicThingInstance.SetMaterialData(0, NULL, data);
- }
- }
Warum so kompliziert
wie dann gibt es eine andere lösung bitte um vorschläge