Пример #1
0
void CRecastContainer::Del(RECASTTYPE type)
{
    RecastList_t* PRecastList = GetRecastList(type);

    for (uint16 i = 0; i < PRecastList->size(); ++i)
	{
        delete PRecastList->at(i);
	}
    PRecastList->clear();
}
Пример #2
0
void CRecastContainer::Del(RECASTTYPE type)
{
    RecastList_t* PRecastList = GetRecastList(type);

    for (uint16 i = 0; i < PRecastList->size(); ++i)
	{
        delete PRecastList->at(i);
	}
    PRecastList->clear();
    if (type == RECAST_ABILITY)
        Sql_Query(SqlHandle, "DELETE FROM char_recast WHERE charid = %u;", m_PChar->id);
}
Пример #3
0
void CRecastContainer::Del(RECASTTYPE type)
{
    RecastList_t* PRecastList = GetRecastList(type);
    if (type == RECAST_ABILITY)
    {
        for (auto&& recast : *PRecastList)
        {
            recast.RecastTime = 0;
        }
    }
    else
    {
        PRecastList->clear();
    }
}
Пример #4
0
void CRecastContainer::ResetAbilities()
{
    RecastList_t* PRecastList = GetRecastList(RECAST_ABILITY);

    uint32 timestamp = 0;
    uint32 recastTime = 0;

    Recast_t* twoHour = GetRecast(RECAST_ABILITY, 0);
    if (twoHour != NULL)
    {
        timestamp = twoHour->TimeStamp;
        recastTime = twoHour->RecastTime;
    }
    PRecastList->clear();
    if (twoHour != NULL)
    {
        Recast_t* newTwoHour = new Recast_t;
        newTwoHour->ID = 0;
        newTwoHour->TimeStamp = timestamp;
        newTwoHour->RecastTime = recastTime;
        PRecastList->push_back(newTwoHour);
    }
}
Пример #5
0
void CRecastContainer::ResetAbilities()
{
    RecastList_t* PRecastList = GetRecastList(RECAST_ABILITY);

    uint32 timestamp = 0;
    uint32 recastTime = 0;

    Recast_t* twoHour = GetRecast(RECAST_ABILITY, 0);
    if (twoHour != nullptr)
    {
        timestamp = twoHour->TimeStamp;
        recastTime = twoHour->RecastTime;
    }
    PRecastList->clear();
    if (twoHour != nullptr)
    {
        Recast_t* newTwoHour = new Recast_t;
        newTwoHour->ID = 0;
        newTwoHour->TimeStamp = timestamp;
        newTwoHour->RecastTime = recastTime;
        PRecastList->push_back(newTwoHour);
    }
    Sql_Query(SqlHandle, "DELETE FROM char_recast WHERE charid = %u AND id != 0;", m_PChar->id);
}