void TrainingGame(MGLDraw *mgl) { InitPlayer(INIT_GAME, 0, 0); SetCustomName("training.dlw"); if (LunaticWorld(5, "worlds\\training.dlw") == WORLD_LOAD) LunaticGame(mgl, 1); mgl->LastKeyPressed(); // just to clear key buffer ExitPlayer(); }
void cMonster::OnRightClicked(cPlayer & a_Player) { super::OnRightClicked(a_Player); const cItem & EquippedItem = a_Player.GetEquippedItem(); if ((EquippedItem.m_ItemType == E_ITEM_NAME_TAG) && !EquippedItem.m_CustomName.empty()) { SetCustomName(EquippedItem.m_CustomName); if (!a_Player.IsGameModeCreative()) { a_Player.GetInventory().RemoveOneEquippedItem(); } } }