forked from mirror/openmw-tes3mp
28f1c1b0d3
Previously, charGenStage.end was doing double duty as both the variable indicating the number of CharGen stages and – when set to 0 – the variable indicating that CharGen was over. The latter role is now filled by a new boolean.
(cherry picked from commit 926106cf8c
)
30 lines
709 B
C++
30 lines
709 B
C++
//
|
|
// Created by koncord on 01.04.17.
|
|
//
|
|
|
|
#ifndef OPENMW_PROCESSORPLAYERCHARGEN_HPP
|
|
#define OPENMW_PROCESSORPLAYERCHARGEN_HPP
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerCharGen : public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerCharGen()
|
|
{
|
|
BPP_INIT(ID_PLAYER_CHARGEN)
|
|
}
|
|
|
|
void Do(PlayerPacket &packet, Player &player) override
|
|
{
|
|
DEBUG_PRINTF(strPacketID.c_str());
|
|
|
|
if (player.charGenState.currentStage == player.charGenState.endStage)
|
|
Script::Call<Script::CallbackIdentity("OnPlayerEndCharGen")>(player.getId());
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERCHARGEN_HPP
|