Jump to content
Sign in to follow this  
tirok_1991

[Card] Phreeoni Card

Recommended Posts

El código fuente del anunciador de card MvP es el siguiente

			//A Rare Drop Global Announce by Lupus
			if( mvp_sd && drop_rate <= battle_config.rare_drop_announce ) {
				char message[128];
				sprintf (message, msg_txt(NULL,541), mvp_sd->status.name, md->name, it->jname, (float)drop_rate/100);
				//MSG: "'%s' won %s's %s (chance: %0.02f%%)"
				intif_broadcast(message,strlen(message)+1,BC_DEFAULT);
			}

Ese código para almacenar la variable usa un tipo float, que es capaz de almacenar reales de muchos decimales, en cambio el otro es menos números y los trunca, por lo que el 0.015% es en realidad 0.01%, pero con el anunciador es 0.015% lo que al aproximarlo es 0.02%

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this