Jump to content

Den

Inactive Member
  • Posts

    110
  • Joined

  • Last visited

  • Days Won

    5
  • Feedback

    0%

Posts posted by Den

  1. 55 minutes ago, bumxd said:

    yes im about problem this what say you, damage 2x more when enable\disable autopottion with polymorph, have another fix?

    There are so many ways to "unbug" your polymorph, change party role, autopotion etc. What is happening when you reset party role or autopotion? ComputePoints() is called. While using polymorph marble only ComputeBattlePoints() is called. I've changed it in void CHARACTER::SetPolymorph(DWORD dwRaceNum, bool bMaintainStat) char.cpp:

    QFSNEfA.png

    If you don't your players do deal more damage by using ComputePoints() in other functions, you have to check everything and add condition with IsPolymorphed().

  2. 11 minutes ago, PeaceMaker said:

    would this disable all kind of pots or just red/blue and auto pots are included ? :P

    All the vnums that are defined in unique_item.h because autopotions are defined by item vnum. So yes, only red/blue autopots.

    Ualg4zP.png

  3. 11 minutes ago, Colossus said:

    I think its a bug when yo are polymorphed and you have auto potions enabled

    Enabling/disabling autopotion while being polymorphed increases your damage, yea? If you're talking about this then I think it's a problem with polymorph, not autopotion. Your autopotion helps you to get the correct damage in other way your damage will be lower than it should be. So I would rather fix the calculations after using polymorph marble than disabling autopotion.

  4. 12 hours ago, daffyy said:

    First problem solved : add to atlasinfo "season" 

    Second problem : one time server start but when i go to new map and restart server, channels always turn off (game) only db and Auth working.  (syserr clear) 

    
    #0  SECTREE_MANAGER::Build (this=0xbfbfb918, c_pszListFileName=0xbfbfae88 "locale/poland/map/index", c_pszMapBasePath=0x28c0d28c "locale/poland/map") at sectree_manager.cpp:754
    754                     *strrchr(buf, '\n') = '\0';
    
    
    #1  0x081422df in CInputDB::Boot (this=0x28d2697c, data=0x2b5531bc "\201sM\207") at input_db.cpp:991
    #2  0x08143d2c in CInputDB::Analyze (this=0x28d2697c, d=0x28d26600, bHeader=<value optimized out>, c_pData=0x2b400009 "y3\025") at input_db.cpp:2165
    #3  0x0813e0c3 in CInputDB::Process (this=0x28d2697c, d=0x28d26600, orig=0x2b400000, bytes=1389736, r_iBytesProceed=@0xbfbfb554) at input_db.cpp:2555
    #4  0x08100c93 in DESC::ProcessInput (this=0x28d26600) at desc.cpp:303
    #5  0x0825975c in io_loop (fdw=0x299859e0) at main.cpp:1048
    #6  0x0825a0b1 in idle () at main.cpp:935
    #7  0x0825b701 in main (argc=1, argv=0xbfbfec34) at main.cpp:602
    

     

    Leave an empty line at the end of locale/poland/map/index.

    For new maps try to change every single file name to lowercase e.g. "MapProperty.txt" to "mapproperty.txt.".

  5. 10 minutes ago, Kenny1337 said:

    void CHARACTER::BroadcastTargetPacket()
    {
        if (m_set_pkChrTargetedBy.empty())
            return;

        TPacketGCTarget p;

        p.header = HEADER_GC_TARGET;
        p.dwVID = GetVID();

        if (IsPC())
            p.bHPPercent = 0;
        else
            p.bHPPercent = MINMAX(0, (GetHP() * 100) / GetMaxHP(), 100);    --- 5239 line

        CHARACTER_SET::iterator it = m_set_pkChrTargetedBy.begin();

        while (it != m_set_pkChrTargetedBy.end())
        {
            LPCHARACTER pkChr = *it++;

            if (!pkChr->GetDesc())
            {
                sys_err("%s %p does not have desc", pkChr->GetName(), get_pointer(pkChr));
                abort();
            }

            pkChr->GetDesc()->Packet(&p, sizeof(TPacketGCTarget));
        }
    }

     

     

    hmm, i checked mob_proto and have one monster with 0hp... vnum 0, no name etc. 

    i removed it and will check if the problem then appear again

    Change the condition to:

    	if (IsPC())
    		p.bHPPercent = 0;
    	else if (GetMaxHP() <= 0)
    		p.bHPPercent = 0;
    	else
    		p.bHPPercent = MINMAX(0, (GetHP() * 100) / GetMaxHP(), 100);

    You can't divide by 0 so you'll always get a crash when mob's maxhp is 0.

    • Love 1
  6. 1 minute ago, vandragoon said:

    now i have this:
    main.cpp:497: error: redeclaration of 'std::string temp_exp_line'
    main.cpp:474: error: 'std::string temp_exp_line' previously declared here
     

    Better do it this way:

    	// START_OF_Player_EXP_TABLE_LOADING
    	string temp_exp_line;
    	char szExpTable[256];
    	snprintf(szExpTable, sizeof(szExpTable), "%s/exp.txt", LocaleService_GetBasePath().c_str());
    	ifstream exp_table_open(szExpTable);
    	if (!exp_table_open.is_open()) {
    		fprintf(stderr, "Failed to Load ExpTable from %s/exp.txt\n", LocaleService_GetBasePath().c_str());
    		sys_err("Failed to Load ExpTable from %s/exp.txt", LocaleService_GetBasePath().c_str());
    		return 0;
    	}
    	int exp_table_counter = 0;
    	while (!exp_table_open.eof())
    	{
    		exp_table_open >> temp_exp_line;
    		str_to_number(exp_table_common[exp_table_counter], temp_exp_line.c_str());
    		exp_table_counter++;
    	}
    	fprintf(stderr, "EXP erfolgreich geladen von: %s\n", LocaleService_GetBasePath().c_str());
    	//sys_log(0, "EXP Table Loaded succsefully from %s", LocaleService_GetBasePath().c_str());
    	// END_OF_Player_EXP_TABLE_LOADING
    	
    #ifdef NEW_PET_SYSTEM
     	temp_exp_line = ""; //clearing
    	std::ifstream exppet_table_open("/usr/home/game/share/exppettable.txt");
    	/*if (!exp_table_open.is_open())
    	return 0;*/
    
    	int exppet_table_counter = 0;
    	int tmppet_exp = 0;
    	while (!exppet_table_open.eof())
    	{
    		exppet_table_open >> temp_exp_line;
    		str_to_number(exppet_table_common[exppet_table_counter], temp_exp_line.c_str());
    		if (exppet_table_common[exppet_table_counter] < 2147483647) {
    			sys_log(0, "Livelli Pet caricati da exppettable.txt: %d !", exppet_table_common[exppet_table_counter]);
    			exppet_table_counter++;
    		}
    		else {
    			fprintf(stderr, "[main] Impossibile caricare la tabella exp valore non valido\n");
    			break;
    		}
    	}
    #endif

    You didn't notice you've added something with the same name of variable before. Next time remember to check.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.